From 4ebfeb7ed6aafb3853d772a93c6278c1d8ff41d8 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 16 Feb 2017 22:19:59 +0000 Subject: [PATCH] Bug 18135: Show alert if no authorities selected in batch record deletion To test: 1) Go to Tools -> Batch record deletion 2) Select Authorities as record type, put in an auth id, click Continue 3) Unselect the authorities and click Delete selected records 4) Confirm an alert shows up 5) Clear the alert and confirm deleting the authority still works as normal Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett --- .../prog/en/modules/tools/batch_delete_records.tt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt index 7962a9f..4d0eb18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -68,6 +68,14 @@ $(document).ready(function() { return false; } }); + + $("#selectauths").on("submit",function(){ + var checked = $("#selectauths").find("input[type='checkbox'][name='record_id']:checked").size(); + if (checked == 0) { + alert(_("No authorities have been selected.")); + return false; + } + }); }); //]]> @@ -190,7 +198,7 @@ $(document).ready(function() { | Clear all | Clear used authorities -
+ -- 2.1.4