Bug 18439 - Resend button for notices being hidden by CSS and never unhidden
authorNick Clemens <nick@bywatersolutions.com>
Mon, 17 Apr 2017 17:22:24 +0000 (13:22 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Apr 2017 11:32:23 +0000 (07:32 -0400)
Current jQuery is not unhiding resend button, this patch adds an id
and a toggle command

To test:
1 - Enable EnhancedMessagingPreferences
2 - Find a patron with sent or failed messages
3 - Note you can expand message, but not resend
4 - Apply patch
5 - Note that on expanding message a 'Resend' button appears
6 - Ensure resend button operates as expected

Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt

index cea5b0d..7ae818c 100644 (file)
@@ -20,6 +20,7 @@
             e.preventDefault();
             var rowid = $(this).data("noticeid");
             $("#notice"+rowid).toggle();
+            $("#resend_notice"+rowid).toggle();
         });
 
     });
@@ -76,7 +77,7 @@
             [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
             [% ELSE %][% QUEUED_MESSAGE.status %][% END %]
             [% IF ( QUEUED_MESSAGE.status != 'pending' ) %]
-            <div class="notice">
+            <div id="resend_notice[% QUEUED_MESSAGE.message_id %]"  class="notice">
                 <form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]" method="POST">
                     <input type="hidden" name="op" value="resend_notice" />
                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />