[Rt-commit] rt branch 5.0/remove-extra-space-cc-bcc created. rt-5.0.3-220-g013c979064

BPS Git Server git at git.bestpractical.com
Thu Jan 19 14:49:08 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/remove-extra-space-cc-bcc has been created
        at  013c979064a3b3683c4b835b877bdb0cd4a13e9b (commit)

- Log -----------------------------------------------------------------
commit 013c979064a3b3683c4b835b877bdb0cd4a13e9b
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Jan 19 11:45:10 2023 -0300

    Removed extra space between Cc and Bcc in the ticket update cc Element
    
    Some HTML elements were rendered with no information due to IF clauses
    that checked if there was One Time CC and BCC Suggestions. Those IF
    clauses were rearranged to not render the HTML elements at all if no
    CC or BCC suggestions.

diff --git a/share/html/Ticket/Elements/UpdateCc b/share/html/Ticket/Elements/UpdateCc
index 83a73272a8..87069de01c 100644
--- a/share/html/Ticket/Elements/UpdateCc
+++ b/share/html/Ticket/Elements/UpdateCc
@@ -57,11 +57,11 @@
   </div>
 </div>
 
+%if (scalar @one_time_Ccs) {
 <div class="form-row mt-0">
   <div class="label col-2"></div>
   <div class="value col-9">
     <div class="form-row">
-%if (scalar @one_time_Ccs) {
 %   if ($hide_cc_suggestions) {
       <a href="#" class="ToggleSuggestions" data-hide-label="<% $hide_label %>" data-show-label="<% $show_label %>">
         <i class="label">(<&|/l&>show suggestions</&>)</i>
@@ -74,8 +74,7 @@
         <input type="checkbox" class="custom-control-input" id="AllSuggestedCc" name="AllSuggestedCc" value="1" onclick="setCheckbox(this, /^UpdateCc-/); checkboxesToInput('UpdateCc', 'input[name^=UpdateCc-]:checkbox');">
         <label class="custom-control-label" for="AllSuggestedCc"><% loc('All recipients') %></label>
       </div>
-%}
-%foreach my $addr ( @one_time_Ccs ) {
+%   foreach my $addr ( @one_time_Ccs ) {
       <div class="col-auto">
         <span class="ticket-update-suggested-cc">
           <div class="custom-control custom-checkbox">
@@ -93,13 +92,14 @@
           </div>
         </span>
       </div>
-%}
-%if (@one_time_Ccs && $hide_cc_suggestions) {
+%   }
+%   if ($hide_cc_suggestions) {
       </div>
-%}
+%   }
     </div>
   </div>
 </div>
+%}
 
 <div class="form-row">
   <div class="label col-2">
@@ -110,11 +110,11 @@
   </div>
 </div>
 
+%if (scalar @one_time_Ccs) {
 <div class="form-row mt-0">
   <div class="label col-2"></div>
   <div class="value col-9">
     <div class="form-row">
-%if (scalar @one_time_Ccs) {
 %   if ($hide_cc_suggestions) {
       <a href="#" class="ToggleSuggestions" data-hide-label="<% $hide_label %>" data-show-label="<% $show_label %>">
         <i class="label">(<&|/l&>show suggestions</&>)</i>
@@ -127,8 +127,7 @@
         <input type="checkbox" class="checkbox custom-control-input" id="AllSuggestedBcc" name="AllSuggestedBcc" value="1" onclick="setCheckbox(this, /^UpdateBcc-/); checkboxesToInput('UpdateBcc', 'input[name^=UpdateBcc-]:checkbox');">
         <label class="custom-control-label" for="AllSuggestedBcc"><% loc('All recipients') %></label>
       </div>
-%}
-%foreach my $addr ( @one_time_Ccs ) {
+%   foreach my $addr ( @one_time_Ccs ) {
       <div class="col-auto">
         <span class="ticket-update-suggested-cc">
           <div class="custom-control custom-checkbox">
@@ -146,8 +145,8 @@
           </div>
         </span>
       </div>
-%}
-%if (@one_time_Ccs && $hide_cc_suggestions) {
+%   }
+%   if ($hide_cc_suggestions) {
       </div>
 <script type="text/javascript">
 jQuery(function() {
@@ -161,10 +160,12 @@ jQuery(function() {
     });
 });
 </script>
-%}
+%   }
     </div>
   </div>
 </div>
+%}
+
 <%args>
 $TicketObj
 </%args>
@@ -186,7 +187,7 @@ foreach my $addr ( keys %txn_addresses) {
 
 @one_time_Ccs = sort @one_time_Ccs;
 
-my $hide_cc_suggestions =  RT->Config->Get('HideOneTimeSuggestions', $session{CurrentUser});
+my $hide_cc_suggestions = RT->Config->Get('HideOneTimeSuggestions', $session{CurrentUser});
 my $show_label    = $m->interp->apply_escapes( loc("show suggestions"), 'h' );
 my $hide_label    = $m->interp->apply_escapes( loc("hide suggestions"), 'h' );
 </%init>

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list