tooltips: Fix incorrect "required" tooltip on custom profile fields.

Previously, "This profile field is required." tooltip was visible on
all custom profile fields, including those that were not required.
This commit fixes that by targeting only the required fields.
This commit is contained in:
tnmkr 2024-03-28 10:50:36 +05:30 committed by Tim Abbott
parent 3c2efd236c
commit 79cc7db315
2 changed files with 3 additions and 3 deletions

View File

@ -612,7 +612,7 @@ export function initialize(): void {
});
delegate("body", {
target: ".custom-user-field-label-wrapper",
target: ".custom-user-field-label-wrapper.required-field-wrapper",
content: $t({
defaultMessage: "This profile field is required.",
}),

View File

@ -1,6 +1,6 @@
<div class="custom_user_field" name="{{ field.name }}" data-field-id="{{ field.id }}">
<span class="custom-user-field-label-wrapper">
<label class="inline-block {{#if field.required}}required-field{{/if}}" for="{{ field.name }}" class="title">{{ field.name }}</label>
<span class="custom-user-field-label-wrapper {{#if field.required}}required-field-wrapper{{/if}}">
<label class="inline-block" for="{{ field.name }}" class="title">{{ field.name }}</label>
<span class="required-symbol {{#unless is_empty_required_field}}hidden{{/unless}}"> *</span>
</span>
<div class="alert-notification custom-field-status"></div>