diff --git a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 index 976501e5..8a2147b1 100644 --- a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 @@ -3,7 +3,8 @@ import { default as computed, observes } from 'ember-addons/ember-computed-decor const ACTION_TYPES = [ { id: 'create_topic', name: 'Create Topic' }, { id: 'update_profile', name: 'Update Profile' }, - { id: 'send_message', name: 'Send Message' } + { id: 'send_message', name: 'Send Message' }, + { id: 'add_to_group', name: 'Add to Group' } ]; const PROFILE_FIELDS = [ @@ -26,6 +27,7 @@ export default Ember.Component.extend({ createTopic: Ember.computed.equal('action.type', 'create_topic'), updateProfile: Ember.computed.equal('action.type', 'update_profile'), sendMessage: Ember.computed.equal('action.type', 'send_message'), + addToGroup: Ember.computed.equal('action.type', 'add_to_group'), disableId: Ember.computed.not('action.isNew'), @computed('currentStepId', 'wizard.save_submissions') diff --git a/assets/javascripts/discourse/components/wizard-custom-field.js.es6 b/assets/javascripts/discourse/components/wizard-custom-field.js.es6 index bdef2d67..19cc0ba2 100644 --- a/assets/javascripts/discourse/components/wizard-custom-field.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-field.js.es6 @@ -15,7 +15,13 @@ export default Ember.Component.extend({ @computed() presetChoices() { return [ - { id: 'categories', name: I18n.t('admin.wizard.field.choices_preset.categories') } + { + id: 'categories', + name: I18n.t('admin.wizard.field.choices_preset.categories') + },{ + id: 'groups', + name: I18n.t('admin.wizard.field.choices_preset.groups') + } ]; }, }); diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 7a7f3cfc..5cc5685e 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -204,3 +204,25 @@ allowUserField=true}} {{/if}} + +{{#if addToGroup}} +