Merge pull request #227 from paviliondev/remove_in_wizard_subscription_conditional_logic_check
Remove subscription requirement for template field interpolation
Dieser Commit ist enthalten in:
Commit
030929a414
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
|
@ -255,7 +255,7 @@ class CustomWizard::Mapper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if opts[:template] && CustomWizard::Subscription.subscribed?
|
if opts[:template] #&& CustomWizard::Subscription.subscribed?
|
||||||
template = Liquid::Template.parse(string)
|
template = Liquid::Template.parse(string)
|
||||||
string = template.render(data)
|
string = template.render(data)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# name: discourse-custom-wizard
|
# name: discourse-custom-wizard
|
||||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
||||||
# version: 2.2.5
|
# version: 2.2.6
|
||||||
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever
|
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact_emails: development@pavilion.tech
|
# contact_emails: development@pavilion.tech
|
||||||
|
|
|
@ -373,7 +373,7 @@ describe CustomWizard::Mapper do
|
||||||
expect(result).to eq(template_params["step_1_field_1"])
|
expect(result).to eq(template_params["step_1_field_1"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "requires a subscription" do
|
it "does not require a subscription" do
|
||||||
template = '{{ "w{step_1_field_1}" | size }}'
|
template = '{{ "w{step_1_field_1}" | size }}'
|
||||||
mapper = create_template_mapper(template_params, user1)
|
mapper = create_template_mapper(template_params, user1)
|
||||||
result = mapper.interpolate(
|
result = mapper.interpolate(
|
||||||
|
@ -383,7 +383,7 @@ describe CustomWizard::Mapper do
|
||||||
wizard: true,
|
wizard: true,
|
||||||
value: true
|
value: true
|
||||||
)
|
)
|
||||||
expect(result).to eq("{{ \"#{template_params["step_1_field_1"]}\" | size }}")
|
expect(result).to eq("5")
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with a subscription" do
|
context "with a subscription" do
|
||||||
|
|
Laden …
In neuem Issue referenzieren