settings: Improve UI for email changes.

This commit includes the following changes:
 - The email field is now a disabled text field.
 - An "Edit" (pencil) button is added next to the email
   field, which opens the change email modal.
 - The "Edit" button is not shown if the user doesn't
   have permission to edit their email.
 - When email changes are disabled, the "email changes are
   disabled" tooltip now appears over the email field, which
   previously appeared to the right of the email field.
 - Refactor `settings_org.test.cjs` to align with the changes
   of the added "Edit" button.

Fixes #31975.
This commit is contained in:
Saubhagya Patel
2024-12-05 22:38:57 +05:30
committed by Tim Abbott
parent 74112e4034
commit c44c153b9a
4 changed files with 18 additions and 13 deletions

View File

@@ -422,7 +422,7 @@ export function initialize(): void {
});
tippy.delegate("body", {
target: "#change_email_button_container.disabled_setting_tooltip",
target: "#email_field_container.disabled_setting_tooltip",
content: $t({defaultMessage: "Email address changes are disabled in this organization."}),
appendTo: () => document.body,
onHidden(instance) {