mirror of
https://github.com/zulip/zulip.git
synced 2026-07-03 21:10:12 +08:00
This is controlled through the admin tab and a new field in the Realms table. Notes: * The admin tab setting takes a value in minutes, whereas the backend stores it in seconds. * This setting is unused when allow_message_editing is false. * There is some generosity in how the limit is enforced. For instance, if the user sees the hovering edit button, we ensure they have at least 5 seconds to click it, and if the user gets to the message edit form, we ensure they have at least 10 seconds to make the edit, by relaxing the limit. * This commit also includes a countdown timer in the message edit form. Resolves #903.
37 lines
1.8 KiB
Handlebars
37 lines
1.8 KiB
Handlebars
{{! Client-side Mustache template for rendering the message edit form. }}
|
|
|
|
<form id="message_edit_form" class="form-horizontal">
|
|
{{#if is_stream}}
|
|
<div class="control-group">
|
|
<label class="control-label edit-control-label" for="message_edit_topic">{{t "Topic" }}</label>
|
|
<div class="controls edit-controls">
|
|
<input type="text" value="{{topic}}" class="message_edit_topic" id="message_edit_topic" />
|
|
<select class='message_edit_topic_propagate' style='display:none;'>
|
|
<option selected="selected" value="change_one"> {{t "Change only this message topic" }}</option>
|
|
<option value="change_later"> {{t "Change later messages to this topic" }}</option>
|
|
<option value="change_all"> {{t "Change previous and following messages to this topic" }}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="control-group">
|
|
<div class="controls edit-controls">
|
|
<textarea class="message_edit_content" id="message_edit_content">{{content}}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="controls edit-controls">
|
|
<button type="button" class="message_edit_save btn btn-primary btn-small">{{t "Save" }}</button>
|
|
<button type="button" class="message_edit_cancel btn btn-default btn-small">{{t "Cancel" }}</button>
|
|
<div class="message-edit-timer-control-group">
|
|
<span class="message_edit_countdown_timer"></span>
|
|
<span><i id="message_edit_tooltip" class="message_edit_tooltip icon-vector-question-sign" data-toggle="tooltip"
|
|
title="Message content can only be edited for {{minutes_to_edit}} minutes after it is sent."></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="alert alert-error edit_error hide"></div>
|
|
</form>
|