Bug 10694: (follow-up) display the note about restricted patrons consistently
authorGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 22:48:02 +0000 (22:48 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 22:49:23 +0000 (22:49 +0000)
This patch ensures that the note displayed when checking in a loan
to a restricted patron (and setting the return date) is displayed
whether or not the circulation staffer has chosen the make the return
date override sticky.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 84ecf0e..004fc50 100755 (executable)
@@ -192,8 +192,11 @@ my $return_date_override_remember =
   $query->param('return_date_override_remember');
 if ($return_date_override) {
     if ( C4::Context->preference('SpecifyReturnDate') ) {
+        # FIXME we really need to stop adding more uses of C4::Dates
         if ( $return_date_override =~ C4::Dates->regexp('syspref') ) {
 
+            # note that we've overriden the return date
+            $template->param( return_date_was_overriden => 1);
             # Save the original format if we are remembering for this series
             $template->param(
                 return_date_override          => $return_date_override,
index 895894c..1fa1e14 100644 (file)
@@ -128,7 +128,7 @@ $(document).ready(function () {
 [% END %]
 
 <!-- Patron is restricted and checkin was backdated -->
-[% IF return_date_override && Borrowers.IsDebarred( borrower ) %]
+[% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
     <div id="restricted_backdated" class="dialog message">
         <h3>
             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">