mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
custom fields: Fix custom fields header not rendering properly.
Even when admin removes all custom fields from org, custom fields header "Profile" doesn't get removed. Render header "Profile" whenever custom fields data get changed.
This commit is contained in:
committed by
Tim Abbott
parent
5f7691b74e
commit
a6c03a4738
@@ -69,6 +69,12 @@ exports.add_custom_profile_fields_to_settings = function () {
|
||||
}
|
||||
|
||||
$("#account-settings .custom-profile-fields-form").html("");
|
||||
if (page_params.custom_profile_fields.length > 0) {
|
||||
$("#account-settings #custom-field-header").show();
|
||||
} else {
|
||||
$("#account-settings #custom-field-header").hide();
|
||||
}
|
||||
|
||||
var all_custom_fields = page_params.custom_profile_fields;
|
||||
|
||||
all_custom_fields.forEach(function (field) {
|
||||
|
||||
Reference in New Issue
Block a user