FIX: uses only global allow_uncategorized_topics for category drop (#9130)
This commit is contained in:
parent
763a065df9
commit
29c9d8a133
|
@ -28,7 +28,6 @@ export default ComboBoxComponent.extend({
|
|||
subCategory: false,
|
||||
clearable: false,
|
||||
hideParentCategory: "hideParentCategory",
|
||||
allowUncategorized: true,
|
||||
countSubcategories: false,
|
||||
autoInsertNoneItem: false,
|
||||
displayCategoryDescription: "displayCategoryDescription",
|
||||
|
@ -96,7 +95,7 @@ export default ComboBoxComponent.extend({
|
|||
content.title = category.title;
|
||||
content.label = categoryBadgeHTML(category, {
|
||||
link: false,
|
||||
allowUncategorized: this.selectKit.options.allowUncategorized,
|
||||
allowUncategorized: true,
|
||||
hideParent: true
|
||||
}).htmlSafe();
|
||||
}
|
||||
|
@ -174,10 +173,7 @@ export default ComboBoxComponent.extend({
|
|||
},
|
||||
|
||||
_filterUncategorized(content) {
|
||||
if (
|
||||
!this.siteSettings.allow_uncategorized_topics ||
|
||||
!this.selectKit.options.allowUncategorized
|
||||
) {
|
||||
if (!this.siteSettings.allow_uncategorized_topics) {
|
||||
content = content.filter(
|
||||
c => c.id !== this.site.uncategorized_category_id
|
||||
);
|
||||
|
|
|
@ -187,10 +187,11 @@ componentTest("hideParentCategory (true)", {
|
|||
}
|
||||
});
|
||||
|
||||
componentTest("allowUncategorized (default: true)", {
|
||||
componentTest("allow_uncategorized_topics (true)", {
|
||||
template: template(),
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.allow_uncategorized_topics = true;
|
||||
initCategories(this);
|
||||
},
|
||||
|
||||
|
@ -203,10 +204,11 @@ componentTest("allowUncategorized (default: true)", {
|
|||
}
|
||||
});
|
||||
|
||||
componentTest("allowUncategorized (false)", {
|
||||
template: template(["allowUncategorized=false"]),
|
||||
componentTest("allow_uncategorized_topics (false)", {
|
||||
template: template(),
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.allow_uncategorized_topics = false;
|
||||
initCategories(this);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue