This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/modal/edit-topic-timer.hbs
Joffrey JAFFEUX 746c5927e1 Replaces remaining {{category-chooser}} by {{category-select-box}}
To achieve replacement, this commit also adds support for:
- clearSelectionLabel which will allows to unselect any chosen category
- select-box inside a modal
- fixes minor css positioning issues

Note: {{category-chooser}} will be removed in the next weeks.
2017-08-30 17:04:17 +02:00

52 lines
1.5 KiB
Handlebars

<form>
{{#d-modal-body title="topic.topic_status_update.title" autoFocus="false"}}
<div class="control-group">
{{combo-box content=timerTypes value=selection width="50%"}}
</div>
<div>
{{#if showTimeOnly}}
{{auto-update-input
input=updateTime
statusType=selection
basedOnLastPost=false}}
{{else if publishToCategory}}
<div class="control-group">
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
{{category-select-box
value=topicTimer.category_id
excludeCategoryId=excludeCategoryId}}
</div>
{{auto-update-input
input=updateTime
statusType=selection
categoryId=topicTimer.category_id
basedOnLastPost=false}}
{{else if autoClose}}
{{auto-update-input
input=updateTime
statusType=selection
basedOnLastPost=topicTimer.based_on_last_post
lastPostedAt=model.last_posted_at}}
{{/if}}
</div>
{{/d-modal-body}}
<div class="modal-footer">
{{d-button class="btn-primary"
disabled=saveDisabled
label="topic.topic_status_update.save"
action="saveTimer"}}
<a {{action "closeModal"}}>{{i18n 'cancel'}}</a>
{{conditional-loading-spinner size="small" condition=loading}}
{{#if topicTimer.execute_at}}
{{d-button class="pull-right btn-danger"
action="removeTimer"
label='topic.topic_status_update.remove'}}
{{/if}}
</div>
</form>