FIX: Select topic timer's category by default in edit modal.

This commit is contained in:
Guo Xiang Tan 2017-07-06 16:01:57 +09:00
parent c53eeaaa68
commit f6491ee125
3 changed files with 7 additions and 4 deletions

View File

@ -42,7 +42,7 @@ export default Combobox.extend({
@computed("rootNone", "rootNoneLabel")
none(rootNone, rootNoneLabel) {
if (Discourse.SiteSettings.allow_uncategorized_topics || this.get('allowUncategorized')) {
if (this.siteSettings.allow_uncategorized_topics || this.get('allowUncategorized')) {
if (rootNone) {
return rootNoneLabel || "category.none";
} else {

View File

@ -70,7 +70,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
time,
this.get('topicTimer.based_on_last_post'),
statusType,
this.get('categoryId')
this.get('topicTimer.category_id')
).then(result => {
if (time) {
this.send('closeModal');

View File

@ -13,13 +13,16 @@
{{else if publishToCategory}}
<div class="control-group">
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
{{category-chooser valueAttribute="id" value=categoryId excludeCategoryId=excludeCategoryId}}
{{category-chooser
valueAttribute="id"
value=topicTimer.category_id
excludeCategoryId=excludeCategoryId}}
</div>
{{auto-update-input
input=updateTime
statusType=selection
categoryId=categoryId
categoryId=topicTimer.category_id
basedOnLastPost=false}}
{{else if autoClose}}
{{auto-update-input