Skip to content

Commit 77d8332

Browse files
Merge pull request #30 from FusionAuth/kickstart-fix
Fixes kickstart template issue
2 parents 79404a7 + 29933c0 commit 77d8332

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5280
-10
lines changed

kickstart/css/styles.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ body {
3333
/* Changes for Powered by FusionAuth div */
3434
body > main main.page-body {
3535
min-height: calc(100vh - 3rem); /* to make the Powered by FusionAuth div position at the bottom of the page if the page is shorter than the viewport */
36-
padding-top: 5rem;
36+
padding-top: 3rem;
3737
}
3838
body > main {
3939
padding-bottom: 2.5rem; /* giving Powered by FusionAuth more space */
@@ -44,15 +44,10 @@ body > main {
4444
/* End Powered by FusionAuth */
4545

4646

47-
/* Uncomment following to hide help bar at top */
48-
/*
47+
/* Hiding help bar at top */
4948
body > main {
5049
padding-top: 0;
5150
}
52-
body > main header.app-header {
53-
display: none;
54-
}
55-
*/
5651
/* end help bar */
5752

5853

@@ -186,7 +181,7 @@ input[type="url"],
186181
input[type="password"],
187182
textarea,
188183
label.select select
189-
{
184+
{
190185
background: var(--input-background);
191186
border: 1px solid var(--border-color) !important;
192187
border-radius: .25rem !important;

kickstart/kickstart.json

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,64 @@
138138
"method": "POST",
139139
"url": "/api/theme/#{newThemeId}",
140140
"body": {
141-
"sourceThemeId": "75a068fd-e94b-451a-9aeb-3ddb9a3b5987",
142141
"theme": {
143-
"name": "React theme"
142+
"name": "Thymeleaf theme",
143+
"defaultMessages": "@{templates/defaultMessages.txt}",
144+
"stylesheet": "@{css/styles.css}",
145+
"templates": {
146+
"accountEdit": "@{templates/accountEdit.ftl}",
147+
"accountIndex": "@{templates/accountIndex.ftl}",
148+
"accountTwoFactorDisable": "@{templates/accountTwoFactorDisable.ftl}",
149+
"accountTwoFactorEnable": "@{templates/accountTwoFactorEnable.ftl}",
150+
"accountTwoFactorIndex": "@{templates/accountTwoFactorIndex.ftl}",
151+
"accountWebAuthnAdd": "@{templates/accountWebAuthnAdd.ftl}",
152+
"accountWebAuthnDelete": "@{templates/accountWebAuthnDelete.ftl}",
153+
"accountWebAuthnIndex": "@{templates/accountWebAuthnIndex.ftl}",
154+
"confirmationRequired": "@{templates/confirmationRequired.ftl}",
155+
"emailComplete": "@{templates/emailComplete.ftl}",
156+
"emailSend": "@{templates/emailSend.ftl}",
157+
"emailSent": "@{templates/emailSent.ftl}",
158+
"emailVerificationRequired": "@{templates/emailVerificationRequired.ftl}",
159+
"emailVerify": "@{templates/emailVerify.ftl}",
160+
"helpers": "@{templates/helpers.ftl}",
161+
"index": "@{templates/index.ftl}",
162+
"oauth2Authorize": "@{templates/oauth2Authorize.ftl}",
163+
"oauth2AuthorizedNotRegistered": "@{templates/oauth2AuthorizedNotRegistered.ftl}",
164+
"oauth2ChildRegistrationNotAllowed": "@{templates/oauth2ChildRegistrationNotAllowed.ftl}",
165+
"oauth2ChildRegistrationNotAllowedComplete": "@{templates/oauth2ChildRegistrationNotAllowedComplete.ftl}",
166+
"oauth2CompleteRegistration": "@{templates/oauth2CompleteRegistration.ftl}",
167+
"oauth2Consent": "@{templates/oauth2Consent.ftl}",
168+
"oauth2Device": "@{templates/oauth2Device.ftl}",
169+
"oauth2DeviceComplete": "@{templates/oauth2DeviceComplete.ftl}",
170+
"oauth2Error": "@{templates/oauth2Error.ftl}",
171+
"oauth2Logout": "@{templates/oauth2Logout.ftl}",
172+
"oauth2Passwordless": "@{templates/oauth2Passwordless.ftl}",
173+
"oauth2Register": "@{templates/oauth2Register.ftl}",
174+
"oauth2StartIdPLink": "@{templates/oauth2StartIdPLink.ftl}",
175+
"oauth2TwoFactor": "@{templates/oauth2TwoFactor.ftl}",
176+
"oauth2TwoFactorEnable": "@{templates/oauth2TwoFactorEnable.ftl}",
177+
"oauth2TwoFactorEnableComplete": "@{templates/oauth2TwoFactorEnableComplete.ftl}",
178+
"oauth2TwoFactorMethods": "@{templates/oauth2TwoFactorMethods.ftl}",
179+
"oauth2Wait": "@{templates/oauth2Wait.ftl}",
180+
"oauth2WebAuthn": "@{templates/oauth2WebAuthn.ftl}",
181+
"oauth2WebAuthnReauth": "@{templates/oauth2WebAuthnReauth.ftl}",
182+
"oauth2WebAuthnReauthEnable": "@{templates/oauth2WebAuthnReauthEnable.ftl}",
183+
"passwordChange": "@{templates/passwordChange.ftl}",
184+
"passwordComplete": "@{templates/passwordComplete.ftl}",
185+
"passwordForgot": "@{templates/passwordForgot.ftl}",
186+
"passwordSent": "@{templates/passwordSent.ftl}",
187+
"phoneComplete": "Phone complete template",
188+
"phoneSent": "Phone sent template",
189+
"phoneVerificationRequired": "Phone verification required template",
190+
"phoneVerify": "Phone verify template",
191+
"registrationComplete": "@{templates/registrationComplete.ftl}",
192+
"registrationSend": "@{templates/registrationSend.ftl}",
193+
"registrationSent": "@{templates/registrationSent.ftl}",
194+
"registrationVerificationRequired": "@{templates/registrationVerificationRequired.ftl}",
195+
"registrationVerify": "@{templates/registrationVerify.ftl}",
196+
"samlv2Logout": "@{templates/samlv2Logout.ftl}",
197+
"unauthorized" : "@{templates/unauthorized.ftl}"
198+
}
144199
}
145200
}
146201
},
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
[#ftl/]
2+
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
3+
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
4+
[#-- @ftlvariable name="currentUser" type="io.fusionauth.domain.User" --]
5+
[#-- @ftlvariable name="fields" type="java.util.Map<java.lang.Integer, java.util.List<io.fusionauth.domain.form.FormField>>" --]
6+
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]
7+
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
8+
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
9+
[#-- @ftlvariable name="passwordSet" type="boolean" --]
10+
11+
[#import "../_helpers.ftl" as helpers/]
12+
13+
[#function generateSectionLabel sectionNumber tenantId]
14+
[#-- Tenant specific, not tenant specific, then default --]
15+
[#local sectionLabel = theme.optionalMessage("[${tenantId}]{self-service-form}${sectionNumber}")/]
16+
[#local resolvedLabel = sectionLabel != "[${tenantId}]{self-service-form}${sectionNumber}"/]
17+
[#if !resolvedLabel]
18+
[#local sectionLabel = theme.optionalMessage("{self-service-form}${sectionNumber}")/]
19+
[#local resolvedLabel = sectionLabel != "{self-service-form}${sectionNumber}"/]
20+
[/#if]
21+
[#if !resolvedLabel]
22+
[#return ""/]
23+
[#else]
24+
[#return sectionLabel /]
25+
[/#if]
26+
[/#function]
27+
28+
[@helpers.html]
29+
[@helpers.head title=theme.message("account")/]
30+
[@helpers.body]
31+
[@helpers.header]
32+
[#-- Custom header code goes here --]
33+
<script src="${request.contextPath}/js/ui/Main.js?version=${version}"></script>
34+
[/@helpers.header]
35+
36+
[@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")]
37+
[@helpers.accountPanel title="" tenant=tenant user=currentUser action="edit" showEdit=true]
38+
<div class="row" style="border-bottom: 0;">
39+
<div class="col-xs-12 col-md-12">
40+
<form action="${request.contextPath}/account/edit" method="POST" class="full" id="user-form">
41+
[@helpers.hidden name="client_id" /]
42+
[@helpers.hidden name="tenantId" /]
43+
[#if fields?has_content]
44+
<fieldset>
45+
[#list fields as fieldKey, fieldValues]
46+
47+
[#-- Section labels --]
48+
[#assign sectionNumber = fieldKey + 1/]
49+
[#assign sectionLabel = generateSectionLabel(sectionNumber, tenantId) /]
50+
[#if sectionLabel?has_content]
51+
<legend> ${sectionLabel} </legend>
52+
[/#if]
53+
54+
[#list fieldValues as field]
55+
[#if field.key == "user.password"]
56+
[@helpers.passwordField field=field
57+
showCurrentPasswordField=(passwordSet && application.formConfiguration.selfServiceFormConfiguration.requireCurrentPasswordOnPasswordChange)/]
58+
[#else]
59+
[#assign key = field.key]
60+
[@helpers.customField field key field?is_first field.key /]
61+
62+
[#if field.confirm]
63+
[@helpers.customField field "confirm.${key}" false "[confirm]${field.key}" /]
64+
[/#if]
65+
[/#if]
66+
[/#list]
67+
[/#list]
68+
</fieldset>
69+
[/#if]
70+
<div class="form-row">
71+
[@helpers.button icon="save" text=theme.message("submit")/]
72+
</div>
73+
</form>
74+
</div>
75+
</div>
76+
[/@helpers.accountPanel]
77+
[/@helpers.accountMain]
78+
79+
[@helpers.footer]
80+
[#-- Custom footer code goes here --]
81+
[/@helpers.footer]
82+
[/@helpers.body]
83+
[/@helpers.html]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[#ftl/]
2+
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
3+
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
4+
[#-- @ftlvariable name="formConfigured" type="boolean" --]
5+
[#-- @ftlvariable name="multiFactorAvailable" type="boolean" --]
6+
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
7+
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
8+
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]
9+
[#-- @ftlvariable name="webauthnAvailable" type="boolean" --]
10+
11+
[#import "../_helpers.ftl" as helpers/]
12+
13+
[@helpers.html]
14+
[@helpers.head title=theme.message("account")]
15+
[#-- Custom header code goes here --]
16+
<script src="${request.contextPath}/js/ui/Main.js?version=${version}"></script>
17+
[/@helpers.head]
18+
[@helpers.body]
19+
[@helpers.header]
20+
[#-- Custom header code goes here --]
21+
[/@helpers.header]
22+
23+
[#assign actionURLs = multiFactorAvailable?then(["/account/two-factor/"], [])/]
24+
[#assign actionURLs = actionURLs + webauthnAvailable?then(["/account/webauthn/"], [])/]
25+
26+
[#assign actionTexts = multiFactorAvailable?then([theme.message("manage-two-factor")], [])/]
27+
[#assign actionTexts = actionTexts + webauthnAvailable?then([theme.message("manage-webauthn-passkeys")], [])/]
28+
29+
[@helpers.accountMain rowClass="row center" colClass="col-xs-12 col-sm-12 col-md-10 col-lg-8" actionURL=actionURLs actionText=actionTexts actionDirection="forward"]
30+
[@helpers.accountPanel title="" tenant=tenant user=user action="view" showEdit=formConfigured]
31+
<div class="row" style="border-bottom: 0;">
32+
<div class="col-xs-12 col-md-12">
33+
[#-- Example landing page. This can be customized and different values can be displayed from the user. --]
34+
<dl class="horizontal">
35+
<dt>${theme.message("user.email")}</dt>
36+
<dd>
37+
[#if user.verified ] <i data-tooltip="Email has been verified" class="green-text md-text fa fa-check"></i> [/#if]
38+
${helpers.display(user, "email")}
39+
</dd>
40+
</dl>
41+
<dl class="horizontal">
42+
<dt>${theme.message("user.phoneNumber")}</dt>
43+
<dd>${fusionAuth.phone_format(user.phoneNumber!"\x2013")}</dd>
44+
</dl>
45+
</div>
46+
</div>
47+
[/@helpers.accountPanel]
48+
[/@helpers.accountMain]
49+
50+
[@helpers.footer]
51+
[#-- Custom footer code goes here --]
52+
[/@helpers.footer]
53+
[/@helpers.body]
54+
[/@helpers.html]
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
[#ftl/]
2+
[#-- @ftlvariable name="application" type="io.fusionauth.domain.Application" --]
3+
[#-- @ftlvariable name="client_id" type="java.lang.String" --]
4+
[#-- @ftlvariable name="method" type="java.lang.String" --]
5+
[#-- @ftlvariable name="methodId" type="java.lang.String" --]
6+
[#-- @ftlvariable name="email" type="java.lang.String" --]
7+
[#-- @ftlvariable name="mobilePhone" type="java.lang.String" --]
8+
[#-- @ftlvariable name="tenant" type="io.fusionauth.domain.Tenant" --]
9+
[#-- @ftlvariable name="tenantId" type="java.util.UUID" --]
10+
[#-- @ftlvariable name="user" type="io.fusionauth.domain.User" --]
11+
12+
[#import "../../_helpers.ftl" as helpers/]
13+
14+
[#macro instructions method]
15+
<div class="d-flex">
16+
<div style="flex-grow: 1;">
17+
[#if method == "authenticator"]
18+
<p class="mt-0 mb-3">${theme.message("authenticator-disable-step-1")}</p>
19+
[#elseif method == "email" || method == "sms"]
20+
<p class="mt-0 mb-3">${theme.message("${method}-disable-step-1", (method == "email")?then(email, mobilePhone))}</p>
21+
<form id="send-two-factor-form" action="${request.contextPath}/account/two-factor/disable" method="POST" class="full">
22+
[@helpers.hidden name="action" value="send" /]
23+
[@helpers.hidden name="client_id" /]
24+
[@helpers.hidden name="tenantId" /]
25+
[@helpers.hidden name="methodId" /]
26+
[#-- Send a code --]
27+
[@helpers.button icon="arrow-circle-right" color="gray" text="${theme.message('send-one-time-code')}"/]
28+
</form>
29+
[/#if]
30+
</div>
31+
</div>
32+
[/#macro]
33+
34+
[@helpers.html]
35+
[@helpers.head title=theme.message("authenticator-configuration")/]
36+
[@helpers.body]
37+
38+
[@helpers.header]
39+
[#-- Custom header code goes here --]
40+
[/@helpers.header]
41+
42+
[@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")]
43+
[@helpers.accountPanelFull]
44+
45+
<fieldset class="pb-3">
46+
[#-- Heading --]
47+
<legend>${theme.message("disable-instructions")}</legend>
48+
49+
[#-- Instructions --]
50+
[@instructions method/]
51+
52+
<p class="mt-4">
53+
<strong>${theme.message('note')}</strong> ${theme.message('{description}two-factor-recovery-code-note')}
54+
</p>
55+
</fieldset>
56+
57+
<form id="two-factor-form" action="${request.contextPath}/account/two-factor/disable" method="POST" class="full">
58+
[@helpers.hidden name="client_id" /]
59+
[@helpers.hidden name="tenantId" /]
60+
[@helpers.hidden name="methodId" /]
61+
62+
<fieldset>
63+
[@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/]
64+
</fieldset>
65+
66+
<div class="form-row">
67+
[@helpers.button icon="save" text=theme.message("disable")/]
68+
</div>
69+
</form>
70+
[/@helpers.accountPanelFull]
71+
[/@helpers.accountMain]
72+
73+
[@helpers.footer]
74+
[#-- Custom footer code goes here --]
75+
[/@helpers.footer]
76+
77+
[/@helpers.body]
78+
[/@helpers.html]

0 commit comments

Comments
 (0)