[Rt-commit] rt branch, 4.6-theme/admin-customrole-pages, created. rt-4.4.4-216-gea5c4fd67
Craig Kaiser
craig at bestpractical.com
Mon May 13 11:10:12 EDT 2019
The branch, 4.6-theme/admin-customrole-pages has been created
at ea5c4fd67c509d22b2575773fa3c55b0dfe5372c (commit)
- Log -----------------------------------------------------------------
commit ea5c4fd67c509d22b2575773fa3c55b0dfe5372c
Author: Craig Kaiser <craig at bestpractical.com>
Date: Mon May 13 08:51:35 2019 -0400
Migrate admin custom roles pages to elevator theme
diff --git a/share/html/Admin/CustomRoles/Modify.html b/share/html/Admin/CustomRoles/Modify.html
index b596f6f3c..17270d020 100644
--- a/share/html/Admin/CustomRoles/Modify.html
+++ b/share/html/Admin/CustomRoles/Modify.html
@@ -54,45 +54,72 @@
<form action="<%RT->Config->Get('WebPath')%>/Admin/CustomRoles/Modify.html" name="ModifyCustomRole" method="post" enctype="multipart/form-data">
<input type="hidden" class="hidden" name="id" value="<% $Create ? 'new': $RoleObj->Id %>" />
% $m->callback( CallbackName => 'FormStart', Create => $Create, ARGSRef => \%ARGS );
-<table>
-<tr><td align="right"><&|/l&>Role Name</&>:</td><td colspan="3">
-<input type="text" name="Name" value="<% $Create ? "" : $RoleObj->Name || $Name %>" />
-</td></tr>
-<tr><td align="right"><&|/l&>Description</&>:</td>
-<td colspan="3"><input type="text" name="Description" value="<% $Create ? "" : $RoleObj->Description || $Description || '' %>" size="60" /></td>
-</tr>
-
-<tr><td align="right"><&|/l&>Entry Hint</&>:</td>
-<td colspan="3"><input type="text" name="EntryHint" value="<% $Create ? "" : $RoleObj->EntryHint || $EntryHint || '' %>" size="60" /></td>
-</tr>
-
-<tr><td align="right"><input type="checkbox" class="checkbox" id="Multiple" name="Multiple" value="1"
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Role Name</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Name" value="<% $Create ? "" : $RoleObj->Name || $Name %>" />
+ </div>
+</div>
+
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Description</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Description" value="<% $Create ? "" : $RoleObj->Description || $Description || '' %>" size="60" />
+ </div>
+</div>
+
+<div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Entry Hint</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="EntryHint" value="<% $Create ? "" : $RoleObj->EntryHint || $EntryHint || '' %>" size="60" />
+ </div>
+</div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="Multiple" name="Multiple" value="1"
% if ( $Create || $RoleObj->UnlimitedValues ) {
checked="checked"
% }
% if ( !$Create ) {
disabled="disabled"
% }
- /></td>
-<td colspan="3"><label for="Multiple">
+ />
+ <label class="custom-control-label" for="Multiple">
% if ( $Create ) {
<&|/l&>Multiple users (Unchecking this box limits this role to a single user. This cannot be modified after creation)</&>
% } else {
<&|/l&>Multiple users (This cannot be modified after creation)</&>
% }
-</label><br />
-
-<input type="hidden" class="hidden" name="SetMultiple" value="1" />
-</td></tr>
-
-<tr><td align="right"><input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked|n%> /></td>
-<td colspan="3"><label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this custom role)</&></label><br />
-<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+ </label>
+ </div>
+ </div>
+ </div>
+
+ <br />
+
+ <input type="hidden" class="hidden" name="SetMultiple" value="1" />
+
+<div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input" id="Enabled" name="Enabled" value="1" <%$EnabledChecked|n%> />
+ <label class="custom-control-label" for="Enabled"><&|/l&>Enabled (Unchecking this box disables this custom role)</&></label><br />
+ </div>
+ <input type="hidden" class="hidden" name="SetEnabled" value="1" />
% $m->callback( %ARGS, RoleObj => $RoleObj, results => \@results );
-</td></tr>
-
-</table>
+ </div>
+</div>
% if ( $Create ) {
<& /Elements/Submit, Label => loc('Create') &>
diff --git a/share/html/Admin/CustomRoles/index.html b/share/html/Admin/CustomRoles/index.html
index 201c10ac4..e9e4b0929 100644
--- a/share/html/Admin/CustomRoles/index.html
+++ b/share/html/Admin/CustomRoles/index.html
@@ -56,25 +56,42 @@
<input type="hidden" name="<% $field %>" value="<% $ARGS{ $field } %>" />
% }
-<select name="SearchField">
+<div class="form-row">
+ <div class="col-md-auto">
+ <select class="form-control selectpicker" name="SearchField">
% foreach my $col (qw(Name Description EntryHint)) {
-<option <% $SearchField eq $col ? 'selected="selected"' : '' |n %> value="<% $col %>"><% loc($col) %></option>
+ <option <% $SearchField eq $col ? 'selected="selected"' : '' |n %> value="<% $col %>"><% loc($col) %></option>
% }
-</select>
-<& /Elements/SelectMatch, Name => 'SearchOp', Default => $SearchOp &>
-<input type="text" size="8" name="SearchString" value="<% $SearchString %>" />
-<br />
+ </select>
+ </div>
+ <div class="col-md-auto">
+ <& /Elements/SelectMatch, Name => 'SearchOp', Default => $SearchOp &>
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control" type="text" size="8" name="SearchString" value="<% $SearchString %>" />
+ </div>
+</div>
-<input type="checkbox" class="checkbox" id="FindDisabled" name="FindDisabled" value="1" <% $FindDisabled? 'checked="checked"': '' |n%> />
-<label for="FindDisabled"><&|/l&>Include disabled custom roles in listing.</&></label>
-<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+<div class="form-row">
+ <div class="custom-control custom-checkbox form-row">
+ <input type="checkbox" class="custom-control-input" id="FindDisabled" name="FindDisabled" value="1" <% $FindDisabled? 'checked="checked"': '' |n%> />
+ <label class="custom-control-label" for="FindDisabled"><&|/l&>Include disabled custom roles in listing.</&></label>
+ </div>
+</div>
+
+
+<div class="form-row">
+ <div class="col-md-12 text-right">
+ <input type="submit" class="button btn btn-sm" value="<&|/l&>Go!</&>" />
+ </div>
+</div>
</form>
-<p><&|/l&>Select a custom role</&>:</p>
+ <p><&|/l&>Select a custom role</&>:</p>
% unless ( $roles->Count ) {
-<em><&|/l&>No custom roles matching search criteria found.</&></em>
+ <em><&|/l&>No custom roles matching search criteria found.</&></em>
% } else {
-<& /Elements/CollectionList,
+ <& /Elements/CollectionList,
OrderBy => 'Name',
Order => 'ASC',
Rows => $Rows,
@@ -86,9 +103,9 @@
Format Rows Page Order OrderBy
FindDisabled SearchString SearchOp SearchField
)],
-&>
+ &>
% }
-
+</div>
<%INIT>
my $title = loc("Select a Custom Role");
-----------------------------------------------------------------------
More information about the rt-commit
mailing list