confirmationModal.js

15 lines | 436 B Blame History Raw Download
function onConfirmationCheckboxClicked(element) {
    var checkbox = $(element).find('input');
    var button = checkbox.parent().parent().parent().parent().find('.modal-footer').find('input:first');

    if (checkbox.is(":checked")) {
        button.removeAttr('disabled');
    } else {
        button.attr('disabled', 'disabled');
    };
};

function removeConfirmationModal(element) {
    $('.modal-backdrop.fade.show').remove();
};