Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,868 changes: 934 additions & 934 deletions kickstart/css/styles.css

Large diffs are not rendered by default.

59 changes: 57 additions & 2 deletions kickstart/kickstart.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,64 @@
"method": "POST",
"url": "/api/theme/#{newThemeId}",
"body": {
"sourceThemeId": "75a068fd-e94b-451a-9aeb-3ddb9a3b5987",
"theme": {
"name": "React theme"
"name": "Thymeleaf theme",
"defaultMessages": "@{templates/defaultMessages.txt}",
"stylesheet": "@{css/styles.css}",
"templates": {
"accountEdit": "@{templates/accountEdit.ftl}",
"accountIndex": "@{templates/accountIndex.ftl}",
"accountTwoFactorDisable": "@{templates/accountTwoFactorDisable.ftl}",
"accountTwoFactorEnable": "@{templates/accountTwoFactorEnable.ftl}",
"accountTwoFactorIndex": "@{templates/accountTwoFactorIndex.ftl}",
"accountWebAuthnAdd": "@{templates/accountWebAuthnAdd.ftl}",
"accountWebAuthnDelete": "@{templates/accountWebAuthnDelete.ftl}",
"accountWebAuthnIndex": "@{templates/accountWebAuthnIndex.ftl}",
"confirmationRequired": "@{templates/confirmationRequired.ftl}",
"emailComplete": "@{templates/emailComplete.ftl}",
"emailSend": "@{templates/emailSend.ftl}",
"emailSent": "@{templates/emailSent.ftl}",
"emailVerificationRequired": "@{templates/emailVerificationRequired.ftl}",
"emailVerify": "@{templates/emailVerify.ftl}",
"helpers": "@{templates/helpers.ftl}",
"index": "@{templates/index.ftl}",
"oauth2Authorize": "@{templates/oauth2Authorize.ftl}",
"oauth2AuthorizedNotRegistered": "@{templates/oauth2AuthorizedNotRegistered.ftl}",
"oauth2ChildRegistrationNotAllowed": "@{templates/oauth2ChildRegistrationNotAllowed.ftl}",
"oauth2ChildRegistrationNotAllowedComplete": "@{templates/oauth2ChildRegistrationNotAllowedComplete.ftl}",
"oauth2CompleteRegistration": "@{templates/oauth2CompleteRegistration.ftl}",
"oauth2Consent": "@{templates/oauth2Consent.ftl}",
"oauth2Device": "@{templates/oauth2Device.ftl}",
"oauth2DeviceComplete": "@{templates/oauth2DeviceComplete.ftl}",
"oauth2Error": "@{templates/oauth2Error.ftl}",
"oauth2Logout": "@{templates/oauth2Logout.ftl}",
"oauth2Passwordless": "@{templates/oauth2Passwordless.ftl}",
"oauth2Register": "@{templates/oauth2Register.ftl}",
"oauth2StartIdPLink": "@{templates/oauth2StartIdPLink.ftl}",
"oauth2TwoFactor": "@{templates/oauth2TwoFactor.ftl}",
"oauth2TwoFactorEnable": "@{templates/oauth2TwoFactorEnable.ftl}",
"oauth2TwoFactorEnableComplete": "@{templates/oauth2TwoFactorEnableComplete.ftl}",
"oauth2TwoFactorMethods": "@{templates/oauth2TwoFactorMethods.ftl}",
"oauth2Wait": "@{templates/oauth2Wait.ftl}",
"oauth2WebAuthn": "@{templates/oauth2WebAuthn.ftl}",
"oauth2WebAuthnReauth": "@{templates/oauth2WebAuthnReauth.ftl}",
"oauth2WebAuthnReauthEnable": "@{templates/oauth2WebAuthnReauthEnable.ftl}",
"passwordChange": "@{templates/passwordChange.ftl}",
"passwordComplete": "@{templates/passwordComplete.ftl}",
"passwordForgot": "@{templates/passwordForgot.ftl}",
"passwordSent": "@{templates/passwordSent.ftl}",
"phoneComplete": "Phone complete template",
"phoneSent": "Phone sent template",
"phoneVerificationRequired": "Phone verification required template",
"phoneVerify": "Phone verify template",
"registrationComplete": "@{templates/registrationComplete.ftl}",
"registrationSend": "@{templates/registrationSend.ftl}",
"registrationSent": "@{templates/registrationSent.ftl}",
"registrationVerificationRequired": "@{templates/registrationVerificationRequired.ftl}",
"registrationVerify": "@{templates/registrationVerify.ftl}",
"samlv2Logout": "@{templates/samlv2Logout.ftl}",
"unauthorized" : "@{templates/unauthorized.ftl}"
}
}
}
},
Expand Down
83 changes: 83 additions & 0 deletions kickstart/templates/accountEdit.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[#ftl/]
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
[#-- @ftlvariable name="currentUser" type="io.fusionauth.domain.User" --]
[#-- @ftlvariable name="fields" type="java.util.Map<java.lang.Integer, java.util.List<io.fusionauth.domain.form.FormField>>" --]
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
[#-- @ftlvariable name="passwordSet" type="boolean" --]

[#import "../_helpers.ftl" as helpers/]

[#function generateSectionLabel sectionNumber tenantId]
[#-- Tenant specific, not tenant specific, then default --]
[#local sectionLabel = theme.optionalMessage("[${tenantId}]{self-service-form}${sectionNumber}")/]
[#local resolvedLabel = sectionLabel != "[${tenantId}]{self-service-form}${sectionNumber}"/]
[#if !resolvedLabel]
[#local sectionLabel = theme.optionalMessage("{self-service-form}${sectionNumber}")/]
[#local resolvedLabel = sectionLabel != "{self-service-form}${sectionNumber}"/]
[/#if]
[#if !resolvedLabel]
[#return ""/]
[#else]
[#return sectionLabel /]
[/#if]
[/#function]

[@helpers.html]
[@helpers.head title=theme.message("account")/]
[@helpers.body]
[@helpers.header]
[#-- Custom header code goes here --]
<script src="${request.contextPath}/js/ui/Main.js?version=${version}"></script>
[/@helpers.header]

[@helpers.accountMain rowClass="row center" colClass="col-xs-12 col-sm-12 col-md-10 col-lg-8" actionURL="/account/" actionText=theme.message("cancel-go-back")]
[@helpers.accountPanel title="" tenant=tenant user=currentUser action="edit" showEdit=true]
<div class="row" style="border-bottom: 0;">
<div class="col-xs-12 col-md-12">
<form action="${request.contextPath}/account/edit" method="POST" class="full" id="user-form">
[@helpers.hidden name="client_id" /]
[@helpers.hidden name="tenantId" /]
[#if fields?has_content]
<fieldset>
[#list fields as fieldKey, fieldValues]

[#-- Section labels --]
[#assign sectionNumber = fieldKey + 1/]
[#assign sectionLabel = generateSectionLabel(sectionNumber, tenantId) /]
[#if sectionLabel?has_content]
<legend> ${sectionLabel} </legend>
[/#if]

[#list fieldValues as field]
[#if field.key == "user.password"]
[@helpers.passwordField field=field
showCurrentPasswordField=(passwordSet && application.formConfiguration.selfServiceFormConfiguration.requireCurrentPasswordOnPasswordChange)/]
[#else]
[#assign key = field.key]
[@helpers.customField field key field?is_first field.key /]

[#if field.confirm]
[@helpers.customField field "confirm.${key}" false "[confirm]${field.key}" /]
[/#if]
[/#if]
[/#list]
[/#list]
</fieldset>
[/#if]
<div class="form-row">
[@helpers.button icon="save" text=theme.message("submit")/]
</div>
</form>
</div>
</div>
[/@helpers.accountPanel]
[/@helpers.accountMain]

[@helpers.footer]
[#-- Custom footer code goes here --]
[/@helpers.footer]
[/@helpers.body]
[/@helpers.html]
54 changes: 54 additions & 0 deletions kickstart/templates/accountIndex.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[#ftl/]
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
[#-- @ftlvariable name="formConfigured" type="boolean" --]
[#-- @ftlvariable name="multiFactorAvailable" type="boolean" --]
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]
[#-- @ftlvariable name="webauthnAvailable" type="boolean" --]

[#import "../_helpers.ftl" as helpers/]

[@helpers.html]
[@helpers.head title=theme.message("account")]
[#-- Custom header code goes here --]
<script src="${request.contextPath}/js/ui/Main.js?version=${version}"></script>
[/@helpers.head]
[@helpers.body]
[@helpers.header]
[#-- Custom header code goes here --]
[/@helpers.header]

[#assign actionURLs = multiFactorAvailable?then(["/account/two-factor/"], [])/]
[#assign actionURLs = actionURLs + webauthnAvailable?then(["/account/webauthn/"], [])/]

[#assign actionTexts = multiFactorAvailable?then([theme.message("manage-two-factor")], [])/]
[#assign actionTexts = actionTexts + webauthnAvailable?then([theme.message("manage-webauthn-passkeys")], [])/]

[@helpers.accountMain rowClass="row center" colClass="col-xs-12 col-sm-12 col-md-10 col-lg-8" actionURL=actionURLs actionText=actionTexts actionDirection="forward"]
[@helpers.accountPanel title="" tenant=tenant user=user action="view" showEdit=formConfigured]
<div class="row" style="border-bottom: 0;">
<div class="col-xs-12 col-md-12">
[#-- Example landing page. This can be customized and different values can be displayed from the user. --]
<dl class="horizontal">
<dt>${theme.message("user.email")}</dt>
<dd>
[#if user.verified ] <i data-tooltip="Email has been verified" class="green-text md-text fa fa-check"></i> [/#if]
${helpers.display(user, "email")}
</dd>
</dl>
<dl class="horizontal">
<dt>${theme.message("user.phoneNumber")}</dt>
<dd>${fusionAuth.phone_format(user.phoneNumber!"\x2013")}</dd>
</dl>
</div>
</div>
[/@helpers.accountPanel]
[/@helpers.accountMain]

[@helpers.footer]
[#-- Custom footer code goes here --]
[/@helpers.footer]
[/@helpers.body]
[/@helpers.html]
78 changes: 78 additions & 0 deletions kickstart/templates/accountTwoFactorDisable.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[#ftl/]
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
[#-- @ftlvariable name="method" type="java.lang.String" --]
[#-- @ftlvariable name="methodId" type="java.lang.String" --]
[#-- @ftlvariable name="email" type="java.lang.String" --]
[#-- @ftlvariable name="mobilePhone" type="java.lang.String" --]
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]

[#import "../../_helpers.ftl" as helpers/]

[#macro instructions method]
<div class="d-flex">
<div style="flex-grow: 1;">
[#if method == "authenticator"]
<p class="mt-0 mb-3">${theme.message("authenticator-disable-step-1")}</p>
[#elseif method == "email" || method == "sms"]
<p class="mt-0 mb-3">${theme.message("${method}-disable-step-1", (method == "email")?then(email, mobilePhone))}</p>
<form id="send-two-factor-form" action="${request.contextPath}/account/two-factor/disable" method="POST" class="full">
[@helpers.hidden name="action" value="send" /]
[@helpers.hidden name="client_id" /]
[@helpers.hidden name="tenantId" /]
[@helpers.hidden name="methodId" /]
[#-- Send a code --]
[@helpers.button icon="arrow-circle-right" color="gray" text="${theme.message('send-one-time-code')}"/]
</form>
[/#if]
</div>
</div>
[/#macro]

[@helpers.html]
[@helpers.head title=theme.message("authenticator-configuration")/]
[@helpers.body]

[@helpers.header]
[#-- Custom header code goes here --]
[/@helpers.header]

[@helpers.accountMain rowClass="row center" colClass="col-xs-12 col-sm-12 col-md-10 col-lg-8" actionURL="/account/two-factor/" actionText=theme.message("cancel-go-back")]
[@helpers.accountPanelFull]

<fieldset class="pb-3">
[#-- Heading --]
<legend>${theme.message("disable-instructions")}</legend>

[#-- Instructions --]
[@instructions method/]

<p class="mt-4">
<strong>${theme.message('note')}</strong> ${theme.message('{description}two-factor-recovery-code-note')}
</p>
</fieldset>

<form id="two-factor-form" action="${request.contextPath}/account/two-factor/disable" method="POST" class="full">
[@helpers.hidden name="client_id" /]
[@helpers.hidden name="tenantId" /]
[@helpers.hidden name="methodId" /]

<fieldset>
[@helpers.input type="text" name="code" id="verification-code" label=theme.message("verification-code") placeholder="${theme.message('{placeholder}two-factor-code')}" autofocus=true autocapitalize="none" autocomplete="one-time-code" autocorrect="off" required=true/]
</fieldset>

<div class="form-row">
[@helpers.button icon="save" text=theme.message("disable")/]
</div>
</form>
[/@helpers.accountPanelFull]
[/@helpers.accountMain]

[@helpers.footer]
[#-- Custom footer code goes here --]
[/@helpers.footer]

[/@helpers.body]
[/@helpers.html]
Loading