Bugzilla – Attachment 74772 Details for
Bug 20616
Using "Edit serials" with no issues selected gives an ugly error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20616: Prevent "edit serials" form submission if no serial is selected
Bug-20616-Prevent-edit-serials-form-submission-if-.patch (text/plain), 1.79 KB, created by
Katrin Fischer
on 2018-04-24 05:45:54 UTC
(
hide
)
Description:
Bug 20616: Prevent "edit serials" form submission if no serial is selected
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-04-24 05:45:54 UTC
Size:
1.79 KB
patch
obsolete
>From 7d6ed519b6f7976ed0b9bc03eb205081cf197366 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 23 Apr 2018 16:19:50 -0300 >Subject: [PATCH] Bug 20616: Prevent "edit serials" form submission if no > serial is selected >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In order to prevent the form to submit and gives an ugly error if no >issues are selected we will make sure at least one is checked otherwise >an alert will be displayed. > >Test plan: >- create a subscrpition >- go to the serials collection page >- don't check any checkboxes for serials >- click 'Edit serials' > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/serials/serials-collection.tt | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index a5e1b1e..64c856e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -320,6 +320,15 @@ > $('#multi_receiving').on('show', function () { > $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); > }); >+ >+ $("form[name='edition']").on('submit', function(e){ >+ if ( $(this).find("input[name='serialid']:checked").size() == 0 ) { >+ e.preventDefault(); >+ alert("You must select at least one serial to edit"); >+ return 0; >+ } >+ return 1; >+ }); > }); > > </script> >-- >2.1.4
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 20616
:
74766
|
74768
| 74772 |
74773