show and hide 2fa swtich

This commit is contained in:
marcos 2020-11-25 10:50:06 +01:00
parent 51322b48d7
commit 73f931d516
1 changed files with 13 additions and 10 deletions

View File

@ -334,17 +334,20 @@ echo '</form>';
$( document ).ready(function() {
//For change autocreate remote users
$('input[type=checkbox][name=double_auth_enabled]').change(function () {
if ($('input[type=checkbox][name=double_auth_enabled]:checked').val() == 1) {
$('#table1-2FA_all_users').show();
}
else {
$('#table1-2FA_all_users').hide();
$('input[type=checkbox][name=2FA_all_users][value=0]').prop('checked', false);
}
$('input[type=checkbox][name=double_auth_enabled]').change(function () {
if ($('input[type=checkbox][name=double_auth_enabled]:checked').val() == 1) {
$('#table1-2FA_all_users').show();
$('#table3-2FA_all_users').show();
$('#table5-2FA_all_users').show();
}
else {
$('input[type=checkbox][name=2FA_all_users][value=1]').prop('checked', false);
$('#table1-2FA_all_users').hide();
$('#table3-2FA_all_users').hide();
$('#table5-2FA_all_users').hide();
}
}).change();
});
});
$('#auth').on('change', function(){
type_auth = $('#auth').val();
$.ajax({