@@ -2,35 +2,47 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component {
2
2
flashMessages = ${flashMessages}
3
3
baseWorkspaceOptions = ${baseWorkspaceOptions}
4
4
workspace = ${workspace}
5
+ i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')}
5
6
6
7
prototype(Neos.Fusion.Form:LabelRenderer) {
7
8
translationPackage = 'Neos.Workspace.Ui'
8
9
translationSource = 'Main'
9
10
}
10
11
12
+ prototype(Neos.Fusion.Form:Neos.BackendModule.FieldContainer) {
13
+ translation.label {
14
+ package = 'Neos.Workspace.Ui'
15
+ source = 'Main'
16
+ }
17
+ }
18
+
11
19
renderer = afx`
12
20
<Neos.Workspace.Ui:Component.FlashMessages flashMessages={props.flashMessages}/>
13
21
<main>
14
- <h2>{I18n.translate ('workspaces.createNewWorkspace', 'Create new workspace', [], 'Main', 'Neos.Workspace.Ui ')}</h2>
15
- <Neos.Fusion.Form:Form form.data.workspace={props.workspace} form. target.action="create">
22
+ <h2>{props.i18n.id ('workspaces.createNewWorkspace')}</h2>
23
+ <Neos.Fusion.Form:Form form.target.action="create">
16
24
<fieldset>
17
- <Neos.Fusion.Form:FieldContainer
25
+ <Neos.Fusion.Form:Neos.BackendModule. FieldContainer
18
26
field.name="title"
19
27
label="workspaces.workspace.title"
20
28
class="neos-control-group"
21
29
>
22
- <Neos.Fusion.Form:Textfield/>
23
- </Neos.Fusion.Form:FieldContainer>
30
+ <Neos.Fusion.Form:Textfield
31
+ attributes.required
32
+ attributes.pattern="/^[\p{L}\p{P}\d \.]{1,200}$/u"
33
+ attributes.autofocus
34
+ />
35
+ </Neos.Fusion.Form:Neos.BackendModule.FieldContainer>
24
36
25
- <Neos.Fusion.Form:FieldContainer
37
+ <Neos.Fusion.Form:Neos.BackendModule. FieldContainer
26
38
field.name="description"
27
39
label="workspaces.workspace.description"
28
40
class="neos-control-group"
29
41
>
30
42
<Neos.Fusion.Form:Textarea attributes.rows={3} />
31
- </Neos.Fusion.Form:FieldContainer>
43
+ </Neos.Fusion.Form:Neos.BackendModule. FieldContainer>
32
44
33
- <Neos.Fusion.Form:FieldContainer
45
+ <Neos.Fusion.Form:Neos.BackendModule. FieldContainer
34
46
field.name="baseWorkspace"
35
47
field.value="live"
36
48
label="workspaces.workspace.baseWorkspace"
@@ -42,38 +54,38 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component {
42
54
option.value={workspaceName}>{workspaceTitle}</Neos.Fusion.Form:Select.Option>
43
55
</Neos.Fusion:Loop>
44
56
</Neos.Fusion.Form:Select>
45
- </Neos.Fusion.Form:FieldContainer>
57
+ </Neos.Fusion.Form:Neos.BackendModule. FieldContainer>
46
58
</fieldset>
47
59
<fieldset>
48
60
<Neos.Fusion:Fragment
49
61
@if={Security.hasAccess('Neos.Workspace.Ui:Backend.Module.Management.Workspace.ManageInternalWorkspaces')}>
50
62
<h3 class="neos-control-label">
51
- {I18n.translate ('workspaces.workspace.visibility', 'Visibility', [], 'Main', 'Neos.Workspace.Ui ')}
63
+ {props.i18n.id ('workspaces.workspace.visibility')}
52
64
</h3>
53
- <Neos.Fusion.Form:FieldContainer
65
+ <Neos.Fusion.Form:Neos.BackendModule. FieldContainer
54
66
field.name="visibility"
55
67
class="neos-control-group"
56
68
>
57
- <Neos.Fusion.Form:Radio id="visibility.private" field.value="private" attributes.checked={true} >
69
+ <Neos.Fusion.Form:Radio id="visibility.private" field.value="private" attributes.checked>
58
70
<span></span>
59
71
<span>
60
- {I18n.translate ('workspaces.workspace.visibility.private', 'Private', [], 'Main', 'Neos.Workspace.Ui ')}
72
+ {props.i18n.id ('workspaces.workspace.visibility.private')}
61
73
<span class="neos-help-inline">
62
- {I18n.translate ('workspaces.workspace.visibility.private.help', 'Only reviewers and administrators can access and modify this workspace', [], 'Main', 'Neos.Workspace.Ui ')}
74
+ {props.i18n.id ('workspaces.workspace.visibility.private.help')}
63
75
</span>
64
76
</span>
65
77
</Neos.Fusion.Form:Radio>
66
78
<br/>
67
79
<Neos.Fusion.Form:Radio id="visibility.internal" field.value="internal">
68
80
<span></span>
69
81
<span>
70
- {I18n.translate ('workspaces.workspace.visibility.internal', 'Internal', [], 'Main', 'Neos.Workspace.Ui ')}
82
+ {props.i18n.id ('workspaces.workspace.visibility.internal')}
71
83
<span class="neos-help-inline">
72
- {I18n.translate ('workspaces.workspace.visibility.internal.help', 'Any logged in editor can see and modify this workspace.', [], 'Main', 'Neos.Workspace.Ui ')}
84
+ {props.i18n.id ('workspaces.workspace.visibility.internal.help')}
73
85
</span>
74
86
</span>
75
87
</Neos.Fusion.Form:Radio>
76
- </Neos.Fusion.Form:FieldContainer>
88
+ </Neos.Fusion.Form:Neos.BackendModule. FieldContainer>
77
89
</Neos.Fusion:Fragment>
78
90
79
91
<Neos.Fusion.Form:Hidden
@@ -83,14 +95,14 @@ Neos.Workspace.Ui.WorkspaceController.new = Neos.Fusion:Component {
83
95
/>
84
96
85
97
<Neos.Fusion.Form:Button attributes.class="neos-button neos-button-primary">
86
- {I18n.translate ('workspaces.createWorkspace', 'Create workspace', [], 'Main', 'Neos.Workspace.Ui ')}
98
+ {props.i18n.id ('workspaces.createWorkspace')}
87
99
</Neos.Fusion.Form:Button>
88
100
</fieldset>
89
101
</Neos.Fusion.Form:Form>
90
102
91
103
<Neos.Workspace.Ui:Component.Footer>
92
104
<Neos.Fusion:Link.Action href.action="index" class="neos-button">
93
- {I18n.translate ('cancel', 'Cancel', [], 'Main', 'Neos.Workspace.Ui ')}
105
+ {props.i18n.id ('cancel')}
94
106
</Neos.Fusion:Link.Action>
95
107
</Neos.Workspace.Ui:Component.Footer>
96
108
</main>
0 commit comments