Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Disable the move-handle for new-choice-row.

Maneesh Shukla6a76fcfd0e3f
diff --git a/web/src/settings_profile_fields.ts b/web/src/settings_profile_fields.ts
index d72ddbf1191..4f22d35d2b2 100644
--- a/web/src/settings_profile_fields.ts
+++ b/web/src/settings_profile_fields.ts
@@ -298,6 +298,7 @@ function add_choice_row(this: HTMLElement, e: JQuery.TriggeredEvent): void {
// Display delete buttons for all existing choices before creating the new row,
// which will not have the delete button so that there is at least one option present.
$curr_choice_row.find("button.delete-choice").show();
+ $curr_choice_row.find("span.move-handle").removeClass("invisible");
assert(e.delegateTarget instanceof HTMLElement);
const choices_div = e.delegateTarget;
create_choice_row($(choices_div));
diff --git a/web/templates/settings/profile_field_choice.hbs b/web/templates/settings/profile_field_choice.hbs
index 09c769137f9..cdc379b4b21 100644
--- a/web/templates/settings/profile_field_choice.hbs
+++ b/web/templates/settings/profile_field_choice.hbs
@@ -1,5 +1,5 @@
<div class='choice-row movable-row' data-value="{{value}}">
- <span class="move-handle">
+ <span class="move-handle {{#if new_empty_choice_row}}invisible{{/if}}">
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
</span>