FIX: Select topic timer's category by default in edit modal.
This commit is contained in:
parent
c53eeaaa68
commit
f6491ee125
|
@ -42,7 +42,7 @@ export default Combobox.extend({
|
||||||
|
|
||||||
@computed("rootNone", "rootNoneLabel")
|
@computed("rootNone", "rootNoneLabel")
|
||||||
none(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) {
|
if (rootNone) {
|
||||||
return rootNoneLabel || "category.none";
|
return rootNoneLabel || "category.none";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
time,
|
time,
|
||||||
this.get('topicTimer.based_on_last_post'),
|
this.get('topicTimer.based_on_last_post'),
|
||||||
statusType,
|
statusType,
|
||||||
this.get('categoryId')
|
this.get('topicTimer.category_id')
|
||||||
).then(result => {
|
).then(result => {
|
||||||
if (time) {
|
if (time) {
|
||||||
this.send('closeModal');
|
this.send('closeModal');
|
||||||
|
|
|
@ -13,13 +13,16 @@
|
||||||
{{else if publishToCategory}}
|
{{else if publishToCategory}}
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
|
<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>
|
</div>
|
||||||
|
|
||||||
{{auto-update-input
|
{{auto-update-input
|
||||||
input=updateTime
|
input=updateTime
|
||||||
statusType=selection
|
statusType=selection
|
||||||
categoryId=categoryId
|
categoryId=topicTimer.category_id
|
||||||
basedOnLastPost=false}}
|
basedOnLastPost=false}}
|
||||||
{{else if autoClose}}
|
{{else if autoClose}}
|
||||||
{{auto-update-input
|
{{auto-update-input
|
||||||
|
|
Loading…
Reference in New Issue