Merge pull request #3803 from Sibin387/patch-1

handle id==0 and cancellation of confirm dialog box
This commit is contained in:
Hillel Coren 2020-06-17 08:17:39 +03:00 committed by GitHub
commit bee9547a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,7 @@
} }
submittedForm = true; submittedForm = true;
if (id) { if (id || id===0) {
$('#public_id_{{ $entityType }}').val(id); $('#public_id_{{ $entityType }}').val(id);
} }
@ -180,6 +180,8 @@
sweetConfirm(function() { sweetConfirm(function() {
$('#action_{{ $entityType }}').val(action); $('#action_{{ $entityType }}').val(action);
$('form.listForm_{{ $entityType }}').submit(); $('form.listForm_{{ $entityType }}').submit();
}, null, null, function(){ // CancelCallback
submittedForm = false;
}); });
} else { } else {
$('#action_{{ $entityType }}').val(action); $('#action_{{ $entityType }}').val(action);