Bug 11395: prevent processing no record
If no record is selected, the modification should not be launched. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
155dc2e538
commit
c6ee16d93d
|
|
@ -41,11 +41,15 @@ $(document).ready(function() {
|
|||
}));
|
||||
|
||||
$("#mainformsubmit").click(function(){
|
||||
if ( $("#marc_modification_template_id").val() > 0 ) {
|
||||
return submitBackgroundJob(document.getElementById("process"));
|
||||
if ($("input[type=checkbox][name='record_id']:checked").length == 0 ) {
|
||||
alert(_("Please select at least one record to process"));
|
||||
return false;
|
||||
}
|
||||
alert(_("Please select a modification template."));
|
||||
return false;
|
||||
if ( $("#marc_modification_template_id").val() <= 0 ) {
|
||||
alert(_("Please select a modification template."));
|
||||
return false;
|
||||
}
|
||||
return submitBackgroundJob(document.getElementById("process"));
|
||||
});
|
||||
|
||||
$("#marc_modification_template_id").change(function(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue