yii2-netdisk/web/js/user-info.js

22 lines
653 B
JavaScript
Raw Normal View History

$(document).ready(function () {
$('#deleteConfirm').change(function () {
if (this.checked) {
$('#deleteButton').prop('disabled', false);
} else {
$('#deleteButton').prop('disabled', true);
}
});
$('#totp-enabled').change(function () {
if (this.checked) {
$('#totpSetupModal').modal('show');
}else {
$.post('index.php?r=user%2Fremove-two-factor', function () {
location.reload();
});
}
});
$('#totpSetupModal').on('hidden.bs.modal', function () {
$('#totp-enabled').prop('checked', false);
});
});