From 7345ada3e35f1520776391356898b83d53c45477 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 8 Jul 2024 13:59:19 +0200 Subject: [PATCH 1/3] Added template overrides fixes: #31021 Signed-off-by: Erik Jan de Wit --- .../login-recovery-authn-code-config.ftl | 192 ++++++++++++++++++ .../login/resources/css/styles.css | 7 + .../login/select-authenticator.ftl | 36 ++++ 3 files changed, 235 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 000000000000..ea1e459dc255 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak.v2/login/login-recovery-authn-code-config.ftl @@ -0,0 +1,192 @@ +<#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 9e816fcf7d0b..2481ddbf264b 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 000000000000..f14db8e929a8 --- /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}')} +
    +
    +
    + +
    +
    +
  • + +
+
+ + + + From b283009ca5f07618767c13dab178a5eb4305ef56 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 9 Jul 2024 12:26:58 +0200 Subject: [PATCH 2/3] pr review comment Signed-off-by: Erik Jan de Wit --- .../login-recovery-authn-code-config.ftl | 346 +++++++++--------- 1 file changed, 176 insertions(+), 170 deletions(-) diff --git a/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl b/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl index 143da9e2b0bb..64b85b674ecb 100644 --- a/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl +++ b/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl @@ -5,182 +5,188 @@ <#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?counter}: ${code[0..3]}-${code[4..7]}-${code[8..]}
  2. + +
    +
    + +
    +

    + 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..]}
    +
    +
    +
    - -
    - - - -
    - - -
    - - -
    - -
    - - - - <@passwordCommons.logoutOtherSessions/> - - <#if isAppInitiatedAction??> - - + + + + + +
    + + +
    + + + + + +<@passwordCommons.logoutOtherSessions/> + +<#if isAppInitiatedAction??> + + <#else> - -
    - - +id="saveRecoveryAuthnCodesBtn" value="${msg("recovery-codes-action-complete")}" +disabled +/> - + + + + + From 962c241821b693453f5512b52dcb9fb2e465c5ee Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 15 Jul 2024 12:18:50 +0200 Subject: [PATCH 3/3] * removed duplicated javascript and fixed formatting * addressed PR comments Signed-off-by: Erik Jan de Wit --- .../login-recovery-authn-code-config.ftl | 346 +++++++++-------- .../login-recovery-authn-code-config.ftl | 353 +++++++++--------- .../login/resources/css/styles.css | 2 +- 3 files changed, 341 insertions(+), 360 deletions(-) diff --git a/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl b/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl index 64b85b674ecb..143da9e2b0bb 100644 --- a/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl +++ b/themes/src/main/resources/theme/base/login/login-recovery-authn-code-config.ftl @@ -5,188 +5,182 @@ <#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. + +
      +
      + +
      +

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

      +
      +

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

      +
      +
      + +
        + <#list recoveryAuthnCodesConfigBean.generatedRecoveryAuthnCodesList as code> +
      1. ${code?counter}: ${code[0..3]}-${code[4..7]}-${code[8..]}
      -
    -
    -
    - -
    - - - -
    - - -
    - - -
    - -
    - - - -<@passwordCommons.logoutOtherSessions/> - -<#if isAppInitiatedAction??> - - + + + + + +
    + + +
    + + + + + + <@passwordCommons.logoutOtherSessions/> + + <#if isAppInitiatedAction??> + + <#else> - -
    - - + id="saveRecoveryAuthnCodesBtn" value="${msg("recovery-codes-action-complete")}" + disabled + /> - + + + + + 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 index ea1e459dc255..e895cf137fbd 100644 --- 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 @@ -3,190 +3,177 @@ <@layout.registrationLayout; section> <#if section = "header"> - ${msg("recovery-code-config-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> - + 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 2481ddbf264b..3d58c96acb78 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,7 +69,7 @@ div.kc-logo-text span { border-color: transparent black transparent transparent; } -.kc-recovery-codes-list { +#kc-recovery-codes-list { columns: 2; }