From 2114b80185bfc5b1fa42ea195e6be7cab2899d66 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 3 Apr 2023 12:37:09 +1000 Subject: [PATCH 1/3] Add wizard-subscription-selector support to field type selection --- assets/javascripts/discourse/lib/wizard-schema.js.es6 | 1 + .../templates/components/wizard-custom-field.hbs | 9 ++++++--- .../templates/components/wizard-custom-step.hbs | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/lib/wizard-schema.js.es6 b/assets/javascripts/discourse/lib/wizard-schema.js.es6 index 24bda1d3..47257d82 100644 --- a/assets/javascripts/discourse/lib/wizard-schema.js.es6 +++ b/assets/javascripts/discourse/lib/wizard-schema.js.es6 @@ -244,6 +244,7 @@ const custom_field = { export function buildFieldTypes(types) { wizardSchema.field.types = types; + wizardSchema.field.type = Object.keys(types); } field.type = Object.keys(field.types); diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index 6273f9a9..26f6051f 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -56,13 +56,16 @@
- {{combo-box + {{wizard-subscription-selector value=field.type - content=fieldTypes + feature="field" + attribute="type" onChange=(action "changeType") + wizard=wizard options=(hash none="admin.wizard.select_type" - )}} + ) + }}
diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs index 40ac09e0..431c3ae3 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs @@ -111,6 +111,7 @@ {{wizard-custom-field field=field step=step + wizard=wizard currentFieldId=currentField.id fieldTypes=fieldTypes removeField="removeField" From b035ab9168562434e319e85bfe756877b4b50167 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 3 Apr 2023 12:39:14 +1000 Subject: [PATCH 2/3] Bump version --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index 4e7c8aef..5cf05651 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.2.20 +# version: 2.2.21 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech From 2423e9afb7c89587888e9c2c9e397491482cb81e Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 3 Apr 2023 15:08:02 +1000 Subject: [PATCH 3/3] Bump version --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index 5cf05651..ab596540 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.2.21 +# version: 2.3.1 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech