custom_profile_fields: Display data of default external type while edit.

Display values of "name" and "hint" field in non-editable way while
editing default external account type profile fields.
This commit is contained in:
Yogesh Sirsat 2022-09-13 19:24:21 +05:30 committed by Tim Abbott
parent c1cf691080
commit ce14df0f4f

View File

@ -307,11 +307,11 @@ function set_up_external_account_field_edit_form($profile_field_form, url_patter
if ($profile_field_form.find("select[name=external_acc_field_type]").val() === "custom") {
$profile_field_form.find("input[name=url_pattern]").val(url_pattern_val);
$profile_field_form.find(".custom_external_account_detail").show();
$profile_field_form.find("input[name=name]").closest(".input-group").show();
$profile_field_form.find("input[name=hint]").closest(".input-group").show();
$profile_field_form.find("input[name=name]").prop("disabled", false);
$profile_field_form.find("input[name=hint]").prop("disabled", false);
} else {
$profile_field_form.find("input[name=name]").closest(".input-group").hide();
$profile_field_form.find("input[name=hint]").closest(".input-group").hide();
$profile_field_form.find("input[name=name]").prop("disabled", true);
$profile_field_form.find("input[name=hint]").prop("disabled", true);
$profile_field_form.find(".custom_external_account_detail").hide();
}
}