[Rt-commit] rt branch, 4.6-theme/admin-queues-pages, updated. rt-4.4.4-205-ga4c595fdc
Blaine Motsinger
blaine at bestpractical.com
Tue Apr 30 18:50:53 EDT 2019
The branch, 4.6-theme/admin-queues-pages has been updated
via a4c595fdc5df418f096f8474379220600488f54a (commit)
from fbaa1ce66c66ae34840e1c5d3df128f265b23762 (commit)
Summary of changes:
share/html/Admin/Elements/ShowKeyInfo | 99 ++++++++++++---
share/html/Admin/Queues/Modify.html | 221 +++++++++++++++++++++++-----------
2 files changed, 227 insertions(+), 93 deletions(-)
- Log -----------------------------------------------------------------
commit a4c595fdc5df418f096f8474379220600488f54a
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Apr 30 17:50:15 2019 -0500
Migrate Admin/Queues/Modify to elevator themes
diff --git a/share/html/Admin/Elements/ShowKeyInfo b/share/html/Admin/Elements/ShowKeyInfo
index 9e2762fda..a12847417 100644
--- a/share/html/Admin/Elements/ShowKeyInfo
+++ b/share/html/Admin/Elements/ShowKeyInfo
@@ -45,7 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => $title &><table>
+<&| /Widgets/TitleBox, title => $title &>
+
% while ( my $protocol = shift @protocols ) {
% my %res = RT::Crypt->GetKeyInfo(
% Protocol => $protocol,
@@ -53,48 +54,106 @@
% Type => $Type,
% );
% if ( $res{'exit_code'} ) {
-<tr><th colspan="2"><% loc("Couldn't get [_1] keys information", $protocol) %></th></tr>
+<div class="form-row">
+ <div class="col-md-12">
+ <% loc("Couldn't get [_1] keys information", $protocol) %>
+ </div>
+</div>
% } elsif ( !keys %{ $res{'info'} } ) {
-<tr><th colspan="2"><% loc('No [_1] keys for this address', $protocol) %></th></tr>
+<div class="form-row">
+ <div class="col-md-12">
+ <% loc('No [_1] keys for this address', $protocol) %>
+ </div>
+</div>
% } else {
-
-<tr><th colspan="2"><% loc("[_1] key '[_2]'", $protocol, $res{'info'}{'Formatted'} ) %></th></tr>
+<div class="form-row">
+ <div class="col-md-12">
+ <% loc("[_1] key '[_2]'", $protocol, $res{'info'}{'Formatted'} ) %>
+ </div>
+</div>
% if ( $Type ne 'private' && $res{'info'}{'Trust'} ) {
-<tr><th class="label"><% loc('Trust') %>:</th> <td><% loc( $res{'info'}{'Trust'} ) %></td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('Trust') %>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><% loc( $res{'info'}{'Trust'} ) %></span>
+ </div>
+</div>
% }
-<tr><th class="label"><% loc('Fingerprint') %>:</th>
-<td><% $res{'info'}{'Fingerprint'} %></td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('Fingerprint') %>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><% $res{'info'}{'Fingerprint'} %></span>
+ </div>
+</div>
% $_->CurrentUser( $session{CurrentUser} ) for grep {$_} (@{$res{'info'}}{qw|Created Expire|});
-<tr><th class="label"><% loc('Created') %>:</th>
-<td><% $res{'info'}{'Created'}? $res{'info'}{'Created'}->AsString( Time => 0 ): loc('never') %></td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('Created') %>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control">
+ <% $res{'info'}{'Created'}? $res{'info'}{'Created'}->AsString( Time => 0 ): loc('never') %>
+ </span>
+ </div>
+</div>
-<tr><th class="label"><% loc('Expire') %>:</th>
-<td><% $res{'info'}{'Expire'}? $res{'info'}{'Expire'}->AsString( Time => 0 ): loc('never') %></td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('Expire') %>:
+ </div>
+ <div class="col-md-9 value">
+ <% $res{'info'}{'Expire'}? $res{'info'}{'Expire'}->AsString( Time => 0 ): loc('never') %>
+ </div>
+</div>
% foreach my $uinfo( @{ $res{'info'}{'User'} } ) {
% if ($uinfo->{'Created'} or $uinfo->{'Expire'}) {
% $_->CurrentUser( $session{CurrentUser} ) for grep {$_} ($uinfo->{'Created'}, $uinfo->{'Expire'});
-<tr><th class="label"><% loc('User (created - expire)') %>:</th>
-<td><% $uinfo->{'String'} %> \
-(<% $uinfo->{'Created'}? $uinfo->{'Created'}->AsString( Time => 0 ): loc('never') %> - \
-<% $uinfo->{'Expire'}? $uinfo->{'Expire'}->AsString( Time => 0 ): loc('never') %>)</td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('User (created - expire)') %>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control">
+ <% $uinfo->{'String'} %> \
+ (<% $uinfo->{'Created'}? $uinfo->{'Created'}->AsString( Time => 0 ): loc('never') %> - \
+ <% $uinfo->{'Expire'}? $uinfo->{'Expire'}->AsString( Time => 0 ): loc('never') %>)
+ </span>
+ </div>
+</div>
% } else {
-<tr><th class="label"><% loc('User') %>:</th>
-<td><% $uinfo->{'String'} %></td></tr>
+<div class="form-row">
+ <div class="col-md-3 label">
+ <% loc('User') %>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><% $uinfo->{'String'} %></span>
+ </div>
+</div>
+
% }
% }
% }
% if ( @protocols ) {
-<tr><th colspan="2"> </th></tr>
+<div class="form-row">
+ <div class="col-md-12">
+
+ </div>
+</div>
% }
% }
-</table></&>
+
+</&>
<%ARGS>
$EmailAddress
diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index 6a5a57029..5fbe8a880 100644
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -54,117 +54,192 @@
<form action="<%RT->Config->Get('WebPath')%>/Admin/Queues/Modify.html" name="ModifyQueue" method="post" enctype="multipart/form-data">
<input type="hidden" class="hidden" name="id" value="<% $Create? 'new': $QueueObj->Id %>" />
% $m->callback( CallbackName => 'FormStart', Create => $Create, ARGSRef => \%ARGS );
-<table>
-<tr><td align="right"><&|/l&>Queue Name</&>:</td><td colspan="3">
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Queue Name</&>:
+ </div>
+ <div class="col-md-9 value">
% if ($InternalQueue) {
-<% $QueueObj->Name %>
+ <% $QueueObj->Name %>
% } else {
-<input type="text" name="Name" value="<% $Create ? "" : $QueueObj->Name || $Name %>" />
+ <input type="text" class="form-control" name="Name" value="<% $Create ? "" : $QueueObj->Name || $Name %>" />
% }
-</td></tr>
+ </div>
+ </div>
-<tr><td align="right"><&|/l&>Description</&>:</td>
-<td colspan="3"><input type="text" name="Description" value="<% $Create ? "" : $QueueObj->Description || $Description || '' %>" size="60" /></td>
-</tr>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Description</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input type="text" class="form-control" name="Description" value="<% $Create ? "" : $QueueObj->Description || $Description || '' %>" size="60" />
+ </div>
+ </div>
-<tr><td align="right"><&|/l&>Lifecycle</&>:</td><td colspan="3">
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Lifecycle</&>:
+ </div>
+ <div class="col-md-9 value">
% if ($InternalQueue) {
-<% $QueueObj->Lifecycle %>
+ <% $QueueObj->Lifecycle %>
% } else {
-<& /Widgets/Form/Select:InputOnly,
- Name => 'Lifecycle',
- Values => [ sort { loc($a) cmp loc($b) } RT::Lifecycle->List ],
- CurrentValue => $Create ? "default" : $QueueObj->Lifecycle || $ARGS{'Lifecycle'},
- Default => 0,
-&>
+ <& /Widgets/Form/Select:InputOnly,
+ Name => 'Lifecycle',
+ Values => [ sort { loc($a) cmp loc($b) } RT::Lifecycle->List ],
+ CurrentValue => $Create ? "default" : $QueueObj->Lifecycle || $ARGS{'Lifecycle'},
+ Default => 0,
+ &>
% }
-</td></tr>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Subject Tag</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input type="text" class="form-control" name="SubjectTag" value="<% $ARGS{'SubjectTag'} || ($Create ? "" : $QueueObj->SubjectTag || '' ) %>" size="60" />
+ </div>
+ </div>
-<tr><td align="right"><&|/l&>Subject Tag</&>:</td>
-<td colspan="3"><input type="text" name="SubjectTag" value="<% $ARGS{'SubjectTag'} || ($Create ? "" : $QueueObj->SubjectTag || '' ) %>" size="60" /></td>
-</tr>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Sort Order</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input type="text" class="form-control" name="SortOrder" value="<% $Create ? 0 : $QueueObj->SortOrder || $SortOrder || 0 %>" size="60" />
+ </div>
+ </div>
-<tr><td align="right"><&|/l&>Sort Order</&>:</td>
-<td colspan="3"><input type="text" name="SortOrder" value="<% $Create ? 0 : $QueueObj->SortOrder || $SortOrder || 0 %>" size="60" /></td>
-</tr>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Reply Address</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input type="email" class="form-control" name="CorrespondAddress" value="<% $Create ? "" : $QueueObj->CorrespondAddress || $CorrespondAddress || '' %>" />
+ <br />
+ <span><em><&|/l , RT->Config->Get('CorrespondAddress')&>(If left blank, will default to [_1])</&></em></span>
+ </div>
-<tr><td align="right"><&|/l&>Reply Address</&>:</td>
-<td><input type="email" name="CorrespondAddress" value="<% $Create ? "" : $QueueObj->CorrespondAddress || $CorrespondAddress || '' %>" />
-<br /><span><em><&|/l , RT->Config->Get('CorrespondAddress')&>(If left blank, will default to [_1])</&></em></span></td>
-<td align="right"><&|/l&>Comment Address</&>:</td>
-<td><input type="email" name="CommentAddress" value="<% $Create ? "" : $QueueObj->CommentAddress || $CommentAddress || '' %>" />
-<br /><span><em><&|/l , RT->Config->Get('CommentAddress')&>(If left blank, will default to [_1])</&></em></span></td>
-</tr>
+ <div class="col-md-3 label">
+ <&|/l&>Comment Address</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input type="email" class="form-control" name="CommentAddress" value="<% $Create ? "" : $QueueObj->CommentAddress || $CommentAddress || '' %>" />
+ <br />
+ <span><em><&|/l , RT->Config->Get('CommentAddress')&>(If left blank, will default to [_1])</&></em></span>
+ </div>
+ </div>
-<tr><td align="right"><input type="checkbox" class="checkbox" id="SLAEnabled" name="SLAEnabled" value="1"
+ <div class="form-row">
+ <div class="col-md-12">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input checkbox" id="SLAEnabled" name="SLAEnabled" value="1"
% if ( $QueueObj->id && !$QueueObj->SLADisabled ) {
-checked="checked"
+ checked="checked"
% }
- /></td>
-<td colspan="3"><label for="SLAEnabled"><&|/l&>SLA Enabled (Unchecking this box disables SLA for this queue)</&></label><br />
-<input type="hidden" class="hidden" name="SetSLAEnabled" value="1" />
-</td></tr>
+ />
+ <label class="custom-control-label" for="SLAEnabled"><&|/l&>SLA Enabled (Unchecking this box disables SLA for this queue)</&></label>
+ <input type="hidden" class="hidden" name="SetSLAEnabled" value="1" />
+ </div>
+ </div>
+ </div>
% my $CFs = $QueueObj->CustomFields;
% while (my $CF = $CFs->Next) {
-<tr valign="top"><td align="right">
-<% $CF->Name %>:
-</td><td>
-<& /Elements/EditCustomField, CustomField => $CF,
- Object => $QueueObj, &>
-</td></tr>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <% $CF->Name %>:
+ </div>
+ <div class="col-md-9 value">
+ <& /Elements/EditCustomField, CustomField => $CF,
+ Object => $QueueObj, &>
+ </div>
+ </div>
% }
% if ( RT->Config->Get('Crypt')->{'Enable'} ) {
-<tr><td align="right"><input type="checkbox" class="checkbox" id="Sign" name="Sign" value="1" <% $QueueObj->Sign? 'checked="checked"': '' |n%> /></td>
-<td><label for="Sign"><&|/l&>Sign by default</&></label></td>
-<td align="right"><input type="checkbox" class="checkbox" id="Encrypt" name="Encrypt" value="1" <% $QueueObj->Encrypt? 'checked="checked"': '' |n%> /></td>
-<td><label for="Encrypt"><&|/l&>Encrypt by default</&></label></td>
-</tr>
-<tr><td align="right"><input type="checkbox" class="checkbox" id="SignAuto" name="SignAuto" value="1" <% $QueueObj->SignAuto? 'checked="checked"': '' |n%> /></td>
-<td colspan="3"><label for="SignAuto"><&|/l_unsafe, "<b>","</b>","<i>","</i>"&>Sign all auto-generated mail. [_1]Caution[_2]: Enabling this option alters the signature from providing [_3]authentication[_4] to providing [_3]integrity[_4].</&></label></td></tr>
+ <div class="form-row">
+ <div class="col-md-12">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input checkbox" id="Sign" name="Sign" value="1" <% $QueueObj->Sign? 'checked="checked"': '' |n%> />
+ <label class="custom-control-label" for="Sign"><&|/l&>Sign by default</&></label>
+ </div>
+ </div>
+
+ <div class="col-md-12">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input checkbox" id="Encrypt" name="Encrypt" value="1" <% $QueueObj->Encrypt? 'checked="checked"': '' |n%> />
+ <label class="custom-control-label" for="Encrypt"><&|/l&>Encrypt by default</&></label>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-12">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input checkbox" id="SignAuto" name="SignAuto" value="1" <% $QueueObj->SignAuto? 'checked="checked"': '' |n%> />
+ <label class="custom-control-label" for="SignAuto"><&|/l_unsafe, "<b>","</b>","<i>","</i>"&>Sign all auto-generated mail. [_1]Caution[_2]: Enabling this option alters the signature from providing [_3]authentication[_4] to providing [_3]integrity[_4].</&></label>
+ </div>
+ </div>
+ </div>
% }
% unless ($InternalQueue) {
-<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 queue)</&></label><br />
-<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+ <div class="form-row">
+ <div class="col-md-12">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" class="custom-control-input checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked|n%> />
+ <label class="custom-control-label" for="Sign"><&|/l&>Sign by default</&></label>
+ <input type="hidden" class="hidden" name="SetEnabled" value="1" />
% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results );
-</td></tr>
+ </div>
+ </div>
+ </div>
% }
% if ( RT->Config->Get('Crypt')->{'Enable'} ) {
-<tr><td colspan="4">
-<input type="hidden" class="hidden" name="SetCrypt" value="1" />
+ <div class="form-row">
+ <div class="col-md-12"> <% # colspan=4 %>
+ <input type="hidden" class="hidden" name="SetCrypt" value="1" />
% if ( my $email = $QueueObj->CorrespondAddress || RT->Config->Get('CorrespondAddress') ) {
-<& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
+ <& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
% } else {
-<&|/Widgets/TitleBox, title => loc( 'Private keys') &>
-<i><&|/l&>You have enabled encryption support but have not set a correspondence address for this queue.</&>
-<&|/l&>You must set a correspondence address for this queue in order to configure a private key.</&></i>
-</&>
+ <&|/Widgets/TitleBox, title => loc( 'Private keys') &>
+ <i><&|/l&>You have enabled encryption support but have not set a correspondence address for this queue.</&>
+ <&|/l&>You must set a correspondence address for this queue in order to configure a private key.</&></i>
+ </&>
% }
-</td></tr>
-<tr><td colspan="4">
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-12"> <% # colspan=4 %>
% if ( my $email = $QueueObj->CommentAddress || RT->Config->Get('CommentAddress') ) {
-<& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
+ <& /Admin/Elements/ShowKeyInfo, Type => 'private', EmailAddress => $email &>
% } else {
-<&|/Widgets/TitleBox, title => loc( 'Private keys') &>
-<i><&|/l&>You have enabled encryption support but have not set a comment address for this queue.</&>
-<&|/l&>You must set a comment address for this queue in order to configure a private key.</&></i>
-</&>
-%}
-</td></tr>
+ <&|/Widgets/TitleBox, title => loc( 'Private keys') &>
+ <i><&|/l&>You have enabled encryption support but have not set a correspondence address for this queue.</&>
+ <&|/l&>You must set a correspondence address for this queue in order to configure a private key.</&></i>
+ </&>
+% }
+ </div>
+ </div>
% }
-</table>
+ <div class="form-row">
+ <div class="col-md-12">
% if ( $Create ) {
-<& /Elements/Submit, Label => loc('Create') &>
+ <& /Elements/Submit, Label => loc('Create') &>
% } else {
-<& /Elements/Submit, Label => loc('Save Changes') &>
+ <& /Elements/Submit, Label => loc('Save Changes') &>
% }
-</form>
+ </div>
+ </div>
+</form>
<%INIT>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list