settings: Fix maxlength for name input in "Profile" panel.

The "maxlength" attribute for "Full name" input in "Profile"
settings panel was incorrectly set to 60, when we allow
maximum 100 characters. This commit fixes that.
This commit is contained in:
Sahil Batra
2025-07-18 18:32:09 +05:30
committed by Tim Abbott
parent 4dc802aa9a
commit b9e9697be2
3 changed files with 4 additions and 1 deletions

View File

@@ -55,6 +55,8 @@ export let INACCESSIBLE_USER_NAME: string;
export let WELCOME_BOT: User;
export let EMAIL_GATEWAY_BOT: User;
export const MAX_USER_NAME_LENGTH = 100;
// We have an init() function so that our automated tests
// can easily clear data.
export function init(): void {

View File

@@ -151,6 +151,7 @@ export function build_page(): void {
information_density.get_string_display_value_for_line_height(
user_settings.web_line_height_percent,
),
max_user_name_length: people.MAX_USER_NAME_LENGTH,
});
$(".settings-box").html(rendered_settings_tab);

View File

@@ -10,7 +10,7 @@
<div class="alert-notification full-name-status"></div>
<div class="settings-profile-user-field-hint">{{t "How your account is displayed in Zulip." }}</div>
<div id="full_name_input_container" {{#unless user_can_change_name}}class="disabled_setting_tooltip"{{/unless}}>
<input id="full_name" name="full_name" class="settings_text_input" type="text" value="{{ current_user.full_name }}" {{#unless user_can_change_name}}disabled="disabled"{{/unless}} maxlength="60" />
<input id="full_name" name="full_name" class="settings_text_input" type="text" value="{{ current_user.full_name }}" {{#unless user_can_change_name}}disabled="disabled"{{/unless}} maxlength="{{max_user_name_length}}" />
</div>
</div>
</div>