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

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