Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Make custom profile fields table consistent with others.
Sahil Batradb3b9e4742d5
diff --git a/web/src/settings_profile_fields.js b/web/src/settings_profile_fields.jsindex f6c87e7f466..c8b0632b6d2 100644--- a/web/src/settings_profile_fields.js+++ b/web/src/settings_profile_fields.js@@ -67,17 +67,6 @@ function is_valid_to_display_in_summary(field_type) {return true;}-function update_profile_fields_table_element() {- const $profile_fields_table = $("#admin_profile_fields_table").expectOne();-- // If there are no custom fields, hide the table headers at the top- if (page_params.custom_profile_fields.length < 1) {- $profile_fields_table.hide();- } else {- $profile_fields_table.show();- }-}-function delete_profile_field(e) {e.preventDefault();e.stopPropagation();@@ -104,7 +93,6 @@ function delete_profile_field(e) {const opts = {success_continuation() {display_success_status();- update_profile_fields_table_element();},};dialog_widget.submit_api_request(channel.del, url, {}, opts);@@ -681,7 +669,6 @@ export function do_populate_profile_fields(profile_fields_data) {}update_profile_fields_checkboxes();- update_profile_fields_table_element();loading.destroy_indicator($("#admin_page_profile_fields_loading_indicator"));}diff --git a/web/styles/settings.css b/web/styles/settings.cssindex 1515221e1b8..084eccff2be 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -132,7 +132,7 @@ h3,margin-right: 10px;}-#admin_profile_fields_table {+.admin_profile_fields_table {& th.display,td.display_in_profile_summary_cell {text-align: center;@@ -226,6 +226,7 @@ h3,/* Limit the actions column to not using excessive width */.admin-table-wrapper table.admin_profile_fields_table tr .actions {width: 11%;+ min-width: 70px;}}diff --git a/web/templates/settings/profile_field_settings_admin.hbs b/web/templates/settings/profile_field_settings_admin.hbsindex 84693b25a01..eb7a42d9748 100644--- a/web/templates/settings/profile_field_settings_admin.hbs+++ b/web/templates/settings/profile_field_settings_admin.hbs@@ -8,15 +8,18 @@</div><div class="admin-table-wrapper"><table class="table table-condensed table-striped admin_profile_fields_table">- <tbody id="admin_profile_fields_table">- <th>{{t "Label" }}</th>- <th>{{t "Hint" }}</th>- <th>{{t "Type" }}</th>- {{#if is_admin}}- <th class="display">{{t "Card"}}</th>- <th class="actions">{{t "Actions" }}</th>- {{/if}}- </tbody>+ <thead>+ <tr>+ <th>{{t "Label" }}</th>+ <th>{{t "Hint" }}</th>+ <th>{{t "Type" }}</th>+ {{#if is_admin}}+ <th class="display">{{t "Card"}}</th>+ <th class="actions">{{t "Actions" }}</th>+ {{/if}}+ </tr>+ </thead>+ <tbody id="admin_profile_fields_table" class="required-text" data-empty="{{t 'No custom profile field configured for this organization.' }}"></tbody></table></div></div>