diff --git a/login/login.ftl b/login/login.ftl new file mode 100644 index 0000000000000000000000000000000000000000..9c623122346791036ad9fceb3da9c85f6e873234 --- /dev/null +++ b/login/login.ftl @@ -0,0 +1,72 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayInfo=social.displayInfo displayWide=(realm.password && social.providers??); section> + <#if section = "header"> + ${msg("doLogIn")} + <#elseif section = "form"> + <div id="kc-form" <#if realm.password && social.providers??>class="${properties.kcContentWrapperClass!}"</#if>> + <div id="kc-form-wrapper" <#if realm.password && social.providers??>class="${properties.kcFormSocialAccountContentClass!} ${properties.kcFormSocialAccountClass!}"</#if>> + <#if realm.password> + <form id="kc-form-login" onsubmit="login.disabled = true; return true;" action="${url.loginAction}" method="post"> + <div class="${properties.kcFormGroupClass!}"> + <label for="username" class="${properties.kcLabelClass!}"><#if !realm.loginWithEmailAllowed><!--${msg("username")}-->PĹ™ihlašovacĂ jmĂ©no<#elseif !realm.registrationEmailAsUsername><!--${msg("usernameOrEmail")}-->PĹ™ihlašovacĂ jmĂ©no nebo e-mail<#else>${msg("email")}</#if></label> + + <#if usernameEditDisabled??> + <input tabindex="1" id="username" class="${properties.kcInputClass!}" name="username" value="${(login.username!'')}" type="text" disabled /> + <#else> + <input tabindex="1" id="username" class="${properties.kcInputClass!}" name="username" value="${(login.username!'')}" type="text" autofocus autocomplete="off" /> + </#if> + </div> + + <div class="${properties.kcFormGroupClass!}"> + <label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label> + <input tabindex="2" id="password" class="${properties.kcInputClass!}" name="password" type="password" autocomplete="off" /> + </div> + + <div class="${properties.kcFormGroupClass!} ${properties.kcFormSettingClass!}"> + <div id="kc-form-options"> + <#if realm.rememberMe && !usernameEditDisabled??> + <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> + </div> + <div class="${properties.kcFormOptionsWrapperClass!}"> + <#if realm.resetPasswordAllowed> + <span><a tabindex="5" href="${url.loginResetCredentialsUrl}">${msg("doForgotPassword")}</a></span> + </#if> + </div> + + </div> + + <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>/> + <input tabindex="4" class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" name="login" id="kc-login" type="submit" value="${msg("doLogIn")}"/> + </div> + </form> + </#if> + </div> + <#if realm.password && social.providers??> + <div id="kc-social-providers" class="${properties.kcFormSocialAccountContentClass!} ${properties.kcFormSocialAccountClass!}"> + <ul class="${properties.kcFormSocialAccountListClass!} <#if social.providers?size gt 4>${properties.kcFormSocialAccountDoubleListClass!}</#if>"> + <#list social.providers as p> + <li class="${properties.kcFormSocialAccountListLinkClass!}"><a href="${p.loginUrl}" id="zocial-${p.alias}" class="zocial ${p.providerId}"> <span>${p.displayName}</span></a></li> + </#list> + </ul> + </div> + </#if> + </div> + <#elseif section = "info" > + <#if realm.password && realm.registrationAllowed && !registrationDisabled??> + <div id="kc-registration"> + <span>${msg("noAccount")} <a tabindex="6" href="${url.registrationUrl}">${msg("doRegister")}</a></span> + </div> + </#if> + </#if> + +</@layout.registrationLayout> diff --git a/login/register.ftl b/login/register.ftl new file mode 100644 index 0000000000000000000000000000000000000000..b6dd7fd955ceeb5a346f16e0807eb429d14bdacf --- /dev/null +++ b/login/register.ftl @@ -0,0 +1,89 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout; section> + <#if section = "header"> + ${msg("registerTitle")} + <#elseif section = "form"> + <form id="kc-register-form" class="${properties.kcFormClass!}" action="${url.registrationAction}" method="post"> + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('firstName',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="firstName" class="${properties.kcLabelClass!}">${msg("firstName")}</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="text" id="firstName" class="${properties.kcInputClass!}" name="firstName" value="${(register.formData.firstName!'')}" /> + </div> + </div> + + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('lastName',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="lastName" class="${properties.kcLabelClass!}">${msg("lastName")}</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="text" id="lastName" class="${properties.kcInputClass!}" name="lastName" value="${(register.formData.lastName!'')}" /> + </div> + </div> + + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('email',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="email" class="${properties.kcLabelClass!}">${msg("email")}</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="text" id="email" class="${properties.kcInputClass!}" name="email" value="${(register.formData.email!'')}" autocomplete="email" pattern=".+@(?!pirati\.cz).+" /> + nepouĹľĂvejte @pirati.cz ale osobnĂ email + </div> + </div> + + <#if !realm.registrationEmailAsUsername> + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('username',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="username" class="${properties.kcLabelClass!}"><!--${msg("username")}-->PĹ™ihlašovacĂ jmĂ©no</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="text" id="username" class="${properties.kcInputClass!}" name="username" value="${(register.formData.username!'')}" autocomplete="username" pattern="[\w\x2d\x2e]{3,30}" /> + povoleny jsou pĂsmena, ÄŤĂsla, teÄŤka a podtrĹľĂtko + </div> + </div> + </#if> + + <#if passwordRequired??> + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('password',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="password" id="password" class="${properties.kcInputClass!}" name="password" autocomplete="new-password"/> + minimálnÄ› 10 znakĹŻ, doporuÄŤujeme pouĹľĂvat heslovou frázi (Passphrase) + </div> + </div> + + <div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('password-confirm',properties.kcFormGroupErrorClass!)}"> + <div class="${properties.kcLabelWrapperClass!}"> + <label for="password-confirm" class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label> + </div> + <div class="${properties.kcInputWrapperClass!}"> + <input type="password" id="password-confirm" class="${properties.kcInputClass!}" name="password-confirm" /> + </div> + </div> + </#if> + + <#if recaptchaRequired??> + <div class="form-group"> + <div class="${properties.kcInputWrapperClass!}"> + <div class="g-recaptcha" data-size="compact" data-sitekey="${recaptchaSiteKey}"></div> + </div> + </div> + </#if> + + <div class="${properties.kcFormGroupClass!}"> + <div id="kc-form-options" class="${properties.kcFormOptionsClass!}"> + <div class="${properties.kcFormOptionsWrapperClass!}"> + <span><a href="${url.loginUrl}">${kcSanitize(msg("backToLogin"))?no_esc}</a></span> + </div> + </div> + + <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}"> + <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doRegister")}"/> + </div> + </div> + </form> + </#if> +</@layout.registrationLayout>