Bug 14480: Silences warn from editing patron
authorAleisha <aleishaamohia@hotmail.com>
Tue, 29 Dec 2015 19:39:20 +0000 (19:39 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 04:38:41 +0000 (04:38 +0000)
Argument "" isn't numeric in numeric lt (<)

TEST PLAN
---------
1) Go to any patron in staff client
2) Click 'Edit'
3) Check error logs
   -- warnings should exist.
4) Apply patch
5) Reload page
   -- warnings should not be triggered.
6) Add restriction and save
7) Go back to edit screen
   -- restriction should be shown
8) Remove restriction and save
9) Go back to edit screen
   -- Should say "Patron is currently unrestricted"
10) Run koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index e646890..8a8d3d4 100644 (file)
               <fieldset class="rows">
                 <legend>Patron restrictions</legend>
 
-                [% IF ( debarments.size < 1 ) %]
-                    <p>Patron is currently unrestricted.</p>
-                [% ELSE %]
+                [% IF ( debarments ) %]
                     <table>
                         <thead>
                             <tr>
                             [% END %]
                         </tbody>
                     </table>
+                [% ELSE %]
+                    <p>Patron is currently unrestricted.</p>
                 [% END %]
+
                 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
                     <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
                     <fieldset id="manual_restriction_form">