make missing field info appear below input form

This commit is contained in:
rra 2021-06-05 00:39:53 +02:00
parent 795b1d0539
commit 5954f22939

View File

@ -13,13 +13,12 @@
value="${(register.formData.firstName!'')}" value="${(register.formData.firstName!'')}"
aria-invalid="<#if messagesPerField.existsError('firstName')>true</#if>" aria-invalid="<#if messagesPerField.existsError('firstName')>true</#if>"
/> />
<#if messagesPerField.existsError('firstName')>
<span id="input-error-firstname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('firstName'))?no_esc}
</span>
</#if>
</div> </div>
<#if messagesPerField.existsError('firstName')>
<span id="input-error-firstname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('firstName'))?no_esc}
</span>
</#if>
</div> </div>
<div class="${properties.kcFormGroupClass!}"> <div class="${properties.kcFormGroupClass!}">
@ -31,14 +30,13 @@
value="${(register.formData.lastName!'')}" value="${(register.formData.lastName!'')}"
aria-invalid="<#if messagesPerField.existsError('lastName')>true</#if>" aria-invalid="<#if messagesPerField.existsError('lastName')>true</#if>"
/> />
</div>
<#if messagesPerField.existsError('lastName')> <#if messagesPerField.existsError('lastName')>
<span id="input-error-lastname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> <span id="input-error-lastname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('lastName'))?no_esc} ${kcSanitize(messagesPerField.get('lastName'))?no_esc}
</span> </span>
</#if> </#if>
</div> </div>
</div>
<div class="${properties.kcFormGroupClass!}"> <div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}"> <div class="${properties.kcLabelWrapperClass!}">
@ -49,13 +47,13 @@
value="${(register.formData.email!'')}" autocomplete="email" value="${(register.formData.email!'')}" autocomplete="email"
aria-invalid="<#if messagesPerField.existsError('email')>true</#if>" aria-invalid="<#if messagesPerField.existsError('email')>true</#if>"
/> />
</div>
<#if messagesPerField.existsError('email')> <#if messagesPerField.existsError('email')>
<span id="input-error-email" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> <span id="input-error-email" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('email'))?no_esc} ${kcSanitize(messagesPerField.get('email'))?no_esc}
</span> </span>
</#if> </#if>
</div>
</div> </div>
<#if !realm.registrationEmailAsUsername> <#if !realm.registrationEmailAsUsername>
@ -68,13 +66,13 @@
value="${(register.formData.username!'')}" autocomplete="username" value="${(register.formData.username!'')}" autocomplete="username"
aria-invalid="<#if messagesPerField.existsError('username')>true</#if>" aria-invalid="<#if messagesPerField.existsError('username')>true</#if>"
/> />
</div>
<#if messagesPerField.existsError('username')> <#if messagesPerField.existsError('username')>
<span id="input-error-username" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> <span id="input-error-username" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('username'))?no_esc} ${kcSanitize(messagesPerField.get('username'))?no_esc}
</span> </span>
</#if> </#if>
</div>
</div> </div>
</#if> </#if>
@ -88,13 +86,13 @@
autocomplete="new-password" autocomplete="new-password"
aria-invalid="<#if messagesPerField.existsError('password','password-confirm')>true</#if>" aria-invalid="<#if messagesPerField.existsError('password','password-confirm')>true</#if>"
/> />
</div>
<#if messagesPerField.existsError('password')> <#if messagesPerField.existsError('password')>
<span id="input-error-password" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> <span id="input-error-password" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.get('password'))?no_esc} ${kcSanitize(messagesPerField.get('password'))?no_esc}
</span> </span>
</#if> </#if>
</div>
</div> </div>
<div class="${properties.kcFormGroupClass!}"> <div class="${properties.kcFormGroupClass!}">