custom_user_profile_fields: Add `name` attribute to fields.

In `custom_user_profile_fields.hbs`, the name attribute has been
introduced to profile fields to facilitate the future use of the
`get_current_values` function in retrieving field values.

Fixes part of #26692.

Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>.
Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
This commit is contained in:
sanchi-t 2024-03-08 11:21:36 +05:30 committed by Tim Abbott
parent 2ad886f427
commit c442db64fc
1 changed files with 7 additions and 7 deletions

View File

@ -7,28 +7,28 @@
<div class="settings-profile-user-field-hint">{{ field.hint }}</div>
<div class="settings-profile-user-field {{#if is_empty_required_field}}empty-required-field{{/if}}">
{{#if is_long_text_field}}
<textarea maxlength="500" class="custom_user_field_value settings_textarea">{{ field_value.value }}</textarea>
<textarea maxlength="500" class="custom_user_field_value settings_textarea" name="{{ field.id }}">{{ field_value.value }}</textarea>
{{else if is_select_field}}
<select class="custom_user_field_value {{#if for_manage_user_modal}}modal_select{{else}}settings_select{{/if}} bootstrap-focus-style">
<select class="custom_user_field_value {{#if for_manage_user_modal}}modal_select{{else}}settings_select{{/if}} bootstrap-focus-style" name="{{ field.id }}">
<option value=""></option>
{{#each field_choices}}
<option value="{{ this.value }}" {{#if this.selected}}selected{{/if}}>{{ this.text }}</option>
{{/each}}
</select>
{{else if is_user_field }}
<div class="pill-container person_picker">
<div class="pill-container person_picker" name="{{ field.id }}">
<div class="input" contenteditable="true"></div>
</div>
{{else if is_date_field }}
<input class="custom_user_field_value datepicker {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" data-field-id="{{ field.id }}" type="text"
<input class="custom_user_field_value datepicker {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" name="{{ field.id }}" data-field-id="{{ field.id }}" type="text"
value="{{ field_value.value }}" />
<span class="remove_date"><i class="fa fa-close"></i></span>
{{else if is_url_field }}
<input class="custom_user_field_value {{#if for_manage_user_modal}}modal_url_input{{else}}settings_url_input{{/if}}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="2048" />
<input class="custom_user_field_value {{#if for_manage_user_modal}}modal_url_input{{else}}settings_url_input{{/if}}" name="{{ field.id }}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="2048" />
{{else if is_pronouns_field}}
<input class="custom_user_field_value pronouns_type_field {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
<input class="custom_user_field_value pronouns_type_field {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" name="{{ field.id }}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
{{else}}
<input class="custom_user_field_value {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
<input class="custom_user_field_value {{#if for_manage_user_modal}}modal_text_input{{else}}settings_text_input{{/if}}" name="{{ field.id }}" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
{{/if}}
</div>
</div>