{namespace neos=Neos\Neos\ViewHelpers}
<f:layout name="BackendSubModule"/>

<f:section name="subtitle">
	<h2>{neos:backend.translate(id: 'workspaces.createNewWorkspace', source: 'Main', package: 'Neos.Workspace.Ui')}</h2>
</f:section>

<f:section name="content">
	<f:form action="create" arguments="{contentRepositoryId: contentRepositoryId}" objectName="workspace">
		<fieldset>
			<div class="neos-control-group{f:validation.ifHasErrors(for: 'title', then: ' neos-error')}">
				<label class="neos-control-label" for="title">{neos:backend.translate(id: 'workspaces.workspace.title', source: 'Main', package: 'Neos.Workspace.Ui')}</label>
				<div class="neos-controls">
					<f:form.textfield name="title" id="title" class="neos-span3" required="{true}"/>
					<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'title'}"/>
				</div>
			</div>

			<div class="neos-control-group{f:validation.ifHasErrors(for: 'description', then: ' neos-error')}">
				<label class="neos-control-label" for="description">{neos:backend.translate(id: 'workspaces.workspace.description', source: 'Main', package: 'Neos.Workspace.Ui')}</label>
				<div class="neos-controls">
					<f:form.textfield name="description" id="description" class="neos-span10"/>
					<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'description'}"/>
				</div>
			</div>

			<div class="neos-control-group{f:validation.ifHasErrors(for: 'baseWorkspace', then: ' neos-error')}">
				<label class="neos-control-label" for="baseWorkspace">{neos:backend.translate(id: 'workspaces.workspace.baseWorkspace', source: 'Main', package: 'Neos.Workspace.Ui')}</label>
				<div class="neos-controls">
					<f:form.select name="baseWorkspace" id="baseWorkspace" options="{baseWorkspaceOptions}" value="live" required="{true}" />
				</div>
			</div>
		</fieldset>

		<div class="neos-footer">
			<f:link.action action="index" arguments="{contentRepositoryId: contentRepositoryId}" class="neos-button">{neos:backend.translate(id: 'cancel', package: 'Neos.Workspace.Ui')}
			</f:link.action>
			<f:form.submit value="{neos:backend.translate(id: 'workspaces.createWorkspace', source: 'Main', package: 'Neos.Workspace.Ui')}" class="neos-button neos-button-primary"/>
		</div>
	</f:form>
</f:section>
