diff --git a/themes/src/main/resources/theme/base/email/html/email-test.ftl b/themes/src/main/resources/theme/base/email/html/email-test.ftl index 3a522728f4..bca248043c 100644 --- a/themes/src/main/resources/theme/base/email/html/email-test.ftl +++ b/themes/src/main/resources/theme/base/email/html/email-test.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("emailTestBodyHtml",realmName))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/email-verification-with-code.ftl b/themes/src/main/resources/theme/base/email/html/email-verification-with-code.ftl index 66e8925874..6a73f50ad3 100644 --- a/themes/src/main/resources/theme/base/email/html/email-verification-with-code.ftl +++ b/themes/src/main/resources/theme/base/email/html/email-verification-with-code.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("emailVerificationBodyCodeHtml",code))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/email-verification.ftl b/themes/src/main/resources/theme/base/email/html/email-verification.ftl index dacabd2525..9a2e318c88 100644 --- a/themes/src/main/resources/theme/base/email/html/email-verification.ftl +++ b/themes/src/main/resources/theme/base/email/html/email-verification.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("emailVerificationBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/event-login_error.ftl b/themes/src/main/resources/theme/base/email/html/event-login_error.ftl index 022c024dae..7ab9401d84 100644 --- a/themes/src/main/resources/theme/base/email/html/event-login_error.ftl +++ b/themes/src/main/resources/theme/base/email/html/event-login_error.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("eventLoginErrorBodyHtml",event.date,event.ipAddress))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/event-remove_totp.ftl b/themes/src/main/resources/theme/base/email/html/event-remove_totp.ftl index 9a56ed387c..6058bbe00a 100644 --- a/themes/src/main/resources/theme/base/email/html/event-remove_totp.ftl +++ b/themes/src/main/resources/theme/base/email/html/event-remove_totp.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("eventRemoveTotpBodyHtml",event.date, event.ipAddress))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/event-update_password.ftl b/themes/src/main/resources/theme/base/email/html/event-update_password.ftl index 27825c72df..8a802ecc4d 100644 --- a/themes/src/main/resources/theme/base/email/html/event-update_password.ftl +++ b/themes/src/main/resources/theme/base/email/html/event-update_password.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("eventUpdatePasswordBodyHtml",event.date, event.ipAddress))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/event-update_totp.ftl b/themes/src/main/resources/theme/base/email/html/event-update_totp.ftl index 3ed37c38b6..f58c38ab64 100644 --- a/themes/src/main/resources/theme/base/email/html/event-update_totp.ftl +++ b/themes/src/main/resources/theme/base/email/html/event-update_totp.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("eventUpdateTotpBodyHtml",event.date, event.ipAddress))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/executeActions.ftl b/themes/src/main/resources/theme/base/email/html/executeActions.ftl index 4c837bcbb6..73d4075502 100755 --- a/themes/src/main/resources/theme/base/email/html/executeActions.ftl +++ b/themes/src/main/resources/theme/base/email/html/executeActions.ftl @@ -2,8 +2,7 @@ <#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("executeActionsBodyHtml",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc} - - + diff --git a/themes/src/main/resources/theme/base/email/html/identity-provider-link.ftl b/themes/src/main/resources/theme/base/email/html/identity-provider-link.ftl index 8b67968e17..2d378df1d0 100644 --- a/themes/src/main/resources/theme/base/email/html/identity-provider-link.ftl +++ b/themes/src/main/resources/theme/base/email/html/identity-provider-link.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("identityProviderLinkBodyHtml", identityProviderAlias, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration)))?no_esc} - - \ No newline at end of file + diff --git a/themes/src/main/resources/theme/base/email/html/password-reset.ftl b/themes/src/main/resources/theme/base/email/html/password-reset.ftl index b2840b6300..b0de263294 100755 --- a/themes/src/main/resources/theme/base/email/html/password-reset.ftl +++ b/themes/src/main/resources/theme/base/email/html/password-reset.ftl @@ -1,5 +1,4 @@ - - +<#import "template.ftl" as layout> +<@layout.emailLayout> ${kcSanitize(msg("passwordResetBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc} - - \ No newline at end of file + diff --git a/themes/src/main/resources/theme/base/email/html/template.ftl b/themes/src/main/resources/theme/base/email/html/template.ftl new file mode 100644 index 0000000000..fd2ea5df2a --- /dev/null +++ b/themes/src/main/resources/theme/base/email/html/template.ftl @@ -0,0 +1,7 @@ +<#macro emailLayout> + + + <#nested> + + +