2022-11-26 02:03:53 +00:00
|
|
|
<#import "template.ftl" as layout>
|
|
|
|
<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section>
|
2022-11-27 01:17:33 +00:00
|
|
|
<#if section = "header">
|
|
|
|
${msg("loginAccountTitle")}
|
|
|
|
<#elseif section = "form">
|
|
|
|
<#if realm.password>
|
|
|
|
<form class="ps-container" onsubmit="login.disabled = true; return true;" action="${url.loginAction}" method="post">
|
|
|
|
<#if !usernameHidden??>
|
|
|
|
<div class="${properties.kcFormGroupClass!}">
|
|
|
|
<label
|
|
|
|
for="username"
|
|
|
|
class="${properties.kcLabelClass!}"
|
|
|
|
>
|
|
|
|
<#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if>
|
|
|
|
</label>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<input
|
|
|
|
tabindex="1"
|
|
|
|
id="username"
|
|
|
|
class="${properties.kcInputClass!}"
|
|
|
|
name="username"
|
|
|
|
value="${(login.username!'')}"
|
|
|
|
type="text"
|
|
|
|
autofocus
|
|
|
|
autocomplete="off"
|
|
|
|
aria-invalid="<#if messagesPerField.existsError('username','password')>true</#if>"
|
|
|
|
/>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<#if messagesPerField.existsError('username','password')>
|
|
|
|
<span
|
|
|
|
id="input-error"
|
|
|
|
class="${properties.kcInputErrorMessageClass!}"
|
|
|
|
aria-live="polite"
|
|
|
|
>
|
|
|
|
${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc}
|
|
|
|
</span>
|
|
|
|
</#if>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
</div>
|
|
|
|
</#if>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<div class="${properties.kcFormGroupClass!}">
|
|
|
|
<label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<input
|
|
|
|
tabindex="2"
|
|
|
|
id="password"
|
|
|
|
class="${properties.kcInputClass!}"
|
|
|
|
name="password"
|
|
|
|
type="password"
|
|
|
|
autocomplete="off"
|
|
|
|
aria-invalid="<#if messagesPerField.existsError('username','password')>true</#if>"
|
|
|
|
/>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<#if usernameHidden?? && messagesPerField.existsError('username','password')>
|
|
|
|
<span id="input-error" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
|
|
|
|
${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc}
|
|
|
|
</span>
|
|
|
|
</#if>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
</div>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<div class="${properties.kcFormGroupClass!} ${properties.kcFormSettingClass!}">
|
|
|
|
<#if realm.rememberMe && !usernameHidden??>
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<#if login.rememberMe??>
|
|
|
|
<input tabindex="3" id="rememberMe" name="rememberMe" type="checkbox" checked> ${msg("rememberMe")}
|
|
|
|
<#else>
|
|
|
|
<input tabindex="3" id="rememberMe" name="rememberMe" type="checkbox"> ${msg("rememberMe")}
|
|
|
|
</#if>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</#if>
|
|
|
|
<#if realm.resetPasswordAllowed>
|
|
|
|
<div class="${properties.kcFormOptionsWrapperClass!}">
|
|
|
|
<span><a tabindex="5" href="${url.loginResetCredentialsUrl}">${msg("doForgotPassword")}</a></span>
|
|
|
|
</div>
|
|
|
|
</#if>
|
|
|
|
</div>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<div id="kc-form-buttons" class="${properties.kcFormGroupClass!}">
|
|
|
|
<input type="hidden" id="id-hidden-input" name="credentialId" <#if auth.selectedCredential?has_content>value="${auth.selectedCredential}"</#if>/>
|
|
|
|
<button
|
|
|
|
tabindex="4"
|
|
|
|
class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}"
|
|
|
|
name="login"
|
|
|
|
id="kc-login"
|
|
|
|
type="submit"
|
|
|
|
>${msg("doLogIn")}</button>
|
2022-11-26 02:03:53 +00:00
|
|
|
</div>
|
2022-11-27 01:17:33 +00:00
|
|
|
</form>
|
|
|
|
</#if>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<#elseif section = "info" >
|
|
|
|
<#if realm.password && realm.registrationAllowed && !registrationDisabled??>
|
|
|
|
<div id="kc-registration-container">
|
|
|
|
<div id="kc-registration">
|
|
|
|
<span>${msg("noAccount")}
|
|
|
|
<a tabindex="6" href="${url.registrationUrl}">${msg("doRegister")}</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</#if>
|
|
|
|
<#elseif section = "socialProviders" >
|
|
|
|
<#if realm.password && social.providers??>
|
|
|
|
<div id="kc-social-providers" class="${properties.kcFormSocialAccountSectionClass!}">
|
|
|
|
<hr/>
|
|
|
|
<h4>${msg("identity-provider-login-label")}</h4>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
2022-11-27 01:17:33 +00:00
|
|
|
<ul class="${properties.kcFormSocialAccountListClass!} <#if social.providers?size gt 3>${properties.kcFormSocialAccountListGridClass!}</#if>">
|
|
|
|
<#list social.providers as p>
|
|
|
|
<a
|
|
|
|
id="social-${p.alias}"
|
|
|
|
class="${properties.kcFormSocialAccountListButtonClass!} <#if social.providers?size gt 3>${properties.kcFormSocialAccountGridItem!}</#if>"
|
|
|
|
type="button"
|
|
|
|
href="${p.loginUrl}"
|
|
|
|
>
|
|
|
|
<#if p.iconClasses?has_content>
|
|
|
|
<i class="${properties.kcCommonLogoIdP!} ${p.iconClasses!}" aria-hidden="true"></i>
|
|
|
|
<span class="${properties.kcFormSocialAccountNameClass!} kc-social-icon-text">${p.displayName!}</span>
|
|
|
|
<#else>
|
|
|
|
<span class="${properties.kcFormSocialAccountNameClass!}">${p.displayName!}</span>
|
|
|
|
</#if>
|
|
|
|
</a>
|
|
|
|
</#list>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2022-11-26 02:03:53 +00:00
|
|
|
</#if>
|
2022-11-27 01:17:33 +00:00
|
|
|
</#if>
|
2022-11-26 02:03:53 +00:00
|
|
|
|
|
|
|
</@layout.registrationLayout>
|