diff --git a/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 b/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 index 6d65d782..bddc4bcf 100644 --- a/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 +++ b/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 @@ -17,6 +17,9 @@ export default Component.extend({ showText: computed("activeType", function () { return this.showInput("text"); }), + showLabel: computed("activeType", function() { + return this.showInput("wizardUser"); + }), showWizardField: computed("activeType", function () { return this.showInput("wizardField"); }), @@ -38,6 +41,9 @@ export default Component.extend({ showGroup: computed("activeType", function () { return this.showInput("group"); }), + showGroupUsers: computed("activeType", function () { + return this.showInput("groupUsers"); + }), showUser: computed("activeType", function () { return this.showInput("user"); }), @@ -98,9 +104,15 @@ export default Component.extend({ groupEnabled: computed("options.groupSelection", "inputType", function () { return this.optionEnabled("groupSelection"); }), + groupUsersEnabled: computed("options.groupUsersSelection", "inputType", function () { + return this.optionEnabled("groupUsersSelection"); + }), userEnabled: computed("options.userSelection", "inputType", function () { return this.optionEnabled("userSelection"); }), + wizardUserEnabled: computed("options.wizardUserSelection", "inputType", function () { + return this.optionEnabled("wizardUserSelection"); + }), listEnabled: computed("options.listSelection", "inputType", function () { return this.optionEnabled("listSelection"); }), @@ -114,7 +126,7 @@ export default Component.extend({ "showUserFieldOptions", "showCustomField" ), - showMultiSelect: or("showCategory", "showGroup"), + showMultiSelect: or("showCategory", "showGroup", "showGroupUsers"), hasTypes: gt("selectorTypes.length", 1), showTypes: false, @@ -245,6 +257,7 @@ export default Component.extend({ return { category: this.categories, group: this.groups, + groupUsers: this.groups, list: "", }[activeType]; }, diff --git a/assets/javascripts/discourse/lib/wizard-mapper.js.es6 b/assets/javascripts/discourse/lib/wizard-mapper.js.es6 index 29315b9c..71c69484 100644 --- a/assets/javascripts/discourse/lib/wizard-mapper.js.es6 +++ b/assets/javascripts/discourse/lib/wizard-mapper.js.es6 @@ -41,6 +41,7 @@ const connectors = { "less_or_equal", "regex", "is", + "in" ], output: ["then", "set"], }; @@ -101,8 +102,10 @@ const selectionTypes = [ "userField", "userFieldOptions", "group", + "groupUsers", "category", "tag", + "wizardUser", "user", "customField", ]; diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index f06e0d89..e6818504 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -274,6 +274,8 @@ userFieldSelection="key,value,assignment" wizardActionSelection=true groupSelection="value,output" + wizardUserSelection="key" + groupUsersSelection="value" outputDefaultSelection="group" context="action" )}} diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs index 94870416..10e8f015 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs @@ -20,6 +20,10 @@