更改字段名

main
落雨楓 2 days ago
parent bdf9142153
commit 3bd254c1c6

@ -20,8 +20,8 @@
<div id="kc-form-wrapper">
<#if realm.password>
<form id="kc-form-login" class="${properties.kcFormClass!}" onsubmit="login.disabled = true; return true;" action="${url.loginAction}" method="post" novalidate="novalidate">
<input type="hidden" id="login-type" name="loginType" value="${form.loginType!'username'}"/>
<@tabs.tabsBar panelId="login-panel" filled=true pill=true activedId=form.loginType!'username'>
<input type="hidden" id="credential-type" name="credentialType" value="${form.credentialType!'username'}"/>
<@tabs.tabsBar panelId="login-panel" filled=true pill=true activedId=form.credentialType!'username'>
<@tabs.tabButton tabId="password" panelId="login-panel" label="loginByUsername" active=true />
<@tabs.tabButton tabId="phone" panelId="login-panel" label="loginByPhone" />
</@tabs.tabsBar>

@ -12,9 +12,9 @@
loadCSS('${url.resourcesPath}/css/component/smsSenderForm.css');
</script>
<form id="kc-reset-password-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
<input type="hidden" id="validation-type" name="validationType" value="${form.validationType!'email'}"/>
<input type="hidden" id="credential-type" name="credentialType" value="${form.credentialType!'email'}"/>
<@tabs.tabsBar panelId="reset-password-panel" filled=true pill=true activedId=form.validationType!'email'>
<@tabs.tabsBar panelId="reset-password-panel" filled=true pill=true activedId=form.credentialType!'email'>
<@tabs.tabButton tabId="email" panelId="reset-password-panel" label="resetPasswordByEmail" />
<@tabs.tabButton tabId="phone" panelId="reset-password-panel" label="resetPasswordByPhone" />
</@tabs.tabsBar>

@ -9,7 +9,7 @@ document.addEventListener('DOMContentLoaded', function () {
if (tabsBar) {
tabsBar.addEventListener('pf.tab.activate', function(event) {
const tabId = event.detail.tabId;
let loginTypeInput = document.querySelector('#login-type');
let loginTypeInput = document.querySelector('#credential-type');
loginTypeInput.value = tabId; // 'password' or 'phone'
});

@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', function () {
tabsBar.addEventListener('pf.tab.activate', function(event) {
console.log(event);
const tabId = event.detail.tabId;
let validationTypeInput = document.querySelector('#validation-type');
let validationTypeInput = document.querySelector('#credential-type');
validationTypeInput.value = tabId; // 'email' or 'phone'
});
} else {

Loading…
Cancel
Save