Fix "polarity" of modal form submit button

This commit is contained in:
Oliver Walters 2022-06-06 19:11:53 +10:00
parent e85d9aca52
commit 0e4550f288

View File

@ -639,13 +639,13 @@ function insertConfirmButton(options) {
$(options.modal).find('#modal-footer-buttons').append(html); $(options.modal).find('#modal-footer-buttons').append(html);
// Disable the 'submit' button // Disable the 'submit' button
enableSubmitButton(options, true); enableSubmitButton(options, false);
// Trigger event // Trigger event
$(options.modal).find('#modal-confirm').change(function() { $(options.modal).find('#modal-confirm').change(function() {
var enabled = this.checked; var enabled = this.checked;
enableSubmitButton(options, !enabled); enableSubmitButton(options, enabled);
}); });
} }