mirror of https://github.com/zulip/zulip.git
settings: Convert `form` to `div` in `Full name` input.
This prevents the web app from being reloaded when the user presses `Enter`. Fixes #22906
This commit is contained in:
parent
6b80f010f5
commit
5b75fcd3e7
|
@ -40,7 +40,7 @@ async function test_change_full_name(page: Page): Promise<void> {
|
|||
await common.clear_and_type(page, full_name_input_selector, "New name");
|
||||
|
||||
await page.click("#settings_content .profile-settings-form");
|
||||
await page.waitForSelector(".full-name-change-form .alert-success", {visible: true});
|
||||
await page.waitForSelector(".full-name-change-container .alert-success", {visible: true});
|
||||
await page.waitForFunction(
|
||||
() => document.querySelector<HTMLInputElement>("#full_name")?.value === "New name",
|
||||
);
|
||||
|
|
|
@ -41,7 +41,7 @@ export function update_full_name(new_full_name) {
|
|||
// Arguably, this should work more like how the `update_email`
|
||||
// flow works, where we update the name in the modal on open,
|
||||
// rather than updating it here, but this works.
|
||||
const $full_name_input = $(".full-name-change-form input[name='full_name']");
|
||||
const $full_name_input = $(".full-name-change-container input[name='full_name']");
|
||||
if ($full_name_input) {
|
||||
$full_name_input.val(new_full_name);
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ input[type="checkbox"] {
|
|||
|
||||
#profile-settings {
|
||||
.custom-profile-fields-form .custom_user_field label,
|
||||
.full-name-change-form label,
|
||||
.full-name-change-container label,
|
||||
.timezone-setting-form label {
|
||||
min-width: fit-content;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="profile-main-panel inline-block">
|
||||
<h3 class="inline-block hide" id="user-profile-header">{{t "Profile" }}</h3>
|
||||
<div id="user_details_section">
|
||||
<form class="form-horizontal full-name-change-form">
|
||||
<div class="full-name-change-container">
|
||||
<div class="input-group inline-block grid user-name-parent">
|
||||
<div class="user-name-section inline-block">
|
||||
<label for="full_name" class="title inline-block">{{t "Full name" }}</label>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal timezone-setting-form">
|
||||
<div class="input-group grid">
|
||||
|
|
Loading…
Reference in New Issue