add session expiration fields to auth method form and model

This commit is contained in:
Eduardo Silva
2026-03-16 09:49:29 -03:00
parent 491e78efdb
commit 6591eca65b
7 changed files with 106 additions and 4 deletions

View File

@@ -41,18 +41,22 @@
$(document).ready(function () {
function toggleFields() {
var authType = $('#id_auth_type').val();
if (authType === 'local_password' || authType === 'ip_address') {
if (authType === 'local_password') {
$('.totp-group').hide();
$('.oidc-group').hide();
$('.expiration-group').show();
} else if (authType === 'totp') {
$('.totp-group').show();
$('.oidc-group').hide();
$('.expiration-group').hide();
} else if (authType === 'oidc') {
$('.totp-group').hide();
$('.oidc-group').show();
$('.expiration-group').show();
} else {
$('.totp-group').hide();
$('.oidc-group').hide();
$('.expiration-group').hide();
}
}