0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 01:10:28 +01:00

Merge branch 'master' into pro-release

Dieser Commit ist enthalten in:
angusmcleod 2021-09-09 14:39:49 +08:00
Commit 10fb3ee176
6 geänderte Dateien mit 14 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -1 +1,2 @@
2.7.8: e07a57e398b6b1676ab42a7e34467556fca5416b
2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c

Datei anzeigen

@ -58,6 +58,7 @@
{{tag-chooser
tags=value
onChange=(action "changeValue")
everyTag=true
options=(hash
none=placeholderKey
filterable=true

Datei anzeigen

@ -1,8 +1,11 @@
//= require_tree_discourse discourse/app/lib
//= require_tree_discourse discourse/app/mixins
//
//= require discourse/app/mixins/singleton
//= require discourse/app/mixins/upload
//= require discourse/app/mixins/composer-upload
//= require discourse/app/mixins/textarea-text-manipulation
//= require discourse/app/adapters/rest
@ -61,10 +64,10 @@
//= require markdown-it-bundle
//= require lodash.js
//= require mousetrap.js
//= require template_include.js
//= require caret_position.js
//= require popper.js
//= require uppy.js
//= require bootstrap-modal.js
//= require bootbox.js
//= require discourse-shims

Datei anzeigen

@ -1 +1 @@
{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex}}
{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex everyTag=true}}

Datei anzeigen

@ -48,20 +48,21 @@ class CustomWizard::AdminManagerController < CustomWizard::AdminController
imported = []
failures = []
templates = template_json.is_a?(Array) ? template_json : [template_json]
template_json.each do |json|
template = CustomWizard::Template.new(json)
templates.each do |raw_template|
template = CustomWizard::Template.new(raw_template)
template.save(skip_jobs: true, create: true)
if template.errors.any?
failures.push(
id: json['id'],
id: template.data['id'],
messages: template.errors.full_messages.join(', ')
)
else
imported.push(
id: json['id'],
name: json['name']
id: template.data['id'],
name: template.data['name']
)
end
end

Datei anzeigen

@ -226,7 +226,7 @@ class CustomWizard::Mapper
end
def interpolate(string, opts = { user: true, wizard: true, value: true, template: false })
return string if string.blank?
return string if string.blank? || string.frozen?
if opts[:user]
string.gsub!(/u\{(.*?)\}/) { |match| map_user_field($1) || '' }