Bugzilla – Attachment 60620 Details for
Bug 18135
Can submit batch deletion for authorities without selecting any
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18135: Show alert if no authorities selected in batch record deletion
Bug-18135-Show-alert-if-no-authorities-selected-in.patch (text/plain), 2.00 KB, created by
Jonathan Druart
on 2017-02-23 16:20:07 UTC
(
hide
)
Description:
Bug 18135: Show alert if no authorities selected in batch record deletion
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-23 16:20:07 UTC
Size:
2.00 KB
patch
obsolete
>From 99f10f7235f8f2b86bd3eef453c627c6fd9af8b4 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >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 <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../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; >+ } >+ }); > }); > //]]> > </script> >@@ -190,7 +198,7 @@ $(document).ready(function() { > | <a id="clearall" href="#"><i class="fa fa-remove"></i> Clear all</a> > | <a id="clearlinkedtobiblio" href="#">Clear used authorities</a> > </div> >- <form action="/cgi-bin/koha/tools/batch_delete_records.pl" method="post"> >+ <form action="/cgi-bin/koha/tools/batch_delete_records.pl" method="post" id="selectauths"> > <table id="authorities" class="records"> > <thead> > <tr> >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18135
:
60370
|
60591
| 60620