mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
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:
@@ -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 common.clear_and_type(page, full_name_input_selector, "New name");
|
||||||
|
|
||||||
await page.click("#settings_content .profile-settings-form");
|
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(
|
await page.waitForFunction(
|
||||||
() => document.querySelector<HTMLInputElement>("#full_name")?.value === "New name",
|
() => 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`
|
// Arguably, this should work more like how the `update_email`
|
||||||
// flow works, where we update the name in the modal on open,
|
// flow works, where we update the name in the modal on open,
|
||||||
// rather than updating it here, but this works.
|
// 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) {
|
if ($full_name_input) {
|
||||||
$full_name_input.val(new_full_name);
|
$full_name_input.val(new_full_name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ input[type="checkbox"] {
|
|||||||
|
|
||||||
#profile-settings {
|
#profile-settings {
|
||||||
.custom-profile-fields-form .custom_user_field label,
|
.custom-profile-fields-form .custom_user_field label,
|
||||||
.full-name-change-form label,
|
.full-name-change-container label,
|
||||||
.timezone-setting-form label {
|
.timezone-setting-form label {
|
||||||
min-width: fit-content;
|
min-width: fit-content;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="profile-main-panel inline-block">
|
<div class="profile-main-panel inline-block">
|
||||||
<h3 class="inline-block hide" id="user-profile-header">{{t "Profile" }}</h3>
|
<h3 class="inline-block hide" id="user-profile-header">{{t "Profile" }}</h3>
|
||||||
<div id="user_details_section">
|
<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="input-group inline-block grid user-name-parent">
|
||||||
<div class="user-name-section inline-block">
|
<div class="user-name-section inline-block">
|
||||||
<label for="full_name" class="title inline-block">{{t "Full name" }}</label>
|
<label for="full_name" class="title inline-block">{{t "Full name" }}</label>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
|
||||||
<form class="form-horizontal timezone-setting-form">
|
<form class="form-horizontal timezone-setting-form">
|
||||||
<div class="input-group grid">
|
<div class="input-group grid">
|
||||||
|
|||||||
Reference in New Issue
Block a user