diff --git a/help/custom-emoji.md b/help/custom-emoji.md index 99c0ad04a1..baa458fecc 100644 --- a/help/custom-emoji.md +++ b/help/custom-emoji.md @@ -51,7 +51,7 @@ while the search box is empty (you may have to scroll down a bit to find it). {settings_tab|emoji-settings} -1. Click the **trash** () icon next to the +1. Click the **deactivate** () icon next to the emoji that you would like to deactivate. {end_tabs} diff --git a/help/custom-profile-fields.md b/help/custom-profile-fields.md index bc18f3946c..d27e2f379c 100644 --- a/help/custom-profile-fields.md +++ b/help/custom-profile-fields.md @@ -38,7 +38,7 @@ methods][authentication-production] documentation for details. {settings_tab|profile-field-settings} -1. In the **Actions** column, click the **pencil** () +1. In the **Actions** column, click the **edit** () icon for the profile field you want to edit. 1. Edit profile field information as desired, and click **Save changes**. @@ -60,7 +60,7 @@ checkboxes will be disabled. {settings_tab|profile-field-settings} -1. In the **Actions** column, click the **pencil** () +1. In the **Actions** column, click the **edit** () icon for the profile field you want to edit. 1. Toggle **Display on user card**. @@ -84,7 +84,7 @@ it out. {settings_tab|profile-field-settings} -1. In the **Actions** column, click the **pencil** () +1. In the **Actions** column, click the **edit** () icon for the profile field you want to edit. 1. Toggle **Required field**. @@ -110,7 +110,7 @@ syncing profile fields from an employee directory. {settings_tab|profile-field-settings} -1. In the **Actions** column, click the **pencil** () +1. In the **Actions** column, click the **edit** () icon for the profile field you want to configure. 1. Toggle **Users can edit this field for their own account**. diff --git a/web/src/settings_emoji.ts b/web/src/settings_emoji.ts index b48c814e83..1b1b0d9746 100644 --- a/web/src/settings_emoji.ts +++ b/web/src/settings_emoji.ts @@ -321,7 +321,9 @@ export function set_up(): void { e.preventDefault(); e.stopPropagation(); const $button = $(this); - const url = "/json/realm/emoji/" + encodeURIComponent($button.attr("data-emoji-name")!); + const url = + "/json/realm/emoji/" + + encodeURIComponent($button.closest("tr").attr("data-emoji-name")!); const html_body = render_confirm_deactivate_custom_emoji({}); const opts = { diff --git a/web/src/settings_exports.ts b/web/src/settings_exports.ts index a4e114c6ea..70610f3f30 100644 --- a/web/src/settings_exports.ts +++ b/web/src/settings_exports.ts @@ -426,7 +426,9 @@ export function set_up(): void { e.preventDefault(); e.stopPropagation(); const $button = $(this); - const url = "/json/export/realm/" + encodeURIComponent($button.attr("data-export-id")!); + const url = + "/json/export/realm/" + + encodeURIComponent($button.closest("tr").attr("data-export-id")!); const html_body = render_confirm_delete_data_export(); confirm_dialog.launch({ diff --git a/web/src/settings_linkifiers.ts b/web/src/settings_linkifiers.ts index 6c9e1f0b86..54ee51bec2 100644 --- a/web/src/settings_linkifiers.ts +++ b/web/src/settings_linkifiers.ts @@ -220,7 +220,9 @@ export function build_page(): void { e.stopPropagation(); const $button = $(this); const html_body = render_confirm_delete_linkifier(); - const url = "/json/realm/filters/" + encodeURIComponent($button.attr("data-linkifier-id")!); + const url = + "/json/realm/filters/" + + encodeURIComponent($button.closest("tr").attr("data-linkifier-id")!); confirm_dialog.launch({ html_heading: $t_html({defaultMessage: "Delete linkifier?"}), @@ -238,7 +240,7 @@ export function build_page(): void { e.stopPropagation(); const $button = $(this); - const linkifier_id = Number.parseInt($button.attr("data-linkifier-id")!, 10); + const linkifier_id = Number.parseInt($button.closest("tr").attr("data-linkifier-id")!, 10); open_linkifier_edit_form(linkifier_id); }); diff --git a/web/src/settings_playgrounds.ts b/web/src/settings_playgrounds.ts index 702e16ab54..39bb58c7b5 100644 --- a/web/src/settings_playgrounds.ts +++ b/web/src/settings_playgrounds.ts @@ -93,7 +93,8 @@ function build_page(): void { e.stopPropagation(); const $button = $(this); const url = - "/json/realm/playgrounds/" + encodeURIComponent($button.attr("data-playground-id")!); + "/json/realm/playgrounds/" + + encodeURIComponent($button.closest("tr").attr("data-playground-id")!); const html_body = render_confirm_delete_playground(); confirm_dialog.launch({ diff --git a/web/src/settings_profile_fields.ts b/web/src/settings_profile_fields.ts index 655f23883b..87052267ed 100644 --- a/web/src/settings_profile_fields.ts +++ b/web/src/settings_profile_fields.ts @@ -87,7 +87,10 @@ function delete_profile_field(this: HTMLElement, e: JQuery.ClickEvent): void { e.preventDefault(); e.stopPropagation(); - const profile_field_id = Number.parseInt($(this).attr("data-profile-field-id")!, 10); + const profile_field_id = Number.parseInt( + $(this).closest("tr").attr("data-profile-field-id")!, + 10, + ); const profile_field = get_profile_field(profile_field_id); const active_user_ids = people.get_active_user_ids(); let users_using_deleting_profile_field = 0; @@ -443,7 +446,7 @@ function set_up_select_field_edit_form( function open_edit_form_modal(this: HTMLElement): void { const field_types = realm.custom_profile_field_types; - const field_id = Number.parseInt($(this).attr("data-profile-field-id")!, 10); + const field_id = Number.parseInt($(this).closest("tr").attr("data-profile-field-id")!, 10); const field = get_profile_field(field_id)!; let field_data: unknown = {}; diff --git a/web/styles/app_components.css b/web/styles/app_components.css index 7ad4b13497..43d7ce3805 100644 --- a/web/styles/app_components.css +++ b/web/styles/app_components.css @@ -811,6 +811,12 @@ input.settings_text_input { .actions { width: 1%; white-space: nowrap; + + .icon-button { + display: inline-flex; + align-items: center; + min-height: 2.1875em; /* 35px at 16px/1em */ + } } th.actions { diff --git a/web/templates/settings/admin_emoji_list.hbs b/web/templates/settings/admin_emoji_list.hbs index 4f25f4860f..b94717da5e 100644 --- a/web/templates/settings/admin_emoji_list.hbs +++ b/web/templates/settings/admin_emoji_list.hbs @@ -1,5 +1,5 @@ {{#with emoji}} - + {{display_name}} @@ -20,9 +20,13 @@ {{/if}} - + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="tippy-zulip-delayed-tooltip delete" + disabled=(not can_delete_emoji) + data-tippy-content=(t "Deactivate") + }} {{/with}} diff --git a/web/templates/settings/admin_export_list.hbs b/web/templates/settings/admin_export_list.hbs index 0e42eafdcb..c268fbe56d 100644 --- a/web/templates/settings/admin_export_list.hbs +++ b/web/templates/settings/admin_export_list.hbs @@ -1,5 +1,5 @@ {{#with realm_export}} - + {{acting_user}} @@ -22,9 +22,13 @@ {{#if url}} - + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="tippy-zulip-delayed-tooltip delete" + data-tippy-content=(t "Delete") + aria-label=(t "Delete") + }} {{/if}} diff --git a/web/templates/settings/admin_linkifier_list.hbs b/web/templates/settings/admin_linkifier_list.hbs index 4b36c9eada..3bdc1062e9 100644 --- a/web/templates/settings/admin_linkifier_list.hbs +++ b/web/templates/settings/admin_linkifier_list.hbs @@ -14,12 +14,20 @@ {{#if ../can_modify}} - - + {{> ../components/icon_button + icon="edit" + intent="neutral" + custom_classes="tippy-zulip-delayed-tooltip edit" + data-tippy-content=(t "Edit") + aria-label=(t "Edit") + }} + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="tippy-zulip-delayed-tooltip delete" + data-tippy-content=(t "Delete") + aria-label=(t "Delete") + }} {{/if}} diff --git a/web/templates/settings/admin_playground_list.hbs b/web/templates/settings/admin_playground_list.hbs index 60c79826df..257bf1d6b1 100644 --- a/web/templates/settings/admin_playground_list.hbs +++ b/web/templates/settings/admin_playground_list.hbs @@ -1,5 +1,5 @@ {{#with playground}} - + {{pygments_language}} @@ -11,9 +11,13 @@ {{#if ../can_modify}} - + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="tippy-zulip-tooltip delete" + data-tippy-content=(t "Delete") + aria-label=(t "Delete") + }} {{/if}} diff --git a/web/templates/settings/admin_profile_field_list.hbs b/web/templates/settings/admin_profile_field_list.hbs index 0ddaf6acdf..ba266945cf 100644 --- a/web/templates/settings/admin_profile_field_list.hbs +++ b/web/templates/settings/admin_profile_field_list.hbs @@ -35,12 +35,19 @@ {{#if ../can_modify}} - - + {{> ../components/icon_button + icon="edit" + intent="neutral" + custom_classes="tippy-zulip-delayed-tooltip open-edit-form-modal" + data-tippy-content=(t "Edit") + }} + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="tippy-zulip-delayed-tooltip delete" + data-tippy-content=(t "Delete") + aria-label=(t "Delete") + }} {{/if}}