When creating/editing a category the parent shoudl be none.
This commit is contained in:
parent
45afed8720
commit
f1a9e52d7e
|
@ -29,7 +29,7 @@
|
|||
{{/each}}
|
||||
{{else}}
|
||||
<label>{{i18n category.parent}}</label>
|
||||
{{categoryChooser valueAttribute="id" value=parent_category_id categories=parentCategories}}
|
||||
{{categoryChooser valueAttribute="id" value=parent_category_id categories=parentCategories rootNone=true}}
|
||||
{{/if}}
|
||||
</section>
|
||||
|
||||
|
|
|
@ -26,7 +26,11 @@ Discourse.CategoryChooserView = Discourse.ComboboxView.extend({
|
|||
|
||||
none: function() {
|
||||
if (Discourse.User.currentProp('staff') || Discourse.SiteSettings.allow_uncategorized_topics) {
|
||||
return Discourse.Category.list().findBy('id', Discourse.Site.currentProp('uncategorized_category_id'));
|
||||
if (this.get('rootNone')) {
|
||||
return "category.none";
|
||||
} else {
|
||||
return Discourse.Category.list().findBy('id', Discourse.Site.currentProp('uncategorized_category_id'));
|
||||
}
|
||||
} else {
|
||||
return 'category.choose';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue