Fix label class in config-totp template

The labels in `login-config-totp.ftl` were statically styled with a
`form-control` class instead of the intended dynamic `kcLabelClass `
property.

This caused incorrect styling in custom themes inheriting the base
theme.

Update the markup to use `kcLabelClass`, matching the rest of the theme
and ensuring consistent label styling.

Closes #45069

Signed-off-by: Geremia Taglialatela <tagliala.dev@gmail.com>
This commit is contained in:
Geremia Taglialatela 2026-01-09 11:59:40 +01:00 committed by GitHub
parent 34dda98a36
commit 5a705c2e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@
<form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-totp-settings-form" method="post">
<div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="totp" class="control-label">${msg("authenticatorCode")}</label> <span class="required">*</span>
<label for="totp" class="${properties.kcLabelClass!}">${msg("authenticatorCode")}</label> <span class="required">*</span>
</div>
<div class="${properties.kcInputWrapperClass!}">
<input type="text" id="totp" name="totp" autocomplete="one-time-code" class="${properties.kcInputClass!}"
@ -75,7 +75,7 @@
<div class="${properties.kcFormGroupClass!}">
<div class="${properties.kcLabelWrapperClass!}">
<label for="userLabel" class="control-label">${msg("loginTotpDeviceName")}</label> <#if totp.otpCredentials?size gte 1><span class="required">*</span></#if>
<label for="userLabel" class="${properties.kcLabelClass!}">${msg("loginTotpDeviceName")}</label> <#if totp.otpCredentials?size gte 1><span class="required">*</span></#if>
</div>
<div class="${properties.kcInputWrapperClass!}">