base template for html emails (#8999) (#9001)

This commit is contained in:
Niko Köbler 2022-04-22 15:36:40 +02:00 committed by GitHub
parent aaaec9f6f5
commit c99cf0ed85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 37 additions and 40 deletions

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("emailTestBodyHtml",realmName))?no_esc} ${kcSanitize(msg("emailTestBodyHtml",realmName))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyCodeHtml",code))?no_esc} ${kcSanitize(msg("emailVerificationBodyCodeHtml",code))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("emailVerificationBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc} ${kcSanitize(msg("emailVerificationBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("eventLoginErrorBodyHtml",event.date,event.ipAddress))?no_esc} ${kcSanitize(msg("eventLoginErrorBodyHtml",event.date,event.ipAddress))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("eventRemoveTotpBodyHtml",event.date, event.ipAddress))?no_esc} ${kcSanitize(msg("eventRemoveTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("eventUpdatePasswordBodyHtml",event.date, event.ipAddress))?no_esc} ${kcSanitize(msg("eventUpdatePasswordBodyHtml",event.date, event.ipAddress))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("eventUpdateTotpBodyHtml",event.date, event.ipAddress))?no_esc} ${kcSanitize(msg("eventUpdateTotpBodyHtml",event.date, event.ipAddress))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -2,8 +2,7 @@
<#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, </#sep></#items></#list></#if></#assign> <#assign requiredActionsText><#if requiredActions??><#list requiredActions><#items as reqActionItem>${msg("requiredAction.${reqActionItem}")}<#sep>, </#sep></#items></#list></#if></#assign>
</#outputformat> </#outputformat>
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("executeActionsBodyHtml",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc} ${kcSanitize(msg("executeActionsBodyHtml",link, linkExpiration, realmName, requiredActionsText, linkExpirationFormatter(linkExpiration)))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("identityProviderLinkBodyHtml", identityProviderAlias, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration)))?no_esc} ${kcSanitize(msg("identityProviderLinkBodyHtml", identityProviderAlias, realmName, identityProviderContext.username, link, linkExpiration, linkExpirationFormatter(linkExpiration)))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -1,5 +1,4 @@
<html> <#import "template.ftl" as layout>
<body> <@layout.emailLayout>
${kcSanitize(msg("passwordResetBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc} ${kcSanitize(msg("passwordResetBodyHtml",link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc}
</body> </@layout.emailLayout>
</html>

View file

@ -0,0 +1,7 @@
<#macro emailLayout>
<html>
<body>
<#nested>
</body>
</html>
</#macro>