Skip to content

Commit 035e997

Browse files
authored
Merge pull request #186 from paviliondev/bugfix_dropdown
FIX: dropdown content assignment should be allowed to be set to "text"
2 parents 1a2f8f1 + caf2333 commit 035e997

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

assets/javascripts/discourse/components/wizard-custom-field.js.es6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ export default Component.extend(UndoChanges, {
8686
if (this.isDropdown) {
8787
options.wizardFieldSelection = "key,value";
8888
options.userFieldOptionsSelection = "output";
89-
options.textSelection = "key,value,output";
90-
options.inputTypes = "conditional,association,assignment";
89+
options.textSelection = "key,value";
90+
options.inputTypes = "association,conditional,assignment";
9191
options.pairConnector = "association";
9292
options.keyPlaceholder = "admin.wizard.key";
9393
options.valuePlaceholder = "admin.wizard.value";

coverage/.last_run.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"result": {
3-
"line": 92.52
3+
"line": 92.87
44
}
55
}

lib/custom_wizard/builder.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,6 @@ def append_field(step, step_template, field_template, build_opts)
154154
end
155155
end
156156

157-
if content[:type] == 'assignment' && field_template['type'] === 'dropdown'
158-
content[:result] = content[:result].map do |item|
159-
{
160-
id: item,
161-
name: item
162-
}
163-
end
164-
end
165-
166157
params[:content] = content[:result]
167158
end
168159
end

plugin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
# name: discourse-custom-wizard
33
# about: Create custom wizards
4-
# version: 1.18.2
4+
# version: 1.18.3
55
# authors: Angus McLeod
66
# url: https://github.com/paviliondev/discourse-custom-wizard
77
# contact emails: angus@thepavilion.io

0 commit comments

Comments
 (0)