From 0a5a08229fcb9de8e8cbe2fbc13da51968749f7a Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 15 Jul 2024 14:47:29 +0200 Subject: [PATCH] Added template overrides (#31106) * Added template overrides fixes: #31021 Signed-off-by: Erik Jan de Wit * pr review comment Signed-off-by: Erik Jan de Wit * * removed duplicated javascript and fixed formatting * addressed PR comments Signed-off-by: Erik Jan de Wit --------- Signed-off-by: Erik Jan de Wit --- .../login-recovery-authn-code-config.ftl | 179 ++++++++++++++++++ .../login/resources/css/styles.css | 7 + .../login/select-authenticator.ftl | 36 ++++ 3 files changed, 222 insertions(+) create mode 100644 themes/src/main/resources/theme/keycloak.v2/login/login-recovery-authn-code-config.ftl create mode 100644 themes/src/main/resources/theme/keycloak.v2/login/select-authenticator.ftl diff --git a/themes/src/main/resources/theme/keycloak.v2/login/login-recovery-authn-code-config.ftl b/themes/src/main/resources/theme/keycloak.v2/login/login-recovery-authn-code-config.ftl new file mode 100644 index 0000000000..e895cf137f --- /dev/null +++ b/themes/src/main/resources/theme/keycloak.v2/login/login-recovery-authn-code-config.ftl @@ -0,0 +1,179 @@ +<#import "template.ftl" as layout> +<#import "password-commons.ftl" as passwordCommons> +<@layout.registrationLayout; section> + +<#if section = "header"> + ${msg("recovery-code-config-header")} +<#elseif section = "form"> + +
+
+ +
+

+ Warning alert: + ${msg("recovery-code-config-warning-title")} +

+
+

${msg("recovery-code-config-warning-message")}

+
+
+ +
+
+
+
    + <#list recoveryAuthnCodesConfigBean.generatedRecoveryAuthnCodesList as code> +
  1. ${code[0..3]}-${code[4..7]}-${code[8..]}
  2. + +
+
+
+
+ + +
+ + + +
+ + +
+ + +
+ +
+ + + + <@passwordCommons.logoutOtherSessions/> + + <#if isAppInitiatedAction??> + + + <#else> + + +
+ + + + diff --git a/themes/src/main/resources/theme/keycloak.v2/login/resources/css/styles.css b/themes/src/main/resources/theme/keycloak.v2/login/resources/css/styles.css index 9e816fcf7d..3d58c96acb 100644 --- a/themes/src/main/resources/theme/keycloak.v2/login/resources/css/styles.css +++ b/themes/src/main/resources/theme/keycloak.v2/login/resources/css/styles.css @@ -69,3 +69,10 @@ div.kc-logo-text span { border-color: transparent black transparent transparent; } +#kc-recovery-codes-list { + columns: 2; +} + +#certificate_subjectDN { + overflow-wrap: break-word +} \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak.v2/login/select-authenticator.ftl b/themes/src/main/resources/theme/keycloak.v2/login/select-authenticator.ftl new file mode 100644 index 0000000000..f14db8e929 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak.v2/login/select-authenticator.ftl @@ -0,0 +1,36 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayInfo=false; section> + <#if section = "header" || section = "show-username"> + <#if section = "header"> + ${msg("loginChooseAuthenticator")} + + <#elseif section = "form"> + +
+
    + <#list auth.authenticationSelections as authenticationSelection> +
  • +
    +
    +
    + +
    +
    +

    ${msg('${authenticationSelection.displayName}')}

    +
    +
    + ${msg('${authenticationSelection.helpText}')} +
    +
    +
    + +
    +
    +
  • + +
+
+ + + +