From 8529c7634e0e423b695d3be17e59874b8d7efab1 Mon Sep 17 00:00:00 2001 From: Vincenzo Cestone Date: Tue, 16 Apr 2024 20:14:04 +0200 Subject: [PATCH] Synchronized template.ftl d4science theme with KC24 ftl(s); removed username regexp pattern check --- .../d4science/login/login-update-profile.ftl | 132 ------------ .../theme/d4science/login/register.ftl | 191 ------------------ .../theme/d4science/login/template.ftl | 23 ++- 3 files changed, 16 insertions(+), 330 deletions(-) delete mode 100644 keycloak-d4science-theme/src/main/resources/theme/d4science/login/login-update-profile.ftl delete mode 100644 keycloak-d4science-theme/src/main/resources/theme/d4science/login/register.ftl diff --git a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/login-update-profile.ftl b/keycloak-d4science-theme/src/main/resources/theme/d4science/login/login-update-profile.ftl deleted file mode 100644 index b5f017a..0000000 --- a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/login-update-profile.ftl +++ /dev/null @@ -1,132 +0,0 @@ -<#import "template.ftl" as layout> -<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','email','firstName','lastName'); section> - <#if section = "header"> - ${msg("loginProfileTitle")} - <#elseif section = "form"> -
- <#if user.editUsernameAllowed> -
-
- -
-
- - - - <#if messagesPerField.existsError('username')> - - ${kcSanitize(messagesPerField.get('username'))?no_esc} - - -
-
- - <#if user.editEmailAllowed> -
-
- -
-
- - - <#if messagesPerField.existsError('email')> - - ${kcSanitize(messagesPerField.get('email'))?no_esc} - - -
-
- - -
-
- -
-
- - - <#if messagesPerField.existsError('firstName')> - - ${kcSanitize(messagesPerField.get('firstName'))?no_esc} - - -
-
- -
-
- -
-
- - - <#if messagesPerField.existsError('lastName')> - - ${kcSanitize(messagesPerField.get('lastName'))?no_esc} - - -
-
- -
-
-
-
-
- - -
- <#if isAppInitiatedAction??> - - - <#else> - - -
-
-
- - - - - diff --git a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/register.ftl b/keycloak-d4science-theme/src/main/resources/theme/d4science/login/register.ftl deleted file mode 100644 index d31f050..0000000 --- a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/register.ftl +++ /dev/null @@ -1,191 +0,0 @@ -<#import "template.ftl" as layout> -<#import "register-commons.ftl" as registerCommons> -<@layout.registrationLayout displayMessage=!messagesPerField.existsError('firstName','lastName','email','username','password','password-confirm'); section> - <#if section = "header"> - ${msg("registerTitle")} - <#elseif section = "form"> -
-
-
- -
-
- - - <#if messagesPerField.existsError('firstName')> - - ${kcSanitize(messagesPerField.get('firstName'))?no_esc} - - -
-
- -
-
- -
-
- - - <#if messagesPerField.existsError('lastName')> - - ${kcSanitize(messagesPerField.get('lastName'))?no_esc} - - -
-
- -
-
- -
-
- - - <#if messagesPerField.existsError('email')> - - ${kcSanitize(messagesPerField.get('email'))?no_esc} - - -
-
- - <#if !realm.registrationEmailAsUsername> -
-
- -
-
- - - - <#if messagesPerField.existsError('username')> - - ${kcSanitize(messagesPerField.get('username'))?no_esc} - - -
-
- - - <#if passwordRequired??> -
-
- -
-
-
- - -
- - - <#if messagesPerField.existsError('password')> - - ${kcSanitize(messagesPerField.get('password'))?no_esc} - - -
-
- -
-
- -
-
-
- - -
- - <#if messagesPerField.existsError('password-confirm')> - - ${kcSanitize(messagesPerField.get('password-confirm'))?no_esc} - - -
-
- - - <@registerCommons.termsAcceptance/> - - <#if recaptchaRequired??> -
-
-
-
-
- - - -
- - - - - - diff --git a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/template.ftl b/keycloak-d4science-theme/src/main/resources/theme/d4science/login/template.ftl index 4f9b22f..8c66dc5 100644 --- a/keycloak-d4science-theme/src/main/resources/theme/d4science/login/template.ftl +++ b/keycloak-d4science-theme/src/main/resources/theme/d4science/login/template.ftl @@ -30,6 +30,14 @@ + + <#if scripts??> <#list scripts as script> @@ -42,7 +50,7 @@ checkCookiesAndSetTimer( "${authenticationSession.authSessionId}", "${authenticationSession.tabId}", - "${url.ssoLoginInOtherTabsUrl}" + "${url.ssoLoginInOtherTabsUrl?no_esc}" ); @@ -90,13 +98,15 @@ <#if realm.internationalizationEnabled && locale.supported?size gt 1>
-
- ${locale.current} -
    + @@ -149,7 +159,6 @@ -