From 515ee8e7a582034e861e8ea11cddea1be8e412bc Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Thu, 19 Dec 2013 12:33:45 -0500
Subject: [PATCH] Bug 10694 - Allow arbitrary backdating of returns - QA Followup 2

---
 Koha/Template/Plugin/Borrowers.pm                  |   18 +++++++++++++++++-
 .../intranet-tmpl/prog/en/modules/circ/returns.tt  |    2 +-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Koha/Template/Plugin/Borrowers.pm b/Koha/Template/Plugin/Borrowers.pm
index 45c4071..6c8808f 100644
--- a/Koha/Template/Plugin/Borrowers.pm
+++ b/Koha/Template/Plugin/Borrowers.pm
@@ -6,7 +6,7 @@ package Koha::Template::Plugin::Borrowers;
 #
 # Koha is free software; you can redistribute it and/or modify it under the
 # terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
+# Foundation; either version 3 of the License, or (at your option) any later
 # version.
 #
 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -25,6 +25,22 @@ use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/;
 
 use C4::Koha;
 
+=pod
+
+This plugin is a home for various patron related Template Toolkit functions
+to help streamline Koha and to move logic from the Perl code into the
+Templates when it makes sense to do so.
+
+To use, first, include the line '[% USE Borrowers %]' at the top
+of the template to enable the plugin.
+
+For example: [% IF Borrowers.IsDebarred( borrower.borrowernumber ) %]
+removes the necessity of setting a template variable in Perl code to
+find out if a patron is restricted even if that variable is not evaluated
+in any way in the script.
+
+=cut
+
 sub IsDebarred {
     my ( $self, $borrower ) = @_;
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
index 2bfc9b1..aaecd51 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
@@ -425,7 +425,7 @@ $(document).ready(function () {
                 <div class="date-select" id="return_date_override_fields">
                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
 
-                    <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" readonly="readonly" />
+                    <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
 
                     <label for="return_date_override_remember"> Remember for next check in:</label>
                     [% IF ( return_date_override_remember ) %]
-- 
1.7.2.5