diff --git a/app/controllers/custom_wizard/admin/wizard.rb b/app/controllers/custom_wizard/admin/wizard.rb index 7a316c84..c778bc7e 100644 --- a/app/controllers/custom_wizard/admin/wizard.rb +++ b/app/controllers/custom_wizard/admin/wizard.rb @@ -164,7 +164,8 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController messageable_level: mapped_params, visibility_level: mapped_params, members_visibility_level: mapped_params, - add_event: mapped_params + add_event: mapped_params, + add_location: mapped_params ] ) end diff --git a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 index 2b6b35b4..c9c2c4c9 100644 --- a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 @@ -94,7 +94,12 @@ export default Component.extend(UndoChanges, { }, @discourseComputed("fieldTypes") - hasEventsField(fieldTypes) { + hasEventField(fieldTypes) { return fieldTypes.map((ft) => ft.id).includes("event"); }, + + @discourseComputed("fieldTypes") + hasLocationField(fieldTypes) { + return fieldTypes.map((ft) => ft.id).includes("location"); + }, }); diff --git a/assets/javascripts/discourse/lib/wizard-schema.js.es6 b/assets/javascripts/discourse/lib/wizard-schema.js.es6 index e9622c45..69254695 100644 --- a/assets/javascripts/discourse/lib/wizard-schema.js.es6 +++ b/assets/javascripts/discourse/lib/wizard-schema.js.es6 @@ -99,6 +99,7 @@ const action = { skip_redirect: null, suppress_notifications: null, add_event: null, + add_location: null, }, send_message: { title: null, @@ -196,6 +197,7 @@ const action = { "visibility_level", "members_visibility_level", "add_event", + "add_location", ], required: ["id", "type"], dependent: {}, diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 3b2222a0..51ff000e 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -161,7 +161,7 @@ - {{#if hasEventsField}} + {{#if hasEventField}}