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
|
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Agent = Core.Agent || {};
Core.Agent.Admin = Core.Agent.Admin || {};
/**
* @namespace
* @exports TargetNS as Core.Agent.Admin.Group
* @description
* This namespace contains the special module functions for AdminGroup.
*/
Core.Agent.Admin.Group = (function (TargetNS) {
/**
* @function
* @return nothing
* This function initializes the special module functions
*/
TargetNS.AdminGroupCheck = function () {
var NameValue = $('#GroupName').val(),
NameOldValue = $('#GroupOldName').val();
if (!NameOldValue || NameOldValue !== 'admin' || NameValue === 'admin') {
return true;
}
if (confirm([% Translate("WARNING: When you change the name of the group 'admin', before making the appropriate changes in the SysConfig, you will be locked out of the administrations panel! If this happens, please rename the group back to admin per SQL statement.") | JSON %])) {
return true;
}
else {
$('#GroupName').focus();
return false;
}
};
return TargetNS;
}(Core.Agent.Admin.Group || {}));
$('#Submit').bind('click', Core.Agent.Admin.Group.AdminGroupCheck);
//]]></script>
[% END %]
[% RenderBlockStart("Overview") %]
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
<h1>[% Translate("Group Management") | html %]</h1>
<div class="SidebarColumn">
[% RenderBlockStart("ActionList") %]
<div class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Actions") | html %]</h2>
</div>
<div class='Content'>
<ul class="ActionList">
[% RenderBlockStart("ActionAdd") %]
<li>
<form action="[% Env("CGIHandle") %]" method="post">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="Add"/>
<button class="CallForAction Fullsize Center" type="submit" value="[% Translate("Add") | html %]">
<span><i class="fa fa-plus-square"></i>[% Translate("Add group") | html %]</span>
</button>
</form>
</li>
[% RenderBlockEnd("ActionAdd") %]
[% RenderBlockStart("ActionOverview") %]
<li>
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]" class="CallForAction Fullsize Center"><span><i class="fa fa-caret-left"></i>[% Translate("Go to overview") | html %]</span></a>
</li>
[% RenderBlockEnd("ActionOverview") %]
</ul>
</div>
</div>
[% RenderBlockEnd("ActionList") %]
<div class="WidgetSimple">
<div class="Header">
<h2>[% Translate("Hint") | html %]</h2>
</div>
<div class="Content">
<p class="FieldExplanation">
[% Translate("The admin group is to get in the admin area and the stats group to get stats area.") | html %]
</p>
<p class="FieldExplanation">
[% Translate("Create new groups to handle access permissions for different groups of agent (e. g. purchasing department, support department, sales department, ...). ") | html %]
</p>
<p class="FieldExplanation">
[% Translate("It's useful for ASP solutions. ") | html %]
</p>
</div>
</div>
</div>
<div class="ContentColumn">
<div class="WidgetSimple">
[% RenderBlockStart("OverviewResult") %]
<div class="Header">
<h2>[% Translate("List") | html %] ([% Data.AllItemsCount | html %] [% Translate("total") | html %])</h2>
</div>
<div class="Content">
<table class="DataTable">
<thead>
<tr>
<th>[% Translate("Name") | html %]</th>
<th>[% Translate("Comment") | html %]</th>
<th>[% Translate("Validity") | html %]</th>
<th>[% Translate("Changed") | html %]</th>
<th>[% Translate("Created") | html %]</th>
</tr>
</thead>
<tbody>
[% RenderBlockStart("OverviewResultRow") %]
<tr [% IF Data.ValidID != 1 %]class="Invalid"[% END %]>
<td><a class="AsBlock" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=Change;ID=[% Data.ID | uri %]">[% Data.Name | html %]</a></td>
<td title="[% Data.Comment | html %]">[% Data.Comment | truncate(80) | html %]</td>
<td>[% Translate(Data.Valid) | html %]</td>
<td>[% Data.ChangeTime | Localize("TimeShort") %]</td>
<td>[% Data.CreateTime | Localize("TimeShort") %]</td>
</tr>
[% RenderBlockEnd("OverviewResultRow") %]
</tbody>
</table>
</div>
[% RenderBlockEnd("OverviewResult") %]
[% RenderBlockStart("OverviewUpdate") %]
<div class="Header">
[% RenderBlockStart("HeaderAdd") %]
<h2>[% Translate("Add Group") | html %]</h2>
[% RenderBlockEnd("HeaderAdd") %]
[% RenderBlockStart("HeaderEdit") %]
<h2>[% Translate("Edit Group") | html %]</h2>
[% RenderBlockEnd("HeaderEdit") %]
</div>
<div class="Content">
<form action="[% Env("CGIHandle") %]" method="post" name="GroupUpdate" class="Validate PreventMultipleSubmits">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="[% Data.Action | html %]Action"/>
<input type="hidden" name="ID" value="[% Data.ID | html %]"/>
<input type="hidden" name="NameOld" id="GroupOldName" value="[% Data.Name | html %]"/>
<fieldset class="TableLike">
<label class="Mandatory" for="GroupName"><span class="Marker">*</span> [% Translate("Name") | html %]:</label>
<div class="Field">
<input type="text" name="Name" id="GroupName" value="[% Data.Name | html %]" class="W50pc Validate_Required [% Data.GroupNameInvalid | html %]" maxlength="200"/>
<div id="GroupNameError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
<div id="GroupNameServerError" class="TooltipErrorMessage">
<p>[% Translate("This field is required.") | html %]</p>
</div>
</div>
<div class="Clear"></div>
<label for="ValidID">[% Translate("Validity") | html %]:</label>
<div class="Field">
[% Data.ValidOption %]
</div>
<div class="Clear"></div>
<label for="Comment">[% Translate("Comment") | html %]:</label>
<div class="Field">
<input type="text" name="Comment" id="Comment" value="[% Data.Comment | html %]" class="W50pc" maxlength="250"/>
</div>
<div class="Clear"></div>
<div class="Field SpacingTop">
<button class="Primary CallForAction" type="submit" id="Submit" value="[% Translate("Submit") | html %]"><span>[% Translate("Submit") | html %]</span></button>
[% Translate("or") | html %]
<a href="[% Env("Baselink") %]Action=[% Env("Action") %]">[% Translate("Cancel") | html %]</a>
</div>
<div class="Clear"></div>
</fieldset>
</form>
</div>
[% RenderBlockEnd("OverviewUpdate") %]
</div>
</div>
<div class="Clear"></div>
</div>
[% RenderBlockEnd("Overview") %]
|