handle id==0 and cancellation of confirm dialog box

handle id==0 and cancellation of confirm dialog box
This commit is contained in:
Sibin 2020-06-15 23:56:08 +05:30 committed by GitHub
parent 1f1acaa500
commit 382593a8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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