2024-03-07 20:35:50 +08:00
|
|
|
$(document).ready(function () {
|
|
|
|
$('#deleteConfirm').change(function () {
|
|
|
|
if (this.checked) {
|
2024-03-04 16:51:19 +08:00
|
|
|
$('#deleteButton').prop('disabled', false);
|
|
|
|
} else {
|
|
|
|
$('#deleteButton').prop('disabled', true);
|
|
|
|
}
|
|
|
|
});
|
2024-03-07 20:35:50 +08:00
|
|
|
$('#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);
|
|
|
|
});
|
|
|
|
|
2024-03-04 16:51:19 +08:00
|
|
|
});
|