From b50a401d2f13baa5e2b06c14a5ddb8b220e5bc01 Mon Sep 17 00:00:00 2001 From: Simon Dalvai Date: Wed, 24 Jul 2024 09:39:03 +0200 Subject: [PATCH] noiV2 theme: show socialbuttons, only in login view --- themes/noiV2/login/login.ftl | 118 ++++++++++++++++++++++++++++++++ themes/noiV2/login/template.ftl | 32 +-------- 2 files changed, 119 insertions(+), 31 deletions(-) create mode 100755 themes/noiV2/login/login.ftl diff --git a/themes/noiV2/login/login.ftl b/themes/noiV2/login/login.ftl new file mode 100755 index 0000000..1b273ff --- /dev/null +++ b/themes/noiV2/login/login.ftl @@ -0,0 +1,118 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> + <#if section = "header"> + ${msg("loginAccountTitle")} + <#elseif section = "form"> +
+
+ <#if realm.password> +
+ <#if !usernameHidden??> +
+ + + + + <#if messagesPerField.existsError('username','password')> + + ${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc} + + + +
+ + +
+ + + + + <#if usernameHidden?? && messagesPerField.existsError('username','password')> + + ${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc} + + + +
+ +
+
+ <#if realm.rememberMe && !usernameHidden??> +
+ +
+ +
+
+ <#if realm.resetPasswordAllowed> + ${msg("doForgotPassword")} + +
+ +
+ +
+ value="${auth.selectedCredential}"/> + +
+
+ +
+ +
+ <#elseif section = "info" > + <#if realm.password && realm.registrationAllowed && !registrationDisabled??> +
+
+ ${msg("noAccount")} ${msg("doRegister")} +
+
+ + <#elseif section = "socialProviders" > + <#if realm.password && social.providers??> +
+ + + +
+
+

${msg("identity-provider-login-label")}

+ + + <#if auth?has_content && auth.showTryAnotherWayLink() && showAnotherWayIfPresent> +
+ +
+ + + + + diff --git a/themes/noiV2/login/template.ftl b/themes/noiV2/login/template.ftl index eb06bf6..9a8588f 100644 --- a/themes/noiV2/login/template.ftl +++ b/themes/noiV2/login/template.ftl @@ -125,38 +125,8 @@ - <#if realm.password && social.providers??> -
- - -
-
-

${msg("identity-provider-login-label")}

- - - <#if auth?has_content && auth.showTryAnotherWayLink() && showAnotherWayIfPresent> -
- -
- + <#nested "socialProviders"> <#-- App-initiated actions should not see warning messages about the need to complete the action --> <#-- during login. -->