198 lines
12 KiB
Plaintext
198 lines
12 KiB
Plaintext
# --
|
|
# Copyright (C) 2001-2019 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="AdminDynamicFieldCheckbox">
|
|
<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 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>
|
|
</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>
|