show and hide 2fa swtich

This commit is contained in:
marcos 2020-11-25 10:50:06 +01:00
parent 51322b48d7
commit 73f931d516

View File

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