From 2da41f4343d3145bbf37f05b0f6d82e4de0b57f9 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 13 Nov 2024 17:06:04 +0100 Subject: [PATCH] fix: update user-profile-commons.ftl to 25.0.6 --- login/user-profile-commons.ftl | 74 +++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/login/user-profile-commons.ftl b/login/user-profile-commons.ftl index 140eea3..8aa885d 100644 --- a/login/user-profile-commons.ftl +++ b/login/user-profile-commons.ftl @@ -3,27 +3,31 @@ <#list profile.attributes as attribute> - <#assign groupName = attribute.group!""> - <#if groupName != currentGroup> - <#assign currentGroup=groupName> - <#if currentGroup != "" > -
+ <#assign group = (attribute.group)!""> + <#if group != currentGroup> + <#assign currentGroup=group> + <#if currentGroup != ""> +
+ data-${key}="${value}" + + > - <#assign groupDisplayHeader=attribute.groupDisplayHeader!""> + <#assign groupDisplayHeader=group.displayHeader!""> <#if groupDisplayHeader != ""> - <#assign groupHeaderText=advancedMsg(attribute.groupDisplayHeader)!groupName> + <#assign groupHeaderText=advancedMsg(groupDisplayHeader)!group> <#else> - <#assign groupHeaderText=groupName> + <#assign groupHeaderText=group.name!"">
- +
- <#assign groupDisplayDescription=attribute.groupDisplayDescription!""> + <#assign groupDisplayDescription=group.displayDescription!""> <#if groupDisplayDescription != ""> - <#assign groupDescriptionText=advancedMsg(attribute.groupDisplayDescription)!""> + <#assign groupDescriptionText=advancedMsg(groupDisplayDescription)!"">
- +
@@ -53,6 +57,10 @@
<#nested "afterField" attribute> + + <#list profile.html5DataAnnotations?keys as key> + + <#macro inputFieldByType attribute> @@ -69,16 +77,22 @@ <@inputTagSelects attribute=attribute/> <#break> <#default> - <@inputTag attribute=attribute/> + <#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> - + disabled <#if attribute.autocomplete??>autocomplete="${attribute.autocomplete}" - <#if attribute.annotations.inputTypePlaceholder??>placeholder="${attribute.annotations.inputTypePlaceholder}" + <#if attribute.annotations.inputTypePlaceholder??>placeholder="${advancedMsg(attribute.annotations.inputTypePlaceholder)}" <#if attribute.annotations.inputTypePattern??>pattern="${attribute.annotations.inputTypePattern}" <#if attribute.annotations.inputTypeSize??>size="${attribute.annotations.inputTypeSize}" <#if attribute.annotations.inputTypeMaxlength??>maxlength="${attribute.annotations.inputTypeMaxlength}" @@ -86,6 +100,10 @@ <#if attribute.annotations.inputTypeMax??>max="${attribute.annotations.inputTypeMax}" <#if attribute.annotations.inputTypeMin??>min="${attribute.annotations.inputTypeMin}" <#if attribute.annotations.inputTypeStep??>step="${attribute.annotations.inputTypeStep}" + <#if attribute.annotations.inputTypeStep??>step="${attribute.annotations.inputTypeStep}" + <#list attribute.html5DataAnnotations as key, value> + data-${key}="${value}" + /> @@ -128,13 +146,14 @@ <#assign options=attribute.validators[attribute.annotations.inputOptionsFromValidation].options> <#elseif attribute.validators.options?? && attribute.validators.options.options??> <#assign options=attribute.validators.options.options> + <#else> + <#assign options=[]> - <#if options??> - <#list options as option> + <#list options as option> - - + + @@ -144,21 +163,22 @@ <#assign classDiv=properties.kcInputClassRadio!> <#assign classInput=properties.kcInputClassRadioInput!> <#assign classLabel=properties.kcInputClassRadioLabel!> - <#else> + <#else> <#assign inputType='checkbox'> <#assign classDiv=properties.kcInputClassCheckbox!> <#assign classInput=properties.kcInputClassCheckboxInput!> <#assign classLabel=properties.kcInputClassCheckboxLabel!> - + <#if attribute.annotations.inputOptionsFromValidation?? && attribute.validators[attribute.annotations.inputOptionsFromValidation]?? && attribute.validators[attribute.annotations.inputOptionsFromValidation].options??> <#assign options=attribute.validators[attribute.annotations.inputOptionsFromValidation].options> <#elseif attribute.validators.options?? && attribute.validators.options.options??> <#assign options=attribute.validators.options.options> + <#else> + <#assign options=[]> - <#if options??> - <#list options as option> + <#list options as option>
- - - + <#macro selectOptionLabelText attribute option> @@ -184,4 +202,4 @@ - \ No newline at end of file + -- 2.44.2