Wrap required indicators with "required" span

Some asterisks indicating required fields in `user-profile-commons.ftl`
and `register.ftl` are not wrapped in a `<span class="required">` tag.

This caused incorrect styling in custom themes that inherit the base theme.

Update the markup to wrap required field indicators with
`<span class="required">`, matching the rest of the theme and ensuring
consistent styling.

Closes #45058

Signed-off-by: Geremia Taglialatela <tagliala.dev@gmail.com>
This commit is contained in:
Geremia Taglialatela 2026-01-08 14:12:44 +01:00 committed by GitHub
parent 29c15d8e8a
commit 490815f1f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,8 @@
<#if passwordRequired?? && (attribute.name == 'username' || (attribute.name == 'email' && realm.registrationEmailAsUsername))>
<div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label> *
<label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label>
<span class="required">*</span>
</div>
<div class="${properties.kcInputWrapperClass!}">
<div class="${properties.kcInputGroup!}" dir="ltr">
@ -44,7 +45,8 @@
<div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="password-confirm"
class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label> *
class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label>
<span class="required">*</span>
</div>
<div class="${properties.kcInputWrapperClass!}">
<div class="${properties.kcInputGroup!}" dir="ltr">

View File

@ -42,7 +42,7 @@
<div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="${attribute.name}" class="${properties.kcLabelClass!}">${advancedMsg(attribute.displayName!'')}</label>
<#if attribute.required>*</#if>
<#if attribute.required><span class="required">*</span></#if>
</div>
<div class="${properties.kcInputWrapperClass!}">
<#if attribute.annotations.inputHelperTextBefore??>