Bug 20616: Prevent "edit serials" form submission if no serial is selected
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e14ee4ad0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
cc22607d83
commit
1ad94323f7
|
|
@ -73,6 +73,15 @@ $(document).ready(function() {
|
|||
"bInfo": false,
|
||||
"bFilter": false,
|
||||
} ));
|
||||
|
||||
$("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;
|
||||
});
|
||||
});
|
||||
|
||||
//]]>
|
||||
|
|
|
|||
Loading…
Reference in New Issue