From 3169c0803eee11d90dbfa6ea1df10dcf3a863609 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 3 Mar 2022 20:38:49 +0100 Subject: [PATCH 1/4] BUGFIX: assignment does not need mapping --- lib/custom_wizard/builder.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/custom_wizard/builder.rb b/lib/custom_wizard/builder.rb index 681bc459..8279d070 100644 --- a/lib/custom_wizard/builder.rb +++ b/lib/custom_wizard/builder.rb @@ -154,15 +154,6 @@ class CustomWizard::Builder end end - if content[:type] == 'assignment' && field_template['type'] === 'dropdown' - content[:result] = content[:result].map do |item| - { - id: item, - name: item - } - end - end - params[:content] = content[:result] end end From 71af94c80bc6c86821440d4d2749086a37eb8815 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 3 Mar 2022 20:40:29 +0100 Subject: [PATCH 2/4] Version bump --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index b243c6f4..b5eb348d 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Create custom wizards -# version: 1.18.2 +# version: 1.18.3 # authors: Angus McLeod # url: https://github.com/paviliondev/discourse-custom-wizard # contact emails: angus@thepavilion.io From cb1054bcd6cba1f661684b11d37e531933b167be Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 3 Mar 2022 20:47:30 +0100 Subject: [PATCH 3/4] FIX: output text for dropdown should not be possible --- .../discourse/components/wizard-custom-field.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-custom-field.js.es6 b/assets/javascripts/discourse/components/wizard-custom-field.js.es6 index b5c10c65..8efb7f0c 100644 --- a/assets/javascripts/discourse/components/wizard-custom-field.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-field.js.es6 @@ -86,8 +86,8 @@ export default Component.extend(UndoChanges, { if (this.isDropdown) { options.wizardFieldSelection = "key,value"; options.userFieldOptionsSelection = "output"; - options.textSelection = "key,value,output"; - options.inputTypes = "conditional,association,assignment"; + options.textSelection = "key,value"; + options.inputTypes = "association,conditional,assignment"; options.pairConnector = "association"; options.keyPlaceholder = "admin.wizard.key"; options.valuePlaceholder = "admin.wizard.value"; From caf2333326284845376d9e72e72f2d755fe1c500 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 3 Mar 2022 21:02:44 +0100 Subject: [PATCH 4/4] Bump coverage --- coverage/.last_run.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage/.last_run.json b/coverage/.last_run.json index a2dfb49e..4c7365e8 100644 --- a/coverage/.last_run.json +++ b/coverage/.last_run.json @@ -1,5 +1,5 @@ { "result": { - "line": 92.52 + "line": 92.87 } }