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 != "" >
-
<#nested "afterField" attribute>
#list>
+
+ <#list profile.html5DataAnnotations?keys as key>
+
+ #list>
#macro>
<#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!''/>
+ #list>
+ <#else>
+ <@inputTag attribute=attribute value=attribute.value!''/>
+ #if>
#switch>
#macro>
-<#macro inputTag attribute>
-
+ disabled#if>
<#if attribute.autocomplete??>autocomplete="${attribute.autocomplete}"#if>
- <#if attribute.annotations.inputTypePlaceholder??>placeholder="${attribute.annotations.inputTypePlaceholder}"#if>
+ <#if attribute.annotations.inputTypePlaceholder??>placeholder="${advancedMsg(attribute.annotations.inputTypePlaceholder)}"#if>
<#if attribute.annotations.inputTypePattern??>pattern="${attribute.annotations.inputTypePattern}"#if>
<#if attribute.annotations.inputTypeSize??>size="${attribute.annotations.inputTypeSize}"#if>
<#if attribute.annotations.inputTypeMaxlength??>maxlength="${attribute.annotations.inputTypeMaxlength}"#if>
@@ -86,6 +100,10 @@
<#if attribute.annotations.inputTypeMax??>max="${attribute.annotations.inputTypeMax}"#if>
<#if attribute.annotations.inputTypeMin??>min="${attribute.annotations.inputTypeMin}"#if>
<#if attribute.annotations.inputTypeStep??>step="${attribute.annotations.inputTypeStep}"#if>
+ <#if attribute.annotations.inputTypeStep??>step="${attribute.annotations.inputTypeStep}"#if>
+ <#list attribute.html5DataAnnotations as key, value>
+ data-${key}="${value}"
+ #list>
/>
#macro>
@@ -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>
- <#if options??>
- <#list options as option>
+ <#list options as option>
- #list>
- #if>
+ #list>
+
#macro>
@@ -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>
-
+
<#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>
- <#if options??>
- <#list options as option>
+ <#list options as option>
- #list>
- #if>
-
+ #list>
#macro>
<#macro selectOptionLabelText attribute option>
@@ -184,4 +202,4 @@
#if>
#if>
#compress>
-#macro>
\ No newline at end of file
+#macro>