[Rt-commit] rt branch, 4.6-theme/admin-scrips-pages, created. rt-4.4.4-182-gc70836e63

Blaine Motsinger blaine at bestpractical.com
Thu Apr 11 16:05:56 EDT 2019


The branch, 4.6-theme/admin-scrips-pages has been created
        at  c70836e63b8ca94050371b190853a43a751dad79 (commit)

- Log -----------------------------------------------------------------
commit c70836e63b8ca94050371b190853a43a751dad79
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Thu Apr 11 15:03:03 2019 -0500

    Migrate Admin/Scrips/Create to elevator themes

diff --git a/share/html/Admin/Elements/SelectScripAction b/share/html/Admin/Elements/SelectScripAction
index 92902f279..03cdc00bf 100644
--- a/share/html/Admin/Elements/SelectScripAction
+++ b/share/html/Admin/Elements/SelectScripAction
@@ -45,15 +45,15 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
-<option value="" 
-<% ! defined $Default && qq[ selected="selected"] |n %>
->-</option>
-%while  (my $ScripAction = $ScripActions->Next) {
-<option value="<%$ScripAction->Id%>"
-<% defined $Default && $ScripAction->Id == $Default && qq[ selected="selected"] |n %>
-><% loc($ScripAction->Name) %>
-</option>
+<select name="<%$Name%>" class="form-control selectpicker">
+  <option value=""
+  <% !defined $Default && qq[ selected="selected" ] | n %>
+  >-</option>
+%while (my $ScripAction = $ScripActions->Next) {
+  <option value="<%$ScripAction->Id%>"
+  <% defined $Default && $ScripAction->Id == $Default && qq[ selected="selected" ] | n %>
+  ><% loc($ScripAction->Name) %>
+  </option>
 %}
 </select>
 
diff --git a/share/html/Admin/Elements/SelectScripCondition b/share/html/Admin/Elements/SelectScripCondition
index 7e59ffb88..491e60744 100644
--- a/share/html/Admin/Elements/SelectScripCondition
+++ b/share/html/Admin/Elements/SelectScripCondition
@@ -45,14 +45,14 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
-<option value="" 
-<% ! defined $Default && qq[ selected="selected"] %>
->-</option>
-%while  (my $ScripCondition = $ScripConditions->Next) {
-<option value="<%$ScripCondition->Id%>"
-<% defined $Default && $ScripCondition->Id == $Default && qq[ selected="selected"] %>
-><% loc($ScripCondition->Name) %>
+<select name="<%$Name%>" class="form-control selectpicker">
+  <option value="" 
+  <% !defined $Default && qq[ selected="selected" ] %>
+  >-</option>
+%while (my $ScripCondition = $ScripConditions->Next) {
+  <option value="<%$ScripCondition->Id%>"
+  <% defined $Default && $ScripCondition->Id == $Default && qq[ selected="selected" ] %>
+  ><% loc($ScripCondition->Name) %>
 </option>
 %}
 </select>
diff --git a/share/html/Admin/Elements/SelectStage b/share/html/Admin/Elements/SelectStage
index dc5715740..257614ead 100644
--- a/share/html/Admin/Elements/SelectStage
+++ b/share/html/Admin/Elements/SelectStage
@@ -45,14 +45,13 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
+<select name="<%$Name%>" class="form-control selectpicker">
 % foreach my $value (@stages) {
-<option value="<%$value%>"
-<% ($value eq $Default) && qq[ selected="selected"] |n %>
-<% ($value eq 'TransactionBatch' and not RT->Config->Get('UseTransactionBatch')) && qq[ disabled ] %>
-><% loc( RT::Scrip->FriendlyStage($value) ) %>
-</option>
-
+  <option value="<%$value%>"
+  <% ($value eq $Default) && qq[ selected="selected"] |n %>
+  <% ($value eq 'TransactionBatch' and not RT->Config->Get('UseTransactionBatch')) && qq[ disabled ] %>
+  ><% loc( RT::Scrip->FriendlyStage($value) ) %>
+  </option>
 % }
 </select>
 <%INIT>
diff --git a/share/html/Admin/Scrips/Create.html b/share/html/Admin/Scrips/Create.html
index 6aca459e1..931542623 100644
--- a/share/html/Admin/Scrips/Create.html
+++ b/share/html/Admin/Scrips/Create.html
@@ -50,37 +50,51 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="Create.html" id="CreateScrip" name="CreateScrip">
-<input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
-<input type="hidden" class="hidden" name="Global" value="<% $Global || q{} %>" />
-
-<&| /Widgets/TitleBox, title => loc('Basics') &>
-<table>
-
-<& Elements/EditBasics, %ARGS, Scrip => $scrip, Queue => $queue_obj &>
-
-<tr><td class="label"><&|/l&>Stage</&>:</td><td class="value">\
-<& /Admin/Elements/SelectStage, Default => $ARGS{"Stage"} &></td></tr>
-
-<tr><td class="label"> </td><td>
-<input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" name="Enabled" value="1" <% $ARGS{'Enabled'}? 'checked="checked"': '' |n%> />
-<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this scrip)</&></label>
-</td></tr>
-
-</table>
-</&>
-
-<& /Elements/Submit,
-    Label => loc('Create'),
-    Name => 'Create',
-&>
+    <input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
+    <input type="hidden" class="hidden" name="Global" value="<% $Global || q{} %>" />
+
+    <&| /Widgets/TitleBox, title => loc('Basics') &>
+
+    <& Elements/EditBasics, %ARGS, Scrip => $scrip, Queue => $queue_obj &>
+
+    <div class="form-row">
+      <div class="col-md-3 label">
+        <&|/l&>Stage</&>:
+      </div>
+      <div class="col-md-9 value">
+        <& /Admin/Elements/SelectStage, Default => $ARGS{"Stage"} &>
+      </div>
+    </div>
+
+    <input type="hidden" class="hidden" name="SetEnabled" value="1" />
+
+    <div class="form-row">
+      <div class="col-md-3 label">
+      </div>
+      <div class="col-md-9 value">
+        <div class="custom-control custom-checkbox">
+          <input type="checkbox" class="custom-control-input checkbox" name="Enabled" id="Enabled" value="1" <% $ARGS{'Enabled'}? 'checked="checked"': '' |n%> />
+          <label class="custom-control-label" for="Enabled"><&|/l&>Enabled (Unchecking this box disables this scrip)</&></label>
+        </div>
+      </div>
+    </div>
+
+    </&>
+
+    <div class="form-row">
+      <div class="col-md-12">
+        <& /Elements/Submit, Label => loc('Create'), Name => 'Create' &>
+      </div>
+    </div>
 
 % if ($session{CurrentUser}->HasRight(Object => $RT::System, Right => 'ExecuteCode')) {
-<& Elements/EditCustomCode, %ARGS, Scrip => $scrip &>
-<& /Elements/Submit,
-    Label => loc('Create'),
-    Name => 'Create',
-&>
+    <& Elements/EditCustomCode, %ARGS, Scrip => $scrip &>
+
+    <div class="form-row">
+      <div class="col-md-12">
+        <& /Elements/Submit, Label => loc('Create'), Name => 'Create' &>
+      </div>
+    </div>
 % }
 
 </form>
diff --git a/share/html/Admin/Scrips/Elements/EditBasics b/share/html/Admin/Scrips/Elements/EditBasics
index 09c4862be..b5a3f8e85 100644
--- a/share/html/Admin/Scrips/Elements/EditBasics
+++ b/share/html/Admin/Scrips/Elements/EditBasics
@@ -45,26 +45,41 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<tr><td class="label"><&|/l&>Description</&>:</td><td class="value">\
-<input type="text" name="Description" \
-    size="60" \
-    value="<% $ARGS{"Description"} || $Scrip->Description || '' %>" />
-</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" size="60" value="<% $ARGS{"Description"} || $Scrip->Description || '' %>" />
+  </div>
+</div>
 
-<tr><td class="label"><&|/l&>Condition</&>:</td><td class="value">\
-<& /Admin/Elements/SelectScripCondition,
-    Default => $ARGS{"ScripCondition"} || $Scrip->ConditionObj->Id,
-&></td></tr>
+<div class="form-row">
+  <div class="col-md-3 label">
+    <&|/l&>Condition</&>:
+  </div>
+  <div class="col-md-9 value">
+    <& /Admin/Elements/SelectScripCondition, Default => $ARGS{"ScripCondition"} || $Scrip->ConditionObj->Id, &>
+  </div>
+</div>
 
-<tr><td class="label"><&|/l&>Action</&>:</td><td class="value">\
-<& /Admin/Elements/SelectScripAction,
-    Default => $ARGS{"ScripAction"} || $Scrip->ActionObj->Id,
-&></td></tr>
+<div class="form-row">
+  <div class="col-md-3 label">
+    <&|/l&>Action</&>:
+  </div>
+  <div class="col-md-9 value">
+    <& /Admin/Elements/SelectScripAction, Default => $ARGS{"ScripAction"} || $Scrip->ActionObj->Id, &>
+  </div>
+</div>
 
-<tr><td class="label"><&|/l&>Template</&>:</td><td class="value">\
-<& SelectTemplate,
-    Default => $ARGS{"Template"}, Scrip => $Scrip, Queue => $Queue,
-&></td></tr>
+<div class="form-row">
+  <div class="col-md-3 label">
+    <&|/l&>Template</&>:
+  </div>
+  <div class="col-md-9 value">
+    <& SelectTemplate, Default => $ARGS{"Template"}, Scrip => $Scrip, Queue => $Queue &>
+  </div>
+</div>
 
 <%ARGS>
 $Scrip
diff --git a/share/html/Admin/Scrips/Elements/EditCustomCode b/share/html/Admin/Scrips/Elements/EditCustomCode
index 6c8b72017..ebb2e4595 100644
--- a/share/html/Admin/Scrips/Elements/EditCustomCode
+++ b/share/html/Admin/Scrips/Elements/EditCustomCode
@@ -47,21 +47,25 @@
 %# END BPS TAGGED BLOCK }}}
 <&| /Widgets/TitleBox, title => loc('User Defined conditions and results') &>
 
-<table>
-<tr><td colspan="2" class="comment">
-<i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
-</td></tr>
+<div class="form-row">
+  <div class="col-md-9 value">
+    <i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
+  </div>
+</div>
 
 % while ( my ($method, $desc) = splice @list, 0, 2 ) {
-<tr><td class="labeltop"><% $desc %>:</td><td class="value">
+<div class="form-row">
+  <div class="col-md-3 label labeltop">
+    <% $desc %>:
+  </div>
+  <div class="col-md-9 value">
 % my $code = $ARGS{ $method } || $Scrip->$method() || '';
 % my $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
-<textarea cols="80" rows="<% $lines %>" name="<% $method %>"><% $code %></textarea>
-</td></tr>
+      <textarea cols="80" class="form-control" rows="<% $lines %>" name="<% $method %>"><% $code %></textarea>
+  </div>
+</div>
 % }
-
-</table>
 </&>
 <%ARGS>
 $Scrip
diff --git a/share/html/Admin/Scrips/Elements/SelectTemplate b/share/html/Admin/Scrips/Elements/SelectTemplate
index b8880b380..298b745aa 100644
--- a/share/html/Admin/Scrips/Elements/SelectTemplate
+++ b/share/html/Admin/Scrips/Elements/SelectTemplate
@@ -45,10 +45,10 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<select name="<% $Name %>">
-<option value=""><% $current || '-' %></option>
+<select name="<% $Name %>" class="form-control selectpicker">
+  <option value=""><% $current || '-' %></option>
 % foreach my $name ( @list ) {
-<option value="<% $name %>" \
+  <option value="<% $name %>" \
     <% lc($Default||'') eq lc $name ? 'selected="selected"' : '' |n %>
 ><% loc($name) %></option>
 % }

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


More information about the rt-commit mailing list