From 7a5f17ff6ecbec3a7f73fa54b900dae909996b29 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../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 7962a9fe12..4d0eb181f4 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.20.1