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/components/edit-topic-timer-form.hbs
Joffrey JAFFEUX 0431942f3d
DEV: select-kit 2 (#7998)
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component.

Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
2020-02-03 14:22:14 +01:00

53 lines
1.5 KiB
Handlebars

<form>
<div class="control-group">
{{combo-box
class="timer-type"
onChange=onChangeStatusType
content=timerTypes
value=selection
}}
</div>
<div>
{{#if showTimeOnly}}
{{future-date-input
input=(readonly topicTimer.updateTime)
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
basedOnLastPost=topicTimer.based_on_last_post
onChangeInput=onChangeUpdateTime
}}
{{else if publishToCategory}}
<div class="control-group">
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
{{category-chooser
value=topicTimer.category_id
excludeCategoryId=excludeCategoryId
onChange=(action (mut topicTimer.category_id))
}}
</div>
{{future-date-input
input=(readonly topicTimer.updateTime)
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
categoryId=topicTimer.category_id
basedOnLastPost=topicTimer.based_on_last_post
onChangeInput=onChangeUpdateTime
}}
{{else if autoClose}}
{{future-date-input
input=topicTimer.updateTime
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
basedOnLastPost=topicTimer.based_on_last_post
lastPostedAt=model.last_posted_at
onChangeInput=onChangeUpdateTime
}}
{{/if}}
</div>
</form>