1
0
Fork 0

Commits vergleichen

...

9 Commits

Autor SHA1 Nachricht Datum
jumagura
a5af0b109d DEV: Manage edge case not custom fields 2023-10-02 23:38:01 -04:00
jumagura
4ce82b0d17 fix linting 2023-10-02 22:46:31 -04:00
jumagura
6294f6f9c0 DEV: Add correct parameters for testing 2023-10-02 22:44:54 -04:00
jumagura
98391b565e DEV: Modify test for errors 2023-10-02 22:26:00 -04:00
jumagura
779912332a DEV: remove next condition 2023-10-02 22:25:20 -04:00
jumagura
1d2f75951f FIX: Use wizard_submission_id instead of new value 2023-10-02 22:05:28 -04:00
jumagura
3433bd4141 fix linting 2023-10-02 18:29:12 -04:00
jumagura
dae803bf20 bump version 2023-10-02 18:25:36 -04:00
jumagura
24d7ca646a FIX: Refine Topic Creation Hook to Allow Wizard Multi-Step Functionality 2023-10-02 18:18:00 -04:00

Datei anzeigen

@ -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.4.23 # version: 2.4.24
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
# 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
@ -239,10 +239,11 @@ after_initialize do
on(:before_create_topic) do |topic_params, user| on(:before_create_topic) do |topic_params, user|
category = topic_params.category category = topic_params.category
if category&.custom_fields&.[]('create_topic_wizard').present? wizard_submission_id = topic_params.custom_fields&.[]('wizard_submission_id')
if category&.custom_fields&.[]('create_topic_wizard').present? && wizard_submission_id.blank?
raise Discourse::InvalidParameters.new( raise Discourse::InvalidParameters.new(
I18n.t('wizard.error_messages.wizard_replacing_composer') I18n.t('wizard.error_messages.wizard_replacing_composer')
) )
end end
end end
end end