diff --git a/Neos.Workspace.Ui/Resources/Private/Fusion/Views/New.fusion b/Neos.Workspace.Ui/Resources/Private/Fusion/Views/New.fusion index ce3615a8d5c..23009730452 100644 --- a/Neos.Workspace.Ui/Resources/Private/Fusion/Views/New.fusion +++ b/Neos.Workspace.Ui/Resources/Private/Fusion/Views/New.fusion @@ -2,35 +2,47 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component { flashMessages = ${flashMessages} baseWorkspaceOptions = ${baseWorkspaceOptions} workspace = ${workspace} + i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')} prototype(Neos.Fusion.Form:LabelRenderer) { translationPackage = 'Neos.Workspace.Ui' translationSource = 'Main' } + prototype(Neos.Fusion.Form:Neos.BackendModule.FieldContainer) { + translation.label { + package = 'Neos.Workspace.Ui' + source = 'Main' + } + } + renderer = afx` <Neos.Workspace.Ui:Component.FlashMessages flashMessages={props.flashMessages}/> <main> - <h2>{I18n.translate('workspaces.createNewWorkspace', 'Create new workspace', [], 'Main', 'Neos.Workspace.Ui')}</h2> - <Neos.Fusion.Form:Form form.data.workspace={props.workspace} form.target.action="create"> + <h2>{props.i18n.id('workspaces.createNewWorkspace')}</h2> + <Neos.Fusion.Form:Form form.target.action="create"> <fieldset> - <Neos.Fusion.Form:FieldContainer + <Neos.Fusion.Form:Neos.BackendModule.FieldContainer field.name="title" label="workspaces.workspace.title" class="neos-control-group" > - <Neos.Fusion.Form:Textfield/> - </Neos.Fusion.Form:FieldContainer> + <Neos.Fusion.Form:Textfield + attributes.required + attributes.pattern="/^[\p{L}\p{P}\d \.]{1,200}$/u" + attributes.autofocus + /> + </Neos.Fusion.Form:Neos.BackendModule.FieldContainer> - <Neos.Fusion.Form:FieldContainer + <Neos.Fusion.Form:Neos.BackendModule.FieldContainer field.name="description" label="workspaces.workspace.description" class="neos-control-group" > <Neos.Fusion.Form:Textarea attributes.rows={3} /> - </Neos.Fusion.Form:FieldContainer> + </Neos.Fusion.Form:Neos.BackendModule.FieldContainer> - <Neos.Fusion.Form:FieldContainer + <Neos.Fusion.Form:Neos.BackendModule.FieldContainer field.name="baseWorkspace" field.value="live" label="workspaces.workspace.baseWorkspace" @@ -42,24 +54,24 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component { option.value={workspaceName}>{workspaceTitle}</Neos.Fusion.Form:Select.Option> </Neos.Fusion:Loop> </Neos.Fusion.Form:Select> - </Neos.Fusion.Form:FieldContainer> + </Neos.Fusion.Form:Neos.BackendModule.FieldContainer> </fieldset> <fieldset> <Neos.Fusion:Fragment @if={Security.hasAccess('Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageInternalWorkspaces')}> <h3 class="neos-control-label"> - {I18n.translate('workspaces.workspace.visibility', 'Visibility', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.workspace.visibility')} </h3> - <Neos.Fusion.Form:FieldContainer + <Neos.Fusion.Form:Neos.BackendModule.FieldContainer field.name="visibility" class="neos-control-group" > - <Neos.Fusion.Form:Radio id="visibility.private" field.value="private" attributes.checked={true}> + <Neos.Fusion.Form:Radio id="visibility.private" field.value="private" attributes.checked> <span></span> <span> - {I18n.translate('workspaces.workspace.visibility.private', 'Private', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.workspace.visibility.private')} <span class="neos-help-inline"> - {I18n.translate('workspaces.workspace.visibility.private.help', 'Only reviewers and administrators can access and modify this workspace', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.workspace.visibility.private.help')} </span> </span> </Neos.Fusion.Form:Radio> @@ -67,13 +79,13 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component { <Neos.Fusion.Form:Radio id="visibility.internal" field.value="internal"> <span></span> <span> - {I18n.translate('workspaces.workspace.visibility.internal', 'Internal', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.workspace.visibility.internal')} <span class="neos-help-inline"> - {I18n.translate('workspaces.workspace.visibility.internal.help', 'Any logged in editor can see and modify this workspace.', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.workspace.visibility.internal.help')} </span> </span> </Neos.Fusion.Form:Radio> - </Neos.Fusion.Form:FieldContainer> + </Neos.Fusion.Form:Neos.BackendModule.FieldContainer> </Neos.Fusion:Fragment> <Neos.Fusion.Form:Hidden @@ -83,14 +95,14 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component { /> <Neos.Fusion.Form:Button attributes.class="neos-button neos-button-primary"> - {I18n.translate('workspaces.createWorkspace', 'Create workspace', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('workspaces.createWorkspace')} </Neos.Fusion.Form:Button> </fieldset> </Neos.Fusion.Form:Form> <Neos.Workspace.Ui:Component.Footer> <Neos.Fusion:Link.Action href.action="index" class="neos-button"> - {I18n.translate('cancel', 'Cancel', [], 'Main', 'Neos.Workspace.Ui')} + {props.i18n.id('cancel')} </Neos.Fusion:Link.Action> </Neos.Workspace.Ui:Component.Footer> </main>