From cdc99f82ea331b35e5129663de7e213a8089c8da Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Wed, 17 Jul 2024 10:19:53 +0200 Subject: [PATCH] removed use of alpine.js due to tests fixed merge error removed alpinejs value made selectors a bit less specific on the dom structure updated reason for more detail and an even better check copy paste more copy and paste more copy paste reveted handling of multi valued fields oops Co-authored-by: Hynek Mlnarik Signed-off-by: Erik Jan de Wit --- .../theme/keycloak.v2/login/template.ftl | 31 +------ .../theme/keycloak.v2/login/theme.properties | 5 +- .../login/user-profile-commons.ftl | 83 ++++++------------- 3 files changed, 31 insertions(+), 88 deletions(-) diff --git a/themes/src/main/resources/theme/keycloak.v2/login/template.ftl b/themes/src/main/resources/theme/keycloak.v2/login/template.ftl index e8326b3db4a..ddfc4b7e002 100644 --- a/themes/src/main/resources/theme/keycloak.v2/login/template.ftl +++ b/themes/src/main/resources/theme/keycloak.v2/login/template.ftl @@ -27,7 +27,6 @@ diff --git a/themes/src/main/resources/theme/keycloak.v2/login/theme.properties b/themes/src/main/resources/theme/keycloak.v2/login/theme.properties index 4e69c0b95e9..7dc49dc6dc8 100644 --- a/themes/src/main/resources/theme/keycloak.v2/login/theme.properties +++ b/themes/src/main/resources/theme/keycloak.v2/login/theme.properties @@ -26,4 +26,7 @@ kcLoginClass=pf-v5-c-login__main kcFormClass=pf-v5-c-form kcFormCardClass=card-pf -kcResetFlowIcon=pf-icon fas fa-share-square \ No newline at end of file +kcResetFlowIcon=pf-icon fas fa-share-square + +kcSelectAuthListItemClass= pf-v5-c-data-list__item pf-m-clickable select-auth-box-parent +kcSelectAuthListItemHeadingClass=pf-v5-u-font-family-heading select-auth-box-headline diff --git a/themes/src/main/resources/theme/keycloak.v2/login/user-profile-commons.ftl b/themes/src/main/resources/theme/keycloak.v2/login/user-profile-commons.ftl index 99cd4b95499..6019fac8d7d 100644 --- a/themes/src/main/resources/theme/keycloak.v2/login/user-profile-commons.ftl +++ b/themes/src/main/resources/theme/keycloak.v2/login/user-profile-commons.ftl @@ -35,62 +35,25 @@ <#nested "beforeField" attribute> -
- x-data="{ - values: [${(attribute.values?map(s -> s!''?js_string)?map(s -> '{ value: \'' + s + '\'}')?join(", ")!'')}], - kcMultivalued: ${attribute.html5DataAnnotations?keys?seq_contains('kcMultivalued')?string('true', 'false')} - }" - <#else> - x-data="{ - values: [{ value: '${(attribute.value!'')}' }], - kcMultivalued: ${attribute.html5DataAnnotations?keys?seq_contains('kcMultivalued')?string('true', 'false')} - }" - - > - - -
<#nested "afterField" attribute> @@ -114,12 +77,18 @@ <@inputTagSelects attribute=attribute/> <#break> <#default> - <@inputTag attribute=attribute value=attribute.value!/> + <#if attribute.multivalued && attribute.values?has_content> + <#list attribute.values as value> + <@inputTag attribute=attribute value=value!''/> + + <#else> + <@inputTag attribute=attribute value=attribute.value!''/> + <#macro inputTag attribute value> - disabled <#if attribute.autocomplete??>autocomplete="${attribute.autocomplete}"