Files
zulip/web/templates/move_topic_to_stream.hbs
Vector73 7b60b2edca stream_popover: Show clear button if topic input is not disabled.
Previously, if the topic input was disabled when "Move messages"
modal was opened, the clear button was not added to the DOM
which caused the bug where the clear button was not shown even
if the topic input was later enabled because user was allowed to edit
topics in the selected channel.
2025-07-09 14:25:53 -07:00

49 lines
3.0 KiB
Handlebars

<form id="move_topic_form">
<div class="move_topic_warning_container"></div>
<div class="topic_stream_edit_header">
{{#unless only_topic_edit}}
<div class="input-group">
<label class="modal-field-label">{{t "New channel" }}</label>
{{> dropdown_widget_wrapper widget_name="move_topic_to_stream"}}
</div>
{{/unless}}
<div class="input-group">
<label for="move-topic-new-topic-name" class="modal-field-label">{{t "New topic" }}</label>
<div id="move-topic-new-topic-input-wrapper">
<input id="move-topic-new-topic-name" name="new_topic_name" type="text" class="move_messages_edit_topic modal_text_input" autocomplete="off" value="{{topic_name}}" {{#if disable_topic_input}}disabled{{/if}} maxlength="{{ max_topic_length }}"/>
<span class="move-topic-new-topic-placeholder placeholder">
{{> topic_not_mandatory_placeholder_text empty_string_topic_display_name=empty_string_topic_display_name}}
</span>
<button type="button" id="clear_move_topic_new_topic_name" class="clear_search_button">
<i class="zulip-icon zulip-icon-close"></i>
</button>
</div>
</div>
<input name="old_topic_name" type="hidden" value="{{topic_name}}" />
<input name="current_stream_id" type="hidden" value="{{current_stream_id}}" />
{{#if from_message_actions_popover}}
<div class="input-group">
<label for="message_move_select_options">{{t "Which messages should be moved?"}}</label>
<select name="propagate_mode" id="message_move_select_options" class="message_edit_topic_propagate modal_select bootstrap-focus-style">
<option value="change_one" {{#if (eq message_placement "last")}}selected{{/if}}> {{t "Move only this message" }}</option>
<option value="change_later" {{#if (eq message_placement "intermediate")}}selected{{/if}}> {{t "Move this and all following messages in this topic" }}</option>
<option value="change_all" {{#if (eq message_placement "first")}}selected{{/if}}> {{t "Move all messages in this topic" }}</option>
</select>
</div>
{{/if}}
<p id="move_messages_count"></p>
<div class="topic_move_breadcrumb_messages">
<label class="checkbox">
<input class="send_notification_to_new_thread" name="send_notification_to_new_thread" type="checkbox" {{#if notify_new_thread}}checked="checked"{{/if}} />
<span class="rendered-checkbox"></span>
{{t "Send automated notice to new topic" }}
</label>
<label class="checkbox">
<input class="send_notification_to_old_thread" name="send_notification_to_old_thread" type="checkbox" {{#if notify_old_thread}}checked="checked"{{/if}} />
<span class="rendered-checkbox"></span>
{{t "Send automated notice to old topic" }}
</label>
</div>
</div>
</form>