settings_components: Split functions to improve typechecking.

This commit is contained in:
afeefuddin
2024-05-21 01:06:38 +05:30
committed by Tim Abbott
parent 7355aa3922
commit 9d33c94f2d
8 changed files with 436 additions and 241 deletions

View File

@@ -379,11 +379,8 @@ function disable_submit_btn_if_no_property_changed(
$profile_field_form: JQuery,
field: CustomProfileField,
): void {
const data = settings_components.populate_data_for_request(
const data = settings_components.populate_data_for_custom_profile_field_request(
$profile_field_form,
false,
undefined,
undefined,
field,
);
let save_changes_button_disabled = false;
@@ -520,11 +517,8 @@ function open_edit_form_modal(this: HTMLElement): void {
function submit_form(): void {
const $profile_field_form = $("#edit-custom-profile-field-form-" + field_id);
const data = settings_components.populate_data_for_request(
const data = settings_components.populate_data_for_custom_profile_field_request(
$profile_field_form,
false,
undefined,
undefined,
field,
);