[Rt-commit] rt branch, 4.4/ajax-preview-scrips, updated. rt-4.2.3-204-g382d6e6

Alex Vandiver alexmv at bestpractical.com
Fri Jul 18 17:32:40 EDT 2014


The branch, 4.4/ajax-preview-scrips has been updated
       via  382d6e6867d10d63a89003d10aa92c540a44f570 (commit)
      from  40bf9a930bda99d47070232d2269122d05f5fe2b (commit)

Summary of changes:
 share/html/Ticket/Update.html | 10 ++++++++++
 1 file changed, 10 insertions(+)

- Log -----------------------------------------------------------------
commit 382d6e6867d10d63a89003d10aa92c540a44f570
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jul 18 17:26:21 2014 -0400

    Pass the just-submitted squelching information to the first AJAX request
    
    If "Add more files" is pressed, the set of selected squelched recipients
    is submitted; on the sebsequent page display, however, that information
    does not appear in the initial form that is serialized and passed to the
    helpers; as such, the state of the checkboxes is lost.
    
    Preserve that information by ensuring that the squelching information is
    present on the page during the first page load, before the AJAX
    requests, by placing it within the area to be replaced.  This ensures
    that the form elements will not be duplicated once the initial AJAX
    request returns, but provides the query parameters for the initial call
    to jQuery('form[name=TicketUpdate]').serialize().

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 30ff35f..f7bc13d 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -138,6 +138,12 @@
 <div id="ticket-update-message">
 % if ( RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'}) ) {
     <&|/Widgets/TitleBox, title => loc('Recipients'), id => 'recipients' &>
+%   unless ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
+%     for my $address (ref $ARGS{TxnSendMailTo} ? @{$ARGS{TxnSendMailTo}} : $ARGS{TxnSendMailTo}) {
+        <input type="hidden" name="TxnSendMailTo" value="<% $address %>" />
+%     }
+      <input type="hidden" name="TxnRecipients" value="<% $ARGS{TxnRecipients} || '' %>" />
+%   }
     </&>
 %}
 
@@ -189,6 +195,10 @@
 
 % if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
   <&|/Widgets/TitleBox, title => loc('Scrips and Recipients'), id => 'previewscrips', rolledup => RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'}) &>
+%   for my $address (ref $ARGS{TxnSendMailTo} ? @{$ARGS{TxnSendMailTo}} : $ARGS{TxnSendMailTo}) {
+      <input type="hidden" name="TxnSendMailTo" value="<% $address %>" />
+%   }
+    <input type="hidden" name="TxnRecipients" value="<% $ARGS{TxnRecipients} || '' %>" />
   </&>
 % }
 </div>

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


More information about the rt-commit mailing list