mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add new site setting type for tag-group lists (#21993)
* FEATURE: Add new site setting type for tag-group lists
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<TagGroupChooser
|
||||
@tagGroups={{this.selectedTagGroups}}
|
||||
@onChange={{action "onTagGroupChange"}}
|
||||
@options={{hash filterPlaceholder="category.required_tag_group.placeholder"}}
|
||||
/>
|
||||
<div class="desc">{{html-safe this.setting.description}}</div>
|
||||
<SettingValidationMessage @message={{this.validationMessage}} />
|
||||
@@ -0,0 +1,15 @@
|
||||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default class TagGroupList extends Component {
|
||||
@discourseComputed("value")
|
||||
selectedTagGroups(value) {
|
||||
return value.split("|").filter(Boolean);
|
||||
}
|
||||
|
||||
@action
|
||||
onTagGroupChange(tagGroups) {
|
||||
this.set("value", tagGroups.join("|"));
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ const CUSTOM_TYPES = [
|
||||
"upload",
|
||||
"group_list",
|
||||
"tag_list",
|
||||
"tag_group_list",
|
||||
"color",
|
||||
"simple_list",
|
||||
"emoji_list",
|
||||
|
||||
Reference in New Issue
Block a user