244 lines
14 KiB
Plaintext
244 lines
14 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.
|
|
# --
|
|
|
|
[% SET global.ClassicPreferenceCounter = 0 %]
|
|
|
|
[% RenderBlockStart("Body") %]
|
|
<div class="MainBox LayoutFixedSidebar SidebarFirst ARIARoleMain">
|
|
|
|
<h1 class="InvisibleText">[% Translate("Edit your preferences") | html %]</h1>
|
|
|
|
[% BreadcrumbPath = [
|
|
{
|
|
Name => Translate('Personal Preferences'),
|
|
Link => Env("Action") _ Data.EditingAnotherAgent,
|
|
},
|
|
{
|
|
Name => Translate(Data.GroupName),
|
|
Link => Env("Action") _ ";Subaction=Group;Group=" _ Data.GroupKey _ Data.EditingAnotherAgent,
|
|
},
|
|
]
|
|
%]
|
|
[% FOREACH Item IN Data.Path %]
|
|
[% BreadcrumbPath.push({ Name => Item.Name, Link => 'AgentPreferences;Subaction=Group;Group=Advanced;RootNavigation=' _ Item.Value }) %]
|
|
[% END %]
|
|
[% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath Type = 'Agent' %]
|
|
|
|
<input type="hidden" id="Group" value="[% Data.GroupKey %]" />
|
|
<input type="hidden" id="CurrentUserID" value="[% Data.CurrentUserID %]" />
|
|
|
|
<div class="SidebarColumn">
|
|
<div class="WidgetSimple">
|
|
<div class="Header">
|
|
<h2>[% Translate("Preferences") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
[% IF Data.EditingAnotherAgent %]
|
|
<div class="WidgetMessage Top Warning">
|
|
<p>[% Translate("Please note: you're currently editing the preferences of %s.", Data.CurrentUserFullname) | html %]</p>
|
|
</div>
|
|
<ul class="ActionList">
|
|
<li>
|
|
<a href="[% Env("Baselink") %]Action=AdminUser;Subaction=Change;UserID=[% Data.CurrentUserID | html %]" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i>[% Translate("Go back to editing this agent") | html %]</span></a>
|
|
</li>
|
|
</ul>
|
|
[% ELSE %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("Set up your personal preferences. Save each setting by clicking the checkmark on the right.") | html %]
|
|
</p>
|
|
[% IF Data.Navigation %]
|
|
<p class="FieldExplanation">
|
|
[% Translate("You can use the navigation tree below to only show settings from certain groups.") | html %]
|
|
</p>
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
[% IF Data.Navigation %]
|
|
[% INCLUDE "SystemConfiguration/Sidebar/Navigation.tt" %]
|
|
[% END %]
|
|
|
|
<div class="WidgetSimple StickyElement [% IF Env("UserWidgetState_SystemConfiguration_Sticky") == 0 %]Collapsed[% END %] Hidden" id="UserWidgetState_SystemConfiguration_Sticky">
|
|
<div class="Header">
|
|
<div class="WidgetAction Toggle">
|
|
<a href="#" title="[% Translate("Toggle this widget") | html %]"><i class="fa fa-caret-right"></i><i class="fa fa-caret-down"></i></a>
|
|
</div>
|
|
<h2>[% Translate("Dynamic Actions") | html %]</h2>
|
|
</div>
|
|
<div class="Content">
|
|
<input type="text" autocomplete="off" id="FilterSettings" class="FilterBox" placeholder="[% Translate("Filter settings...") | html %]" name="FilterSettings" value="" title="[% Translate("Filter for settings") | html %]">
|
|
<ul class="ActionList">
|
|
<li>
|
|
<a href="#" id="SaveAll" class="CallForAction Fullsize Center"><span><i class="fa fa-check"></i>[% Translate("Save all settings") | html %]</span></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ContentColumn">
|
|
|
|
<ul class="SettingsList Preferences">
|
|
[% RenderBlockStart("Item") %]
|
|
[% SET global.ClassicPreferenceCounter = 1 %]
|
|
<li>
|
|
<form action="[% Env("CGIHandle") %]" enctype="multipart/form-data" method="post" class="Validate">
|
|
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
|
|
<input type="hidden" name="Subaction" value="UpdateAJAXComplex"/>
|
|
<input type="hidden" name="EditUserID" value="[% Data.EditUserID | html %]"/>
|
|
<input type="hidden" name="Group" value="[% Data.Group | html %]"/>
|
|
|
|
<div class="WidgetSimple [% IF Data.Block == 'Avatar' && Config("Frontend::AvatarEngine") != 'Local' %]ReadOnly[% END %] IsLockedByMe Setting PreferenceClassic">
|
|
<div class="Header"><h2><label for="[% Data.PrefKey | html %]">[% Translate(Data.Label) | html %]</label></h2></div>
|
|
<div class="Content">
|
|
<div class="SettingWrapper">
|
|
<fieldset class="TableLike">
|
|
[% RenderBlockStart("Block") %]
|
|
[% RenderBlockStart("InputKey") %]
|
|
<label for="[% Data.Name | html %]">[% Translate(Data.Key) | html %]:</label>
|
|
<div class="Field">
|
|
<input type="text" name="[% Data.Name | html %]" id="[% Data.Name | html %]" value="[% Data.SelectedID | html %]" />
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("InputKey") %]
|
|
[% RenderBlockStart("Input") %]
|
|
<label for="[% Data.Name | html %]">[% Translate(Data.Key) | html %]:</label>
|
|
<div class="Field">
|
|
<input type="text" name="[% Data.Name | html %]" id="[% Data.Name | html %]" value="[% Data.SelectedID | html %]" />
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("Input") %]
|
|
[% RenderBlockStart("Option") %]
|
|
[% IF Data.Key %]
|
|
<label for="[% Data.Name | html %]">[% Translate(Data.Key) | html %]:</label>
|
|
[% END %]
|
|
<div class="Field[% IF !Data.Key %] NoMargin[% END %]">
|
|
[% Data.Option %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("Option") %]
|
|
[% RenderBlockStart("Upload") %]
|
|
<label for="[% Data.Name | html %]">[% Translate(Data.Key) | html %]:</label>
|
|
<div class="Field">
|
|
<input name="[% Data.Name | html %]" id="[% Data.Name | html %]" type="file" size="20" class="fixed"/>
|
|
<br/>
|
|
<a href="">[% Data.Filename | html %]</a>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("Upload") %]
|
|
[% RenderBlockStart("Avatar") %]
|
|
[% IF Data.AvatarEngine == 'None' %]
|
|
<div class="Field NoMargin">
|
|
[% Translate("Avatars have been disabled by the system administrator. You'll see your initials instead.") | html %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% ELSIF Data.AvatarEngine == 'Gravatar' %]
|
|
<div class="Field NoMargin PreferenceAvatar">
|
|
<a href="https://www.gravatar.com" target="_blank"><img src="[% Data.Avatar %]" /></a>
|
|
[%
|
|
SET GravatarLink = '<a href="https://www.gravatar.com" target="_blank"><i class="fa fa-external-link"></i> gravatar.com</a>';
|
|
SET GravatarEmail = '<strong>' _ Env("UserEmail") _ '</strong>';
|
|
%]
|
|
[% Translate("You can change your avatar image by registering with your email address %s at %s. Please note that it can take some time until your new avatar becomes available because of caching.") | html | ReplacePlaceholders(GravatarEmail, GravatarLink) %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% END %]
|
|
[% RenderBlockEnd("Avatar") %]
|
|
[% RenderBlockStart("Password") %]
|
|
<label for="[% Data.Name | html %]">[% Translate(Data.Key) | html %]:</label>
|
|
<div class="Field">
|
|
<input name="[% Data.Name | html %]" id="[% Data.Name | html %]" type="password" [% IF Data.Autocomplete %]autocomplete="[% Data.Autocomplete | html %]"[% END %] />
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("Password") %]
|
|
[% RenderBlockStart("OutOfOffice") %]
|
|
<div class="Row OutOfOffice">
|
|
<p class="FieldExplanation">[% Translate(Data.Key) | html %]</p>
|
|
<label>[% Translate("Active") | html %]:</label>
|
|
<div class="Field">
|
|
<input type="radio" name="OutOfOffice" id="OutOfOfficeOn" value="1" [% Data.OutOfOfficeOn %] />
|
|
<label for="OutOfOfficeOn">[% Translate("On") | html %]</label>
|
|
<input type="radio" name="OutOfOffice" id="OutOfOfficeOff" value="0" [% Data.OutOfOfficeOff %] />
|
|
<label for="OutOfOfficeOff">[% Translate("Off") | html %]</label>
|
|
</div>
|
|
<div class="Clear"></div>
|
|
<label>[% Translate("Start") | html %]:</label>
|
|
<div class="Field">
|
|
[% Data.OptionStart %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
<label>[% Translate("End") | html %]:</label>
|
|
<div class="Field">
|
|
[% Data.OptionEnd %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
</div>
|
|
[% RenderBlockEnd("OutOfOffice") %]
|
|
[% RenderBlockStart("RawHTML") %]
|
|
<div class="Field NoMargin">
|
|
[% Data.HTML %]
|
|
</div>
|
|
<div class="Clear"></div>
|
|
[% RenderBlockEnd("RawHTML") %]
|
|
[% RenderBlockEnd("Block") %]
|
|
|
|
<div class="SettingUpdateBox">
|
|
[% IF Data.Block == 'Avatar' && Config("Frontend::AvatarEngine") != 'Local' %]
|
|
<button class="CallForAction Disabled" type="button" value="[% Translate("This setting can currently not be saved.") | html %]" title="[% Translate("This setting can currently not be saved") | html %]">
|
|
<span><i class="fa fa-check"></i></span>
|
|
</button>
|
|
[% ELSE %]
|
|
<button class="CallForAction Update" type="button" value="[% Translate("Save this setting") | html %]" title="[% Translate("Save this setting") | html %]">
|
|
<span><i class="fa fa-check"></i></span>
|
|
</button>
|
|
[% END %]
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<div class="SettingDescription">
|
|
[% Translate(Data.Desc) | html %]
|
|
[% IF Data.Label == 'Language' %]
|
|
[% Translate("Did you know? You can help translating OTRS at %s.") | html | ReplacePlaceholders('<a href="https://www.transifex.com/otrs/OTRS/" target="_blank">Transifex</a>') %]
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</li>
|
|
[% RenderBlockEnd("Item") %]
|
|
[% IF Data.SettingList.size() %]
|
|
[% INCLUDE "AgentPreferences/SettingsList.tt" %]
|
|
[% END %]
|
|
</ul>
|
|
|
|
[% IF !global.ClassicPreferenceCounter && !Data.SettingList.size() %]
|
|
<div class="WidgetSimple">
|
|
<div class="Content">
|
|
[% IF !Data.RootNavigation %]
|
|
<ul class="GettingStarted LittlePadding">
|
|
<li>
|
|
<i class="fa fa-code-fork"></i>
|
|
<p>
|
|
[% Translate("Navigate through the available settings by using the tree in the navigation box on the left side.") | html %]
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
[% ELSE %]
|
|
<p class="Center">[% Translate("This group doesn't contain any settings. Please try navigating to one of its sub groups.") | html %]</p>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
[% RenderBlockEnd("Body") %]
|