Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Fix maxlength for name input in "Profile" panel.
Sahil Batrab9e9697be2d4
diff --git a/web/src/people.ts b/web/src/people.tsindex cb30fb1c5c1..04eb46ac93f 100644--- a/web/src/people.ts+++ b/web/src/people.ts@@ -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 {diff --git a/web/src/settings.ts b/web/src/settings.tsindex c779ac5a8a4..54be0e8e4ec 100644--- a/web/src/settings.ts+++ b/web/src/settings.ts@@ -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);diff --git a/web/templates/settings/profile_settings.hbs b/web/templates/settings/profile_settings.hbsindex 5df9145529f..9ac8bf1c3e7 100644--- a/web/templates/settings/profile_settings.hbs+++ b/web/templates/settings/profile_settings.hbs@@ -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>