From: Marc VĂ©ron <[email protected]>

To reproduce:
- Go to Tools->Batch patron modification
- Submit without filling any of  "Use a file", "Or use a patron list",
  "Or list card numbers..." or use a patron lists with zero members
Result: Screen without any information

To test:
- Apply patch
- Repeat steps above
- Verify that you get a nice message
- Verify that the tool works as before
  - with invalid card numbers only
  - with valid and invalid card numbers
  - with valid card numbers only

Signed-off-by: Srdjan <[email protected]>
---
 koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt 
b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
index 8d50d70..fd79986 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
@@ -172,6 +172,12 @@
                 </form>
                 [% END %]
 
+                [% IF ( op == 'show') && (!borrowers) && 
(!notfoundcardnumbers) # Alert if no patrons given%]
+                    [% op = 'noshow' # Change op to prevent display in code 
below %]
+                    <h1>Batch patrons modification</h1>
+                    <div class="dialog alert">No patron card numbers given. <a 
href="/cgi-bin/koha/tools/modborrowers.pl" class="btn btn-mini">Back</a></div>
+                [% END #Alert if no patrons %]
+
                 [% IF ( op == 'show' or op == 'show_results' ) %]
                     [% IF ( op == 'show' ) %]
                         <h1>Batch patrons modification</h1>
-- 
2.7.4
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to