[Rt-commit] rt branch, 4.6-theme/dashboards-pages, created. rt-4.4.4-202-g2dda1cdaf

Craig Kaiser craig at bestpractical.com
Wed May 8 12:42:16 EDT 2019


The branch, 4.6-theme/dashboards-pages has been created
        at  2dda1cdaf02224f0f3ab824fc084d3991a62a2bf (commit)

- Log -----------------------------------------------------------------
commit 2dda1cdaf02224f0f3ab824fc084d3991a62a2bf
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Mon Apr 29 15:43:20 2019 -0400

    Migrate dashboards pages to elevator theme

diff --git a/share/html/Dashboards/Elements/SelectPrivacy b/share/html/Dashboards/Elements/SelectPrivacy
index b0148a29f..d6b3112b2 100644
--- a/share/html/Dashboards/Elements/SelectPrivacy
+++ b/share/html/Dashboards/Elements/SelectPrivacy
@@ -50,7 +50,7 @@
 $Name => undef
 $Default => undef
 </%args>
-<select name="<%$Name%>">
+<select class="form-control selectpicker" name="<%$Name%>">
 <%perl>
 foreach my $object (@Objects) {
     my $privacy = ref($object) . '-' . $object->id;
diff --git a/share/html/Dashboards/Elements/SubscriptionRecipients b/share/html/Dashboards/Elements/SubscriptionRecipients
index 1f83d4c43..8d0af275e 100644
--- a/share/html/Dashboards/Elements/SubscriptionRecipients
+++ b/share/html/Dashboards/Elements/SubscriptionRecipients
@@ -86,141 +86,140 @@ if ($GroupString) {
 }
 </%INIT>
 
-<table>
-<tr>
-<td>
-
-<table width="100%">
-<tr>
-<td valign="top">
-<&|/l&>Find people whose</&><br />
+<div class="form-row">
+  <&|/l&>Find people whose</&>
 % if ($UserString) {
-<& /Elements/SelectUsers, UserString => $UserString, UserField => $UserField, UserOp => $UserOp &>
+  <& /Elements/SelectUsers, UserString => $UserString, UserField => $UserField, UserOp => $UserOp &>
 % } else {
-<& /Elements/SelectUsers &>
+  <& /Elements/SelectUsers &>
 % }
-<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+  <input type="submit" class="form-control btn btn-primary" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" />
+</div>
 
-<br />
-
-<&|/l&>Find groups whose</&><br />
+<div class="form-row">
+  <&|/l&>Find groups whose</&>
 % if ($GroupString) {
-<& /Elements/SelectGroups, GroupString => $GroupString, GroupField => $GroupField, GroupOp => $GroupOp &>
+  <& /Elements/SelectGroups, GroupString => $GroupString, GroupField => $GroupField, GroupOp => $GroupOp &>
 % } else {
-<& /Elements/SelectGroups &>
+  <& /Elements/SelectGroups &>
 % }
-<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
-</td>
-</tr>
-</table>
+  <input type="submit" class="form-control btn btn-primary" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" />
+</div>
+
 
-<br/>
 <&|/l&>Add New Recipients</&>:
-<table>
 
 % if ( $Users && $Users->Count ) {
-<tr><td></td><td>
-<&|/l&>User</&>
-</tr></td>
+  <div class="form-row">
+    <&|/l&>User</&>
+  </div>
 % while ( my $u = $Users->Next ) {
-<tr><td>
-<input type="checkbox" class="checkbox" name="Dashboard-Subscription-Users-<%$u->id%>" value="1" />
-</td><td>
-<input type="hidden" name="Dashboard-Subscription-Users-<%$u->id%>" value="0" />
-<& '/Elements/ShowUser', User => $u, style=>'verbose' &>
-</td></tr>
+    <div class="form-row">
+      <div class="custom-control custom-checkbox">
+        <input type="checkbox" class="custom-control-input" id="Dashboard-Subscription-Users-<%$u->id%>" name="Dashboard-Subscription-Users-<%$u->id%>" value="1" />
+        <label class="custom-control-label" for="Dashboard-Subscription-Users-<%$u->id%>"><& '/Elements/ShowUser', User => $u, style=>'verbose' &></label>
+      </div>
+      <input type="hidden" name="Dashboard-Subscription-Users-<%$u->id%>" value="0" />
+    </div>
 % }
 % }
 
 % if ( $Groups && $Groups->Count ) {
-<tr><td></td><td>
-<&|/l&>Group</&>
-</tr></td>
+  <div class="form-row">
+    <&|/l&>Group</&>
+  </div>
 % while ( my $g = $Groups->Next ) {
-<tr><td>
-<input type="checkbox" class="checkbox" name="Dashboard-Subscription-Groups-<%$g->id%>" value="1" />
-</td><td>
-<input type="hidden" name="Dashboard-Subscription-Groups-<%$g->id%>" value="0" />
-<%$g->Name%> (<%$g->Description%>)
-</td></tr>
+  <div class="custom-control custom-checkbox">
+    <input type="checkbox" class="custom-control-input" id="Dashboard-Subscription-Groups-<%$g->id%>" name="Dashboard-Subscription-Groups-<%$g->id%>" value="1" />
+    <label class="custom-control-label" for="Dashboard-Subscription-Groups-<%$g->id%>"><%$g->Name%> (<%$g->Description%>)</label>
+
+  <input type="hidden" name="Dashboard-Subscription-Groups-<%$g->id%>" value="0" />
 % }
 % }
-
-<tr><td></td><td>
-<&|/l&>Email</&>
-</tr></td>
-
+<div class="form-row">
+  <&|/l&>Email</&>
+</div>
 % for my $i (1 .. 3) {
-<tr><td></td><td>
-<& /Elements/EmailInput, Name => 'Dashboard-Subscription-Email-' . $i, Size => '20' &>
-</td></tr>
+  <div class="col-md-4">
+    <& /Elements/EmailInput, Name => 'Dashboard-Subscription-Email-' . $i, Size => '20' &>
+  </div>
 % }
 
-</table>
-
-</td>
-<td class="current-recipients">
-
 <&|/l&>Current Recipients</&>:
 
-<ul>
+<ul class="list-group">
 % my $current_user_id = $session{CurrentUser}->id;
 % my $current_user_subscribed = $recipients_users && grep { $_ == $current_user_id } @$recipients_users;
-<li>
-<input type="checkbox" class="checkbox" name="Dashboard-Subscription-Users-<%$current_user_id%>" value="1" <% $current_user_subscribed || $IsFirstSubscription ? 'checked' : '' %> />
-<input type="hidden" name="Dashboard-Subscription-Users-<%$current_user_id%>" value="0" />
+  <li class="list-item">
+    <div class="custom-control custom-checkbox">
+      <input type="checkbox" class="custom-control-input" id="Dashboard-Subscription-Users-<%$current_user_id%>" name="Dashboard-Subscription-Users-<%$current_user_id%>" value="1" <% $current_user_subscribed || $IsFirstSubscription ? 'checked' : '' %> />
+      <input type="hidden" name="Dashboard-Subscription-Users-<%$current_user_id%>" value="0" />
 % if ( $session{CurrentUser}->HasRight( Right => 'AdminUsers', Object => $RT::System ) &&
 %      $session{CurrentUser}->HasRight( Right => 'ShowConfigTab', Object =>$RT::System ) ) {
-<a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $current_user_id %>">
-<& /Elements/ShowUser, User => $session{CurrentUser} &></a>
+
+      <label class="custom-control-label" for="Dashboard-Subscription-Users-<%$current_user_id%>">
+        <a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $current_user_id %>">
+          <& /Elements/ShowUser, User => $session{CurrentUser} &>
+        </a>
+      </label>
 % } else {
-<& /Elements/ShowUser, User => $session{CurrentUser} &>
+      <label class="custom-control-label" for="Dashboard-Subscription-Users-<%$current_user_id%>">
+        <& /Elements/ShowUser, User => $session{CurrentUser} &>
+      </label>
 % }
-<& /Elements/ShowUserEmailFrequency, User => $session{CurrentUser} &>
-</li>
+    </div>
+    <& /Elements/ShowUserEmailFrequency, User => $session{CurrentUser} &>
+  </li>
 
 % for my $user_id (@{ $recipients_users || [] }) {
 % next if $user_id == $session{'CurrentUser'}->id; # already listed current user
 % my $user = RT::User->new( $session{'CurrentUser'} );
 % $user->Load($user_id);
 % next unless $user->id and !$user->Disabled;
-<li>
-<input type="checkbox" class="checkbox" name="Dashboard-Subscription-Users-<%$user_id%>" value="1" checked />
-<input type="hidden" name="Dashboard-Subscription-Users-<%$user_id%>" value="0" />
+  <li class="list-item">
+    <div class="custom-control custom-checkbox">
+      <input type="checkbox" class="custom-control-input" id="Dashboard-Subscription-Users-<%$user_id%>" name="Dashboard-Subscription-Users-<%$user_id%>" value="1" checked />
+      <input type="hidden" name="Dashboard-Subscription-Users-<%$user_id%>" value="0" />
 % if ( $session{CurrentUser}->HasRight( Right => 'AdminUsers', Object => $RT::System ) &&
 %      $session{CurrentUser}->HasRight( Right => 'ShowConfigTab', Object =>$RT::System ) ) {
-<a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $user_id %>">
-<& /Elements/ShowUser, User => $user &></a>
+      <label class="custom-control-label" for="Dashboard-Subscription-Users-<%$user_id%>">
+        <a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $user_id %>">
+          <& /Elements/ShowUser, User => $user &>
+        </a>
+      </label>
 % } else {
-<& /Elements/ShowUser, User => $user &>
+      <label class="custom-control-label" for="Dashboard-Subscription-Users-<%$user_id%>">
+        <& /Elements/ShowUser, User => $user &>
+      </label>
 % }
-<& /Elements/ShowUserEmailFrequency, User => $user &>
-</li>
+      </div>
+    <& /Elements/ShowUserEmailFrequency, User => $user &>
+  </li>
 % }
 
 % for my $group_id (@{ $recipients_groups || [] }) {
 % my $group = RT::Group->new( $session{'CurrentUser'} );
 % $group->Load($group_id);
 % next unless $group->id and !$group->Disabled;
-<li>
-<input type="checkbox" class="checkbox" name="Dashboard-Subscription-Groups-<%$group_id%>" value="1" checked />
-<input type="hidden" name="Dashboard-Subscription-Groups-<%$group_id%>" value="0" />
-
+  <li class="list-item">
+    <div class="custom-control custom-checkbox">
+      <input type="checkbox" class="custom-control-input" id="Dashboard-Subscription-Groups-<%$group_id%>" name="Dashboard-Subscription-Groups-<%$group_id%>" value="1" checked />
+      <input type="hidden" name="Dashboard-Subscription-Groups-<%$group_id%>" value="0" />
 
 % if ( $session{CurrentUser}->HasRight( Right => 'AdminGroup', Object => $RT::System ) &&
 %      $session{CurrentUser}->HasRight( Right => 'ShowConfigTab', Object =>$RT::System ) ) {
-<a href="<% RT->Config->Get('WebPath') %>/Admin/Groups/Modify.html?id=<% $group_id %>">
-<% $group->Name %>
-</a>
+      <label class="custom-control-label" for="Dashboard-Subscription-Groups-<%$group_id%>">
+        <a href="<% RT->Config->Get('WebPath') %>/Admin/Groups/Modify.html?id=<% $group_id %>">
+          <% $group->Name %>
+        </a>
+      </label>
 % } else {
-<% $group->Name %>
+      <label class="custom-control-label" for="Dashboard-Subscription-Groups-<%$group_id%>">
+        <% $group->Name %>
+      </label>
 % }
-</li>
+    </div>
+  </li>
 % }
 
 </ul>
-
-</td>
-</tr>
-</table>
-
diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 5696dc12b..c871c6b76 100644
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -58,21 +58,38 @@
 % }
 
 <&|/Widgets/TitleBox, title => loc('Basics') &>
-<table>
-    <tr>
-     <td class="label"><&|/l&>Name</&>:</td>
-     <td class="value"><input type="text" name="Name" value="<%$Dashboard->Name%>" /></td>
-    </tr>
-    <tr>
-    <td class="label"><&|/l&>Privacy</&>:</td>
-    <td><& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &></td>
-</tr>
-</table>
+
+  <div class="form-row">
+    <div class="label col-md-3">
+      <&|/l&>Name</&>:
+    </div>
+    <div class="col-md-9 value">
+        <span class="current-value form-control"><input class="form-control" type="text" name="Name" value="<%$Dashboard->Name%>" /></span>
+    </div>
+  </div>
+
+  <div class="form-row">
+    <div class="label col-md-3">
+      <&|/l&>Privacy</&>:
+    </div>
+    <div class="col-md-9 value">
+      <& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &>
+    </div>
+  </div>
 </&>
-<& /Elements/Submit, Name => 'Save', Label =>( $Create ? loc('Create') : loc('Save Changes') ) &>
+
+  <div class="form-row">
+    <div class="col-md-12">
+      <& /Elements/Submit, Name => 'Save', Label =>( $Create ? loc('Create') : loc('Save Changes') ) &>
+    </div>
+  </div>
 
 % if ($Dashboard->Id && $can_delete) {
-<& /Elements/Submit, Name => 'Delete', Label => loc('Delete') &>
+  <div class="form-row">
+    <div class="col-md-12">
+      <& /Elements/Submit, Name => 'Delete', Label => loc('Delete') &>
+    </div>
+  </div>
 % }
 </form>
 <%INIT>
diff --git a/share/html/Dashboards/Queries.html b/share/html/Dashboards/Queries.html
index c7c6b240d..8e3b89bfc 100644
--- a/share/html/Dashboards/Queries.html
+++ b/share/html/Dashboards/Queries.html
@@ -54,22 +54,21 @@
 
 <& Elements/HiddenSearches, searches => \@hidden_searches, Dashboard => $Dashboard &>
 
-<table width="100%" border="0">
 % for my $pane (@panes) {
-<tr><td valign="top" class="boxcontainer">
-<form action="Queries.html" name="Dashboard-<%$pane->{Name}%>" method="post" enctype="multipart/form-data">
-<input type="hidden" class="hidden" name="id" value="<%$Dashboard->Id%>" />
-<input type="hidden" class="hidden" name="Privacy" value="<%$Dashboard->Privacy%>" />
+  <div class="form-row">
+    <form action="Queries.html" name="Dashboard-<%$pane->{Name}%>" method="post" enctype="multipart/form-data">
+      <input type="hidden" class="hidden" name="id" value="<%$Dashboard->Id%>" />
+      <input type="hidden" class="hidden" name="Privacy" value="<%$Dashboard->Privacy%>" />
 
-<&| /Widgets/TitleBox, title => $pane->{DisplayName} &>
+      <&| /Widgets/TitleBox, title => $pane->{DisplayName} &>
 % my ( $pane_name ) = $pane->{Name} =~ /Searches-(.+)/;
-    <& /Widgets/SelectionBox:show, self => $pane, grep( {
-            $_->{pane} eq $pane_name} @deleted ) ? ( ShowUpdate => 1 ) : () &>
-</&>
-</form>
-</td></tr>
+        <& /Widgets/SelectionBox:show, self => $pane, grep( {
+          $_->{pane} eq $pane_name} @deleted ) ? ( ShowUpdate => 1 ) : ()
+        &>
+      </&>
+    </form>
+  </div>
 % }
-</table>
 
 <%INIT>
 
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index 480bf660b..2bc6d6754 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -68,25 +68,21 @@
 
 % $m->callback(CallbackName => 'BeforeTable', Dashboard => $Dashboard, show_cb => $show_cb);
 
-<table class="dashboard" id="dashboard-<%$id%>">
+<div class="dashboard form-row" id="dashboard-<%$id%>">
 
 % $m->callback(CallbackName => 'BeforePanes', Dashboard => $Dashboard, show_cb => $show_cb);
 
-<tr valign="top">
-
-<td class="boxcontainer">
+  <div class="col-md-8">
 % $show_cb->('body');
-</td>
+  </div>
 
-<td class="boxcontainer">
+    <div class="col-md-4">
 % $show_cb->('sidebar');
-</td>
-
-</tr>
+    </div>
 
 % $m->callback(CallbackName => 'AfterPanes', Dashboard => $Dashboard, show_cb => $show_cb);
 
-</table>
+</div>
 
 % $m->callback(CallbackName => 'AfterTable', Dashboard => $Dashboard, show_cb => $show_cb);
 
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index 469d3f734..c62f62473 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -52,99 +52,133 @@
 
 <form action="<%RT->Config->Get('WebPath')%>/Dashboards/Subscription.html" method="post" enctype="multipart/form-data" name="SubscribeDashboard">
 <input type="hidden" class="hidden" name="id" value="<% $fields{'DashboardId'} %>" />
-<table width="100%" border="0">
-<tr>
-
-<td valign="top" class="boxcontainer">
-<&| /Widgets/TitleBox, title => loc('Dashboard') &>
-
-<table>
-<tr><td class="label">
-<&|/l&>Dashboard</&>:
-</td><td class="value">
-<% $Dashboard->Name %>
-</td></tr>
-
-<tr><td class="label">
-<&|/l&>Queries</&>:
-</td><td class="value">
+
+  <&| /Widgets/TitleBox, title => loc('Dashboard') &>
+    <div class="form-row">
+      <div class="label col-md-3">
+          <&|/l&>Dashboard</&>:
+      </div>
+      <div class="value col-md-9">
+          <span class="current-value form-control"><% $Dashboard->Name %></span>
+      </div>
+    </div>
+
+    <div class="form-row">
+      <div class="label col-md-3">
+        <&|/l&>Queries</&>:
+      </div>
+      <div class="value col-md-9">
 % my @portlets = grep { defined } $Dashboard->Portlets;
 % if (!@portlets) {
-(<&|/l&>none</&>)
+      (<&|/l&>none</&>)
 % } else {
-<ol class="dashboard-queries">
+        <ol class="dashboard-queries list-group">
 %    for my $portlet (@portlets) {
-        <li class="dashboard-query">
+          <li class="dashboard-query list-item">
             <% loc( RT::SavedSearch->EscapeDescription($portlet->{description}), $fields{'Rows'}) %>
-        </li>
+          </li>
 %    }
-</ol>
+        </ol>
 % }
-</td></tr>
-
-</table>
-</&>
-
-<&| /Widgets/TitleBox, title => loc('Subscription') &>
-
-<table class="dashboard-subscription">
-<tr class="frequency"><td class="label">
-<&|/l&>Frequency</&>:
-</td><td class="value">
-
-<input type="radio" id="Frequency-daily" name="Frequency" value="daily" <% $fields{'Frequency'} eq 'daily' ? 'checked="checked"' : "" |n %>></input>
-<label for="Frequency-daily">
-<&|/l&>daily, on</&>
-</label>
-
+      </div>
+    </div>
+  </&>
+
+  <div class="dashboard-subscription">
+    <&| /Widgets/TitleBox, title => loc('Subscription') &>
+      <div class="form-row">
+        <div class="label col-md-auto">
+          <&|/l&>Frequency</&>: 
+        </div>
+        <div class="form-row">
+          <div class="custom-control custom-radio">
+            <input class="custom-control-input" type="radio" id="Frequency-daily" name="Frequency" value="daily" <% $fields{'Frequency'} eq 'daily' ? 'checked="checked"' : "" |n %>></input>
+            <label class="custom-control-label" for="Frequency-daily">
+              <&|/l&>daily, on</&>
+            </label>
+          </div>
 % for my $day ( qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday/ ) {
-      <label><input name="<% $day %>" value=1 type="checkbox" <% $fields{$day} ? 'checked="checked"' : '' %>> <% loc($day) %></label>
-    <input type="hidden"class="hidden" name="<% $day %>-Magic" value=1 />
+          <div class="custom-control custom-radio">
+             <input class="custom-control-input" id="<%$day%>" name="<% $day %>" value=1 type="checkbox" <% $fields{$day} ? 'checked="checked"' : '' %>>
+            <label class="custom-control-label" for="<%$day%>"><% loc($day) %></label>
+            <input type="hidden"class="hidden" name="<% $day %>-Magic" value=1 />
+          </div>
 % }
-
-<br />
-
-<input type="radio" id="Frequency-weekly" name="Frequency" value="weekly"<% $fields{'Frequency'} eq 'weekly' ? 'checked="checked"' : "" |n %>></input>
-<label for="Frequency-weekly">
-<&|/l&>weekly</&>, <&|/l&>on</&>
-<select name="Dow">
-    <option value="Monday" <% $fields{'Dow'} eq 'Monday' ? 'selected="selected"' : '' |n %>><&|/l&>Monday</&></option>
-    <option value="Tuesday" <% $fields{'Dow'} eq 'Tuesday' ? 'selected="selected"' : '' |n %>><&|/l&>Tuesday</&></option>
-    <option value="Wednesday" <% $fields{'Dow'} eq 'Wednesday' ? 'selected="selected"' : '' |n %>><&|/l&>Wednesday</&></option>
-    <option value="Thursday" <% $fields{'Dow'} eq 'Thursday' ? 'selected="selected"' : '' |n %>><&|/l&>Thursday</&></option>
-    <option value="Friday" <% $fields{'Dow'} eq 'Friday' ? 'selected="selected"' : '' |n %>><&|/l&>Friday</&></option>
-    <option value="Saturday" <% $fields{'Dow'} eq 'Saturday' ? 'selected="selected"' : '' |n %>><&|/l&>Saturday</&></option>
-    <option value="Sunday" <% $fields{'Dow'} eq 'Sunday' ? 'selected="selected"' : '' |n %>><&|/l&>Sunday</&></option>
-</select>
-<&|/l&>every</&>
-<select name="Fow">
+        </div>
+      </div>
+
+      <div class="form-row">
+
+        <div class="label col-md-auto">
+          <div class="custom-control custom-radio">
+            <input class="custom-control-input" type="radio" id="Frequency-weekly" name="Frequency" value="weekly"<% $fields{'Frequency'} eq 'weekly' ? 'checked="checked"' : "" |n %>></input>
+            <label class="custom-control-label" for="Frequency-weekly">
+              <&|/l&>weekly</&>, <&|/l&>on</&>
+            </label>
+          </div>
+        </div>
+        <div class="value col-md-auto">
+          <select class="label form-control selectpicker" name="Dow">
+            <option value="Monday" <% $fields{'Dow'} eq 'Monday' ? 'selected="selected"' : '' |n %>><&|/l&>Monday</&></option>
+            <option value="Tuesday" <% $fields{'Dow'} eq 'Tuesday' ? 'selected="selected"' : '' |n %>><&|/l&>Tuesday</&></option>
+            <option value="Wednesday" <% $fields{'Dow'} eq 'Wednesday' ? 'selected="selected"' : '' |n %>><&|/l&>Wednesday</&></option>
+            <option value="Thursday" <% $fields{'Dow'} eq 'Thursday' ? 'selected="selected"' : '' |n %>><&|/l&>Thursday</&></option>
+            <option value="Friday" <% $fields{'Dow'} eq 'Friday' ? 'selected="selected"' : '' |n %>><&|/l&>Friday</&></option>
+            <option value="Saturday" <% $fields{'Dow'} eq 'Saturday' ? 'selected="selected"' : '' |n %>><&|/l&>Saturday</&></option>
+            <option value="Sunday" <% $fields{'Dow'} eq 'Sunday' ? 'selected="selected"' : '' |n %>><&|/l&>Sunday</&></option>
+          </select>
+        </div>
+
+        <div class="label col-md-auto">
+          <&|/l&>every</&>
+        </div>
+        <div class="value col-md-auto">
+          <select class="form-control selectpicker" name="Fow" class="selectpicker">
 % for my $f ( qw/1 2 3 4/ ) {
-    <option value="<%$f%>" <% $fields{'Fow'} == $f ? 'selected="selected"' : '' |n %>><% $f %></option>
+            <option value="<%$f%>" <% $fields{'Fow'} == $f ? 'selected="selected"' : '' |n %>><% $f %></option>
 % }
-</select>
-<&|/l&>weeks</&>
-</label>
-<br />
-
-<input type="radio" id="Frequency-monthly" name="Frequency" value="monthly"<% $fields{'Frequency'} eq 'monthly' ? 'checked="checked"' : "" |n %>></input>
-<label for="Frequency-monthly">
-<&|/l&>monthly</&>, <&|/l&>on day</&>
-<select name="Dom">
+          </select>
+        </div>
+        <div class="label col-md-auto">
+          <&|/l&>weeks</&>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="label col-md-auto">
+          <div class="custom-control custom-radio">
+            <input class="custom-control-input" type="radio" id="Frequency-monthly" name="Frequency" value="monthly"<% $fields{'Frequency'} eq 'monthly' ? 'checked="checked"' : "" |n %>></input>
+            <label class="custom-control-label" for="Frequency-monthly">
+              <&|/l&>monthly</&>, <&|/l&>on day</&>
+            </label>
+          </div>
+        </div>
+        <div class="col-md-auto value">
+          <select class="form-control selectpicker" name="Dom">
 %   for my $dom (1..31) {
-    <option value="<% $dom %>" <% $fields{'Dom'} == $dom ? 'selected="selected"' : '' |n %>><% loc($dom) %></option>
+            <option value="<% $dom %>" <% $fields{'Dom'} == $dom ? 'selected="selected"' : '' |n %>><% loc($dom) %></option>
 %   }
-</select>
-</label>
-<br />
-
-<input type="radio" id="Frequency-never" name="Frequency" value="never" <% $fields{'Frequency'} eq 'never' ? 'checked="checked"' : "" |n %>></input>
-<label for="Frequency-never"><&|/l&>never</&></label>
-
-</td></tr>
-<tr><td class="label">
-<&|/l&>Hour</&>:
-</td><td class="value">
-<select name="Hour">
+          </select>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="col-md-auro">
+          <div class="custom-control custom-radio">
+            <input class="custom-control-input" type="radio" id="Frequency-never" name="Frequency" value="never" <% $fields{'Frequency'} eq 'never' ? 'checked="checked"' : "" |n %>></input>
+            <label class="custom-control-label" for="Frequency-never">
+              <&|/l&>never</&>
+            </label>
+          </div>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="label col-md-auto">
+          <&|/l&>Hour</&> (<%$timezone%>):
+        </div>
+        <div class="value col-md-auto">
+          <select class="selectpicker form-control" name="Hour">
 % my $formatter = RT::Date->new($session{CurrentUser})->LocaleObj;
 % my $dt = DateTime->now;
 % $dt->set_minute(0);
@@ -158,51 +192,58 @@
 %     my $selected = $value eq $fields{'Hour'}
 %                  ? 'selected="selected"'
 %                  : '';
-
-    <option value="<% $value %>" <%$selected|n %>><% $formatted %></option>
+            <option value="<% $value %>" <%$selected|n %>><% $formatted %></option>
 % }
-</select>
-(<%$timezone%>)
-</td></tr>
-<tr><td class="label">
-<&|/l&>Language</&>:
-</td><td class="value">
-<& /Elements/SelectLang,
-    Name => 'Language',
-    Default => $fields{'Language'},
-    ShowNullOption => 1,
- &>
-</td></tr>
-<tr><td class="label">
-<&|/l&>Rows</&>:
-</td><td class="value">
-<select name="Rows">
+          </select>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="label col-md-auto">
+          <&|/l&>Language</&>:
+        </div>
+        <div class="value col-md-auto">
+          <& /Elements/SelectLang,
+              Name => 'Language',
+              Default => $fields{'Language'},
+              ShowNullOption => 1,
+          &>
+        </div>
+      </div>
+      <div class="form-row">
+        <div class="label col-md-auto">
+          <&|/l&>Rows</&>:
+        </div>
+        <div class="value col-md-auto">
+          <select name="Rows" class="form-control selectpicker">
 %   for my $rows (1, 2, 5, 10, 15, 20, 25, 50, 75, 100, 0) {
-    <option value="<% $rows %>" <% $fields{'Rows'} eq $rows ? 'selected="selected"' : '' |n %>><% loc($rows || 'Unlimited') %></option>
+            <option value="<% $rows %>" <% $fields{'Rows'} eq $rows ? 'selected="selected"' : '' |n %>><% loc($rows || 'Unlimited') %></option>
 %   }
-</select>
-</td></tr>
+          </select>
+        </div>
+      </div>
+
+      <div class="form-row">
+        <div class="custom-control custom-checkbox">
+          <input class="custom-control-input" type="checkbox" id="SuppressIfEmpty" name="SuppressIfEmpty" value="1" <% $fields{'SuppressIfEmpty'} ? 'checked="checked"' : "" |n %> />
+          <label class="custom-control-label" for="SuppressIfEmpty"><&|/l&>Suppress if empty (Check this to avoid sending mail if all searches have no results)</&></label>
+        </div>
+        <input type="hidden"class="hidden" name="SuppressIfEmpty-Magic" value=1 />
+      </div>
 
-<tr><td align="right"><input type="checkbox" id="SuppressIfEmpty" name="SuppressIfEmpty" value="1" <% $fields{'SuppressIfEmpty'} ? 'checked="checked"' : "" |n %> /></td>
-<td><label for="SuppressIfEmpty"><&|/l&>Suppress if empty (Check this to avoid sending mail if all searches have no results)</&></label><br />
-<input type="hidden"class="hidden" name="SuppressIfEmpty-Magic" value=1 />
-</td></tr>
 % $m->callback( %ARGS, CallbackName => 'SubscriptionFormEnd', FieldsRef => \%fields,
 %     SubscriptionObj => $SubscriptionObj, DashboardObj => $Dashboard );
-</table>
-</&>
-
-<&| /Widgets/TitleBox, title => loc('Recipients') &>
-<& Elements/SubscriptionRecipients,
-    UserField => $UserField, UserString => $UserString, UserOp => $UserOp,
-    GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField,
-    Recipients => $fields{Recipients},
-    IsFirstSubscription => $SubscriptionObj ? 0 : 1 &>
-</&>
-
-</td>
-</tr>
-</table>
+    </&>
+  </div>
+
+  <&| /Widgets/TitleBox, title => loc('Recipients') &>
+    <& Elements/SubscriptionRecipients,
+      UserField => $UserField, UserString => $UserString, UserOp => $UserOp,
+      GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField,
+      Recipients => $fields{Recipients},
+      IsFirstSubscription => $SubscriptionObj ? 0 : 1
+    &>
+  </&>
 
 % if ($SubscriptionObj) {
     <& /Elements/Submit, Name => "Save", Label => loc('Save Changes') &>
diff --git a/share/html/Elements/SelectLang b/share/html/Elements/SelectLang
index 7f9f48e5d..d64736e7c 100644
--- a/share/html/Elements/SelectLang
+++ b/share/html/Elements/SelectLang
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
+<select class="form-control selectpicker" name="<%$Name%>">
 % if ($ShowNullOption) {
 <option value="">- (<% I18N::LangTags::List::name($session{CurrentUser}->LanguageHandle->language_tag) %>)</option>
 % }

-----------------------------------------------------------------------


More information about the rt-commit mailing list