Backend Form: hide locale indicator for ruler
field (align with section
/hint
)
#5956
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: In a translatable context (e.g., Tailor with
multisite: sync
), theruler
field shows a locale badge next to its generic label, even though it’s a structural (non-data) field.section
andhint
don’t show the badge because they render their own headers in their partials.Solution: Make
ruler
behave likesection
/hint
:ruler
(so the locale badge doesn’t appear).label
/comment
are set, render them insidefield_ruler.htm
(local to the field, no locale badge).Changes:
modules/backend/widgets/Form.php
— addruler
to the exclusions inshowFieldLabels()
(generic label not rendered).modules/backend/widgets/form/partials/field_ruler.htm
— render:<label for="…" class="form-label">…</label>
whenlabel
is provided;<hr>
;<p class="form-text">…</p>
whencomment
is provided (respectscommentHtml
).Why:
ruler
is structural; showing a translation badge is misleading. This aligns UI with existingsection
/hint
behavior. No data/schema/save logic is affected.Reproduction (before fix):
Blueprint with
multisite: sync
.Field:
Locale badge appears next to the label.
Expected (after fix): No locale badge for
ruler
;label
/comment
render correctly inside the field’s partial.Backward compatibility: No changes for regular input fields; UI-only adjustment for the structural
ruler
field.