<#macro userProfileFormFields> <#assign currentGroup=""> <#list profile.attributes as attribute> <#assign group = (attribute.group)!""> <#if group != currentGroup> <#assign currentGroup=group> <#if currentGroup != "">
data-${key}="${value}" > <#assign groupDisplayHeader=group.displayHeader!""> <#if groupDisplayHeader != ""> <#assign groupHeaderText=advancedMsg(groupDisplayHeader)!group> <#else> <#assign groupHeaderText=group.name!"">
<#assign groupDisplayDescription=group.displayDescription!""> <#if groupDisplayDescription != ""> <#assign groupDescriptionText=advancedMsg(groupDisplayDescription)!"">
<#nested "beforeField" attribute>
<#if attribute.required>*
<#if attribute.annotations.inputHelperTextBefore??>
${kcSanitize(advancedMsg(attribute.annotations.inputHelperTextBefore))?no_esc}
<@inputFieldByType attribute=attribute/> <#if messagesPerField.existsError('${attribute.name}')> ${kcSanitize(messagesPerField.get('${attribute.name}'))?no_esc} <#if attribute.annotations.inputHelperTextAfter??>
${kcSanitize(advancedMsg(attribute.annotations.inputHelperTextAfter))?no_esc}
<#nested "afterField" attribute> <#list profile.html5DataAnnotations?keys as key> <#macro inputFieldByType attribute> <#switch attribute.annotations.inputType!''> <#case 'textarea'> <@textareaTag attribute=attribute/> <#break> <#case 'select'> <#case 'multiselect'> <@selectTag attribute=attribute/> <#break> <#case 'select-radiobuttons'> <#case 'multiselect-checkboxes'> <@inputTagSelects attribute=attribute/> <#break> <#default> <#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}" <#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}" <#if attribute.annotations.inputTypeMinlength??>minlength="${attribute.annotations.inputTypeMinlength}" <#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}" /> <#macro inputTagType attribute> <#compress> <#if attribute.annotations.inputType??> <#if attribute.annotations.inputType?starts_with("html5-")> ${attribute.annotations.inputType[6..]} <#else> ${attribute.annotations.inputType} <#else> text <#macro textareaTag attribute> <#macro selectTag attribute> <#macro inputTagSelects attribute> <#if attribute.annotations.inputType=='select-radiobuttons'> <#assign inputType='radio'> <#assign classDiv=properties.kcInputClassRadio!> <#assign classInput=properties.kcInputClassRadioInput!> <#assign classLabel=properties.kcInputClassRadioLabel!> <#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=[]> <#list options as option>
disabled <#if attribute.values?seq_contains(option)>checked />
<#macro selectOptionLabelText attribute option> <#compress> <#if attribute.annotations.inputOptionLabels??> ${advancedMsg(attribute.annotations.inputOptionLabels[option]!option)} <#else> <#if attribute.annotations.inputOptionLabelsI18nPrefix??> ${msg(attribute.annotations.inputOptionLabelsI18nPrefix + '.' + option)} <#else> ${option}