Bug 29093: (follow-up) Fix the all fields empty-warning

We should allow checking the TOC box only.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2021-10-06 11:56:33 +00:00 committed by Jonathan Druart
parent 730c861b84
commit 61df3291f6

View file

@ -274,7 +274,7 @@ $(document).ready( function() {
}
// Check if all fields are blank
if( m.length == 0 && $('#title').val()=='' && $('#author').val()=='' && $('#volume').val()=='' && $('#issue').val()=='' && $('#date').val()=='' && $('#pages').val()=='' && $('#chapters').val()=='' && $('#patron_notes').val()=='' ) {
if( m.length == 0 && $('#title').val()=='' && $('#author').val()=='' && $('#volume').val()=='' && $('#issue').val()=='' && $('#date').val()=='' && $('#pages').val()=='' && $('#chapters').val()=='' && $('#patron_notes').val()=='' && !$('input[name="toc_request"]').prop('checked') ) {
alert( _("Please fill in at least one field.") );
return 0;
}