[Rt-commit] rtir branch, 5.0/fix-messagebox-colors, created. 4.0.1rc1-151-g24107490

Blaine Motsinger blaine at bestpractical.com
Mon Jun 1 19:56:49 EDT 2020


The branch, 5.0/fix-messagebox-colors has been created
        at  241074903523ac54968266a6ec7df4845cac64af (commit)

- Log -----------------------------------------------------------------
commit 7252d06da97132e6b1b4248eddedb5d6a6b20323
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Fri May 29 18:35:43 2020 -0500

    Fix messagebox color for RTIR/Update.html
    
    This commits makes the messagebox colors again work consistently
    with RT.

diff --git a/html/RTIR/Elements/UpdateData b/html/RTIR/Elements/UpdateData
index 0941c315..1ac236ee 100644
--- a/html/RTIR/Elements/UpdateData
+++ b/html/RTIR/Elements/UpdateData
@@ -70,8 +70,9 @@
 </div>
 % }
 
-<div class="form-group">
 <& /Articles/Elements/BeforeMessageBox, %ARGS &>
+<div class="form-group">
+  <div class="messagebox-container action-<% $type %>">
 % $m->callback( %ARGS, CallbackPage => '/Ticket/Update.html', CallbackName => 'BeforeMessageBox' );
 % if ( exists $ARGS{'UpdateContent'} ) {
 % delete $ARGS{'QuoteTransaction'};
@@ -79,8 +80,15 @@
 % } else {
 <& /Elements/MessageBox, Name => "UpdateContent", %ARGS &>
 % }
+  </div>
 </div>
 
+<%INIT>
+my $type = $ARGS{'UpdateType'}             ? $ARGS{'UpdateType'} :
+           lc $ARGS{'Action'} eq 'respond' ? 'response'          :
+           lc $ARGS{'Action'} eq 'comment' ? 'private'           :
+                                             'none'              ;
+</%INIT>
 <%ARGS>
 $Ticket => undef
 $UpdateCc => ''
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 6d6a4a86..0f475b5d 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -69,7 +69,7 @@
       <&|/l&>Update Type</&>:
     </div>
     <div class="value col-md-9">
-      <select class="selectpicker form-control" name="UpdateType">
+      <select class="selectpicker form-control" name="UpdateType" id="UpdateType">
 % if ($CanComment) {
         <option value="private" <% $CommentDefault || '' %>><&|/l&>Comments (Not sent to requestors)</&></option>
 % }

commit 241074903523ac54968266a6ec7df4845cac64af
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Fri May 29 20:01:01 2020 -0500

    Fix messagebox color for RTIR/Incident/Reply/index.html
    
    This commits makes the messagebox colors again work consistently
    with RT.

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 7532e80d..e86fbca7 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -220,11 +220,11 @@ if ( $request_path =~ m{(?:$re_rtir_path)(?:$re_rtir_types/)?(Display|Edit|Updat
         if ( RT::IR->IsIncidentQueue($ticket->QueueObj)) {
             $actions_tab->child(
                 reply_reporters => title => loc('Reply to Reporters'),
-                path  => RT::IR->HREFTo("Incident/Reply/?id=$id&SelectedReportsAll=1", IncludeWebPath => 0),
+                path  => RT::IR->HREFTo("Incident/Reply/?id=$id&SelectedReportsAll=1&Action=Respond", IncludeWebPath => 0),
             );
             $actions_tab->child(
                 reply_all => title => loc('Reply to All'),
-                path  => RT::IR->HREFTo("Incident/Reply/?id=$id&All=1&SelectedReportsAll=1&SelectedInvestigationsAll=1&SelectedCountermeasuresAll=1", IncludeWebPath => 0),
+                path  => RT::IR->HREFTo("Incident/Reply/?id=$id&All=1&SelectedReportsAll=1&SelectedInvestigationsAll=1&SelectedCountermeasuresAll=1&Action=Respond", IncludeWebPath => 0),
             );
         } else {
             $actions_tab->child(
diff --git a/html/RTIR/Incident/Elements/ReplyForm b/html/RTIR/Incident/Elements/ReplyForm
index 832f8144..0563bd7f 100644
--- a/html/RTIR/Incident/Elements/ReplyForm
+++ b/html/RTIR/Incident/Elements/ReplyForm
@@ -60,7 +60,7 @@
     <&|/l&>Update Type</&>:
   </div>
   <div class="value col-md-9">
-    <select class="selectpicker form-control" name="UpdateType">
+    <select class="selectpicker form-control" name="UpdateType" id="UpdateType">
 % if( $AllowComment ) {
       <option value="private" <% $CommentDefault %>><&|/l&>Comments (Not sent to requestors)</&></option>
 % }
@@ -113,7 +113,7 @@
   </div>
 </div>
 
-<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $TicketObj, QueueObj => $QueueObj &>
+<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $TicketObj, QueueObj => $QueueObj, Action => $Action &>
 
 </&>
 <%INIT>
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index 3367279d..5d0cff14 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -132,6 +132,7 @@
     TicketObj   => $IncidentObj,
     Status      => $Status,
     GnuPGWidget => $gnupg_widget,
+    Action      => $Action,
 &>
 
 <div class="form-row">

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


More information about the rt-commit mailing list