forked from mirrors/keywind
feat: add login idp pages (#1)
Co-authored-by: Anthony Lukin <anthony@lukin.dev>
This commit is contained in:
parent
ab7ff2aff3
commit
6f155c7a69
4 changed files with 155 additions and 10 deletions
21
theme/keywind/login/login-idp-link-confirm.ftl
Normal file
21
theme/keywind/login/login-idp-link-confirm.ftl
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<#import "template.ftl" as layout>
|
||||||
|
<#import "components/button/primary.ftl" as buttonPrimary>
|
||||||
|
|
||||||
|
<@layout.registrationLayout; section>
|
||||||
|
<#if section="header">
|
||||||
|
${msg("confirmLinkIdpTitle")}
|
||||||
|
<#elseif section="form">
|
||||||
|
<form action="${url.loginAction}" class="m-0 space-y-4" method="post">
|
||||||
|
<div>
|
||||||
|
<@buttonPrimary.kw name="submitAction" type="submit" value="updateProfile">
|
||||||
|
${msg("confirmLinkIdpReviewProfile")}
|
||||||
|
</@buttonPrimary.kw>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<@buttonPrimary.kw name="submitAction" type="submit" value="linkAccount">
|
||||||
|
${msg("confirmLinkIdpContinue", idpDisplayName)}
|
||||||
|
</@buttonPrimary.kw>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</#if>
|
||||||
|
</@layout.registrationLayout>
|
53
theme/keywind/login/login-update-password.ftl
Normal file
53
theme/keywind/login/login-update-password.ftl
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<#import "template.ftl" as layout>
|
||||||
|
<#import "components/button/primary.ftl" as buttonPrimary>
|
||||||
|
<#import "components/input/primary.ftl" as inputPrimary>
|
||||||
|
|
||||||
|
<@layout.registrationLayout
|
||||||
|
displayMessage=!messagesPerField.existsError("password", "password-confirm")
|
||||||
|
;
|
||||||
|
section
|
||||||
|
>
|
||||||
|
<#if section="header">
|
||||||
|
${msg("updatePasswordTitle")}
|
||||||
|
<#elseif section="form">
|
||||||
|
<form action="${url.loginAction}" class="m-0 space-y-4" method="post">
|
||||||
|
<input
|
||||||
|
autocomplete="username"
|
||||||
|
name="username"
|
||||||
|
type="hidden"
|
||||||
|
value="${username}"
|
||||||
|
>
|
||||||
|
<input autocomplete="current-password" name="password" type="hidden">
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="new-password"
|
||||||
|
autofocus=true
|
||||||
|
invalid=["password", "password-confirm"]
|
||||||
|
message=false
|
||||||
|
name="password-new"
|
||||||
|
type="password"
|
||||||
|
>
|
||||||
|
${msg("passwordNew")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="new-password"
|
||||||
|
invalid=["password-confirm"]
|
||||||
|
name="password-confirm"
|
||||||
|
type="password"
|
||||||
|
>
|
||||||
|
${msg("passwordConfirm")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<#-- TODO isAppInitiatedAction -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<@buttonPrimary.kw type="submit">
|
||||||
|
${msg("doSubmit")}
|
||||||
|
</@buttonPrimary.kw>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</#if>
|
||||||
|
</@layout.registrationLayout>
|
71
theme/keywind/login/login-update-profile.ftl
Normal file
71
theme/keywind/login/login-update-profile.ftl
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
<#import "template.ftl" as layout>
|
||||||
|
<#import "components/button/primary.ftl" as buttonPrimary>
|
||||||
|
<#import "components/input/primary.ftl" as inputPrimary>
|
||||||
|
|
||||||
|
<@layout.registrationLayout
|
||||||
|
displayMessage=!messagesPerField.existsError("email", "firstName", "lastName", "username")
|
||||||
|
;
|
||||||
|
section
|
||||||
|
>
|
||||||
|
<#if section="header">
|
||||||
|
${msg("loginProfileTitle")}
|
||||||
|
<#elseif section="form">
|
||||||
|
<form action="${url.loginAction}" class="m-0 space-y-4" method="post">
|
||||||
|
<#if user.editUsernameAllowed>
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="username"
|
||||||
|
autofocus=true
|
||||||
|
invalid=["username"]
|
||||||
|
name="username"
|
||||||
|
type="text"
|
||||||
|
value=(user.username)!''
|
||||||
|
>
|
||||||
|
${msg("username")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="email"
|
||||||
|
invalid=["email"]
|
||||||
|
name="email"
|
||||||
|
type="email"
|
||||||
|
value=(user.email)!''
|
||||||
|
>
|
||||||
|
${msg("email")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="given-name"
|
||||||
|
invalid=["firstName"]
|
||||||
|
name="firstName"
|
||||||
|
type="text"
|
||||||
|
value=(user.firstName)!''
|
||||||
|
>
|
||||||
|
${msg("firstName")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<@inputPrimary.kw
|
||||||
|
autocomplete="family-name"
|
||||||
|
invalid=["lastName"]
|
||||||
|
name="lastName"
|
||||||
|
type="text"
|
||||||
|
value=(user.lastName)!''
|
||||||
|
>
|
||||||
|
${msg("lastName")}
|
||||||
|
</@inputPrimary.kw>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<#-- TODO isAppInitiatedAction -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<@buttonPrimary.kw type="submit">
|
||||||
|
${msg("doSubmit")}
|
||||||
|
</@buttonPrimary.kw>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</#if>
|
||||||
|
</@layout.registrationLayout>
|
|
@ -51,16 +51,16 @@
|
||||||
</@inputPrimary.kw>
|
</@inputPrimary.kw>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<#if realm.rememberMe && !usernameEditDisabled??>
|
<#if realm.rememberMe && !usernameEditDisabled??>
|
||||||
<@checkboxPrimary.kw checked=login.rememberMe?? name="rememberMe">
|
<@checkboxPrimary.kw checked=login.rememberMe?? name="rememberMe">
|
||||||
${msg("rememberMe")}
|
${msg("rememberMe")}
|
||||||
</@checkboxPrimary.kw>
|
</@checkboxPrimary.kw>
|
||||||
</#if>
|
</#if>
|
||||||
<#if realm.resetPasswordAllowed>
|
<#if realm.resetPasswordAllowed>
|
||||||
<@linkPrimary.kw href=url.loginResetCredentialsUrl>
|
<@linkPrimary.kw href=url.loginResetCredentialsUrl>
|
||||||
<span class="text-sm">${msg("doForgotPassword")}</span>
|
<span class="text-sm">${msg("doForgotPassword")}</span>
|
||||||
</@linkPrimary.kw>
|
</@linkPrimary.kw>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
<@buttonPrimary.kw name="login" type="submit">
|
<@buttonPrimary.kw name="login" type="submit">
|
||||||
|
|
Loading…
Reference in a new issue