File: AdminDynamicFieldMultiselect.tt

package info (click to toggle)
otrs2 6.0.32-6
  • links: PTS
  • area: non-free
  • in suites: bullseye
  • size: 197,336 kB
  • sloc: perl: 1,003,018; javascript: 75,060; xml: 70,883; php: 51,819; sql: 22,361; sh: 379; makefile: 51
file content (268 lines) | stat: -rw-r--r-- 18,662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# --
# Copyright (C) 2001-2021 OTRS AG, https://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
# --

<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1 class="InvisibleText">
        [% Translate("Dynamic Fields") | html %] - [% Translate(Data.ObjectTypeName) | html %]:
        [% USE Title = String(Data.BreadcrumbText) %]
        [% Title | html %]
    </h1>

    [% BreadcrumbPath = [
            {
                Name => Translate('Dynamic Fields Management'),
                Link => 'AdminDynamicField',
            },
        ]
    %]

    [% USE BreadcrumbName = String(Translate(Data.ObjectTypeName)) %]

    [% SWITCH Data.Mode %]
        [% CASE 'Add' %]
            [% BreadcrumbPath.push({ Name => BreadcrumbName.append( ': ', Title ) }) %]
        [% CASE 'Change' %]
            [% BreadcrumbPath.push({ Name => BreadcrumbName.append( ': ', Title, ' - ', Data.Name ) }) %]
    [% END %]

    [% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]

    <div class="Clear"></div>

    <div class="SidebarColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>[% Translate("Actions") | html %]</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
                    <li>
                        <a href="[% Env("Baselink") %]Action=AdminDynamicField" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i>[% Translate("Go back to overview") | html %]</span></a>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <div class="ContentColumn">
        <form id="EntityUpdate" action="[% Env("CGIHandle") %]" method="post" class="Validate PreventMultipleSubmits">
            <input type="hidden" name="Action" value="AdminDynamicFieldMultiselect" />
            <input type="hidden" name="Subaction" value="[% Data.Mode | html %]Action" />
            <input type="hidden" name="ObjectType" value="[% Data.ObjectType | html %]" />
            <input type="hidden" name="FieldType" value="[% Data.FieldType | html %]" />
            <input type="hidden" name="ID" value="[% Data.ID | html %]" />

            <div class="WidgetSimple">
                <div class="Header">
                    <h2>[% Translate("General") | html %]</h2>
                </div>
                <div class="Content">
                    <div class="LayoutGrid ColumnsWithSpacing">
                        <div class="Size1of2">
                            <fieldset class="TableLike">
                                <label class="Mandatory" for="Name"><span class="Marker">*</span> [% Translate("Name") | html %]:</label>
                                <div class="Field">
                                    <input id="Name" class="W50pc [% Data.NameServerError | html %] [% Data.ShowWarning | html %]  Validate_Alphanumeric" type="text" maxlength="200" value="[% Data.Name | html %]" name="Name" [% Data.ReadonlyInternalField | html %] />
                                    <div id="NameError" class="TooltipErrorMessage"><p>[% Translate("This field is required, and the value should be alphabetic and numeric characters only.") | html %]</p></div>
                                    <div id="NameServerError" class="TooltipErrorMessage"><p>[% Translate(Data.NameServerErrorMessage) | html %]</p></div>
                                    <p class="FieldExplanation">[% Translate("Must be unique and only accept alphabetic and numeric characters.") | html %]</p>
                                    <p class="Warning Hidden">[% Translate("Changing this value will require manual changes in the system.") | html %]</p>
                                </div>
                                <div class="Clear"></div>

                                <label class="Mandatory" for="Label"><span class="Marker">*</span> [% Translate("Label") | html %]:</label>
                                <div class="Field">
                                    <input id="Label" class="W50pc [% Data.LabelServerError | html %] Validate_Required" type="text" maxlength="200" value="[% Data.Label | html %]" name="Label"/>
                                    <div id="LabelError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                                    <div id="LabelServerError" class="TooltipErrorMessage"><p>[% Translate(Data.LabelServerErrorMessage) | html %]</p></div>
                                    <p class="FieldExplanation">[% Translate("This is the name to be shown on the screens where the field is active.") | html %]</p>
                                </div>
                                <div class="Clear"></div>

                                <label class="Mandatory" for="FieldOrder"><span class="Marker">*</span> [% Translate("Field order") | html %]:</label>
                                <div class="Field">
                                    [% Data.DynamicFieldOrderStrg %]
                                    <div id="FieldOrderError" class="TooltipErrorMessage"><p>[% Translate("This field is required and must be numeric.") | html %]</p></div>
                                    <div id="FieldOrderServerError" class="TooltipErrorMessage"><p>[% Translate(Data.FieldOrderServerErrorMessage) | html %]</p></div>
                                    <p class="FieldExplanation">[% Translate("This is the order in which this field will be shown on the screens where is active.") | html %]</p>
                                </div>
                                <div class="Clear"></div>
                            </fieldset>
                        </div>
                        <div class="Size1of2">
                            <fieldset class="TableLike">
                                <label for="ValidID">[% Translate("Validity") | html %]:</label>
                                <div class="Field">
                                    [% Data.ValidityStrg %]
                                    <div id="ValidIDError" class="TooltipErrorMessage">
                                        <p>[% Translate("This field is required.") | html %]</p>
                                    </div>
                                    <div id="ValidIDServerError" class="TooltipErrorMessage">
                                        <p>
[% RenderBlockStart("RequiredValidOptionServerError") %]
                                            [% Translate("This field is required.") | html %]
[% RenderBlockEnd("RequiredValidOptionServerError") %]
[% RenderBlockStart("InSettingValidOptionServerError") %]
                                            [% Translate("Is not possible to invalidate this entry, all config settings have to be changed beforehand.") | html %]
[% RenderBlockEnd("InSettingValidOptionServerError") %]
                                        </p>
                                    </div>
                                </div>
                                <div class="Clear"></div>

                                <div class="SpacingTop"></div>
                                <label for="FieldTypeName">[% Translate("Field type") | html %]:</label>
                                <div class="Field">
                                    <input id="FieldTypeName" readonly class="W50pc" type="text" maxlength="200" value="[% Translate(Data.FieldTypeName) | html %]" name="FieldTypeName"/>
                                    <div class="Clear"></div>
                                </div>

                                <div class="SpacingTop"></div>
                                <label for="ObjectTypeName">[% Translate("Object type") | html %]:</label>
                                <div class="Field">
                                    <input id="ObjectTypeName" readonly class="W50pc" type="text" maxlength="200" value="[% Translate(Data.ObjectTypeName) | html %]" name="ObjectTypeName"/>
                                    <div class="Clear"></div>
                                </div>

[% RenderBlockStart("InternalField") %]
                                <div class="SpacingTop"></div>
                                <label for="InternalField">[% Translate("Internal field") | html %]:</label>
                                <div class="Field">
                                    <input id="InternalField" readonly class="W50pc" type="text" maxlength="1" value="[% Data.InternalField | html %]" name="InternalField"/>
                                    <p class="FieldExplanation">
                                        [% Translate("This field is protected and can't be deleted.") | html %]
                                    </p>
                                    <div class="Clear"></div>
                                </div>
[% RenderBlockEnd("InternalField") %]
                            </fieldset>
[% RenderBlockStart("DynamicFieldInSysConfig") %]
                    <input type="hidden" name="OldName" id="OldName" value="[% Data.OldName | html %]"/>
                    <input type="hidden" name="UpdateEntity" id="UpdateEntity" value=""/>
                    <div id="EntityInSetting" class="Hidden">
                        <div class="TextDialog">
                            <h1>[% Translate("This dynamic field is used in the following config settings:") | html %]</h1>
                            <ul>
                                [% RenderBlockStart("DynamicFieldInSysConfigRow") %]
                                <li class="InSysConfigSetting">[% Data.SettingName %]</li>
                                [% RenderBlockEnd("DynamicFieldInSysConfigRow") %]
                            </ul>
                            <p class="FieldExplanation"></p>
                        </div>
                    </div>
[% RenderBlockEnd("DynamicFieldInSysConfig") %]
[% RenderBlockStart("DynamicFieldInSysConfigDirty") %]
                    <input type="hidden" name="SysConfigDirty" id="SysConfigDirty" value="1"/>
[% RenderBlockEnd("DynamicFieldInSysConfigDirty") %]
                        </div>
                    </div>
                </div>
            </div>
            <div class="WidgetSimple">
                <div class="Header">
                    <h2>[% Translate(Data.FieldTypeName) | html %] [% Translate("Field Settings") | html %]</h2>
                </div>
                <div class="Content">
                    <input type="hidden" name="ContinueAfterSave" id="ContinueAfterSave" value=""/>
                    <fieldset class="TableLike">
                        <label>[% Translate("Possible values") | html %]:</label>
                        <div class="Field ValueInsert">
                            <input type="hidden" name="ValueCounter" value="[% Data.ValueCounter | html %]" id="ValueCounter" class="ValueCounter" />
[% RenderBlockStart("ValueRow") %]
                            <div class="ValueRow">
                                <label class="Mandatory" for="Key_[% Data.ValueCounter | html %]"><span class="Marker">*</span>[% Translate("Key") | html %]:</label>
                                <input name="Key_[% Data.ValueCounter | html %]" id="Key_[% Data.ValueCounter | html %]" class="DefaultValueKeyItem Validate_Required W20pc [% Data.KeyError | html %]" type="text" maxlength="100" value="[% Data.Key | html %]"/>
                                <div id="Key_[% Data.ValueCounter | html %]Error" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                                <div id="Key_[% Data.ValueCounter | html %]ServerError" class="TooltipErrorMessage"><p>[% Translate(Data.KeyErrorStrg) | html %]</p></div>

                                <label class="Mandatory" for="Value_[% Data.ValueCounter | html %]"><span class="Marker">*</span>[% Translate("Value") | html %]:</label>
                                <input name="Value_[% Data.ValueCounter | html %]" id="Value_[% Data.ValueCounter | html %]" class="DefaultValueItem Validate_Required W20pc [% Data.ValueError | html %]" type="text" maxlength="100" value="[% Data.Value | html %]"/>
                                <div id="Value_[% Data.ValueCounter | html %]Error" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                                <div id="Value_[% Data.ValueCounter | html %]ServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>

                                <a href="#" id="RemoveValue_[% Data.ValueCounter | html %]" class="RemoveButton ValueRemove"><i class="fa fa-minus-square-o"></i><span class="InvisibleText">[% Translate("Remove value") | html %]</span></a>
                                <div class="SpacingTopMini" ></div>
                            </div>
[% RenderBlockEnd("ValueRow") %]
[% RenderBlockStart("ValueTemplate") %]
                            <div class="ValueTemplate Hidden">
                                <label class="Mandatory" for="Key"><span class="Marker">*</span>[% Translate("Key") | html %]:</label>
                                <input name="Key_[% Data.ValueCounter | html %]" id="Key" class="DefaultValueKeyItem W20pc" type="text" maxlength="100" value="[% Data.Key | html %]"/>
                                <div id="KeyError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                                <div id="KeyServerError" class="TooltipErrorMessage"><p>[% Translate(Data.KeyErrorStrg) | html %]</p></div>

                                <label class="Mandatory" for="Value"><span class="Marker">*</span>[% Translate("Value") | html %]:</label>
                                <input name="Value_[% Data.ValueCounter | html %]" id="Value" class="DefaultValueItem W20pc" type="text" maxlength="100" value="[% Data.Value | html %]"/>
                                <div id="ValueError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                                <div id="ValueServerError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>

                                <a href="#" id="RemoveValue_[% Data.ValueCounter | html %]" class="RemoveButton ValueRemove"><i class="fa fa-minus-square-o"></i><span class="InvisibleText">[% Translate("Remove value") | html %]</span></a>
                                <div class="SpacingTopMini" ></div>
                            </div>
[% RenderBlockEnd("ValueTemplate") %]
                            <input type="hidden" name="DeletedValue" value="[% Data.DeletedString | html %]" id="DeletedValue" class="DeletedValue" />
                        </div>
                        <div class="Clear"></div>

                        <label for="AddValue">[% Translate("Add value") | html %]:</label>
                        <div class="Field">
                            <a href="#" id="AddValue" class="AddButton"><i class="fa fa-plus-square-o"></i><span class="InvisibleText">[% Translate("Add Value") | html %]</span></a>
                        </div>
                        <div class="Clear"></div>

                        <div class="SpacingTop"></div>
                        <label for="DefaultValue">[% Translate("Default value") | html %]:</label>
                        <div class="Field">
                            [% Data.DefaultValueStrg %]
                            <p class="FieldExplanation">[% Translate("This is the default value for this field.") | html %]</p>
                        </div>
                        <div class="Clear"></div>

                        <div class="SpacingTop"></div>
                        <label for="PossibleNone">[% Translate("Add empty value") | html %]:</label>
                        <div class="Field">
                            [% Data.PossibleNoneStrg %]
                            <p class="FieldExplanation">[% Translate("Activate this option to create an empty selectable value.") | html %]</p>
                        </div>
                        <div class="Clear"></div>

                        <div class="SpacingTop"></div>
                        <label for="TreeView">[% Translate("Tree View") | html %]:</label>
                        <div class="Field">
                            [% Data.TreeViewStrg %]
                            <p class="FieldExplanation">[% Translate("Activate this option to display values as a tree.") | html %]</p>
                        </div>
                        <div class="Clear"></div>

                        <label for="TranslatableValues">[% Translate("Translatable values") | html %]:</label>
                        <div class="Field">
                            [% Data.TranslatableValuesStrg %]
                            <p class="FieldExplanation">[% Translate("If you activate this option the values will be translated to the user defined language.") | html %]</p>
                            <p class="FieldExplanation"><strong>[% Translate("Note") | html %]: </strong>[% Translate("You need to add the translations manually into the language translation files.") | html %]</p>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>
                </div>
            </div>
            <fieldset class="TableLike">
                <div class="Field SpacingTop">
                    [% IF Data.Mode == 'Change' %]
                    <button class="Primary CallForAction" id="SubmitAndContinue" type="button" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
                    [% Translate("or") | html %]
                    <button class="Primary CallForAction" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save and finish") | html %]</span></button>
                    [% ELSE %]
                    <button class="Primary CallForAction" id="Submit" type="submit" value="[% Translate("Save") | html %]"><span>[% Translate("Save") | html %]</span></button>
                    [% END %]
                    [% Translate("or") | html %]
                    <a href="[% Env("Baselink") %]Action=AdminDynamicField">[% Translate("Cancel") | html %]</a>
                </div>
                <div class="Clear"></div>
            </fieldset>
        </form>
    </div>
</div>