effective_events 2.33.3 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_events_event_registration.rb +27 -4
- data/app/models/effective/event_addon.rb +1 -1
- data/app/models/effective/event_registrant.rb +1 -1
- data/app/views/effective/event_registrations/_addons.html.haml +1 -7
- data/app/views/effective/event_registrations/_code_of_conduct.html.haml +3 -0
- data/app/views/effective/event_registrations/_code_of_conduct_fields.html.haml +6 -0
- data/app/views/effective/event_registrations/_event_registration.html.haml +2 -1
- data/app/views/effective/event_registrations/_tickets.html.haml +1 -7
- data/app/views/effective/event_registrations/billing.html.haml +3 -3
- data/app/views/effective/event_registrations/checkout.html.haml +1 -1
- data/app/views/effective/event_registrations/code_of_conduct.html.haml +11 -0
- data/app/views/effective/event_registrations/details.html.haml +2 -3
- data/app/views/effective/event_registrations/start.html.haml +23 -26
- data/app/views/effective/event_registrations/summary.html.haml +2 -1
- data/app/views/effective/event_registrations/tickets.html.haml +5 -5
- data/app/views/effective/events/show.html.haml +7 -0
- data/config/effective_events.rb +6 -0
- data/lib/effective_events/version.rb +1 -1
- data/lib/effective_events.rb +17 -0
- metadata +7 -4
- /data/app/views/effective/event_registrations/{_fields_event_registrants.html.haml → _details_fields.html.haml} +0 -0
- /data/app/views/effective/event_registrations/{_fields_event_ticket_selections.html.haml → _tickets_fields.html.haml} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 752b1ea45717c8cc9c6cef3c312ca7392186497fb0024c55c71ac63a8e0ac402
|
4
|
+
data.tar.gz: e0dd03ae68b811e37b2ca5ee2237342ac4c1058bbf70a1136846fa81370dadaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 012ac6517e8998ddf0ede909ac774b7d18fcbede6170f5e4961a8db118252b0cd392cf0a0cb608ff7736c1d25a4bc4cf523fae38b12da271b4deae79734a1a2d
|
7
|
+
data.tar.gz: d0a9ef6bb70fa6ef410cce8fccfd12d1bcf3be40d4d4eea8cc5e0803de03198b565287ad748d8f9195b257a2af056a37ba4d79e85b55b596b7868b1cd365e19b
|
@@ -36,6 +36,7 @@ module EffectiveEventsEventRegistration
|
|
36
36
|
tickets: 'Tickets',
|
37
37
|
details: 'Ticket Details',
|
38
38
|
addons: 'Add-ons',
|
39
|
+
code_of_conduct: 'Code of Conduct',
|
39
40
|
summary: 'Review',
|
40
41
|
billing: 'Billing Address',
|
41
42
|
checkout: 'Checkout',
|
@@ -61,7 +62,7 @@ module EffectiveEventsEventRegistration
|
|
61
62
|
accepts_nested_attributes_for :event_registrants, reject_if: :all_blank, allow_destroy: true
|
62
63
|
|
63
64
|
has_many :event_addons, -> { order(:event_product_id, :id) }, class_name: 'Effective::EventAddon', inverse_of: :event_registration, dependent: :destroy
|
64
|
-
accepts_nested_attributes_for :event_addons, reject_if: :
|
65
|
+
accepts_nested_attributes_for :event_addons, reject_if: -> (atts) { atts[:event_product_id].blank? }, allow_destroy: true
|
65
66
|
|
66
67
|
has_many :orders, -> { order(:id) }, as: :parent, class_name: 'Effective::Order', dependent: :nullify
|
67
68
|
accepts_nested_attributes_for :orders
|
@@ -73,6 +74,9 @@ module EffectiveEventsEventRegistration
|
|
73
74
|
accepts_nested_attributes_for :fees, reject_if: :all_blank, allow_destroy: true
|
74
75
|
end
|
75
76
|
|
77
|
+
# Code of Conduct Step
|
78
|
+
attr_accessor :declare_code_of_conduct
|
79
|
+
|
76
80
|
effective_resource do
|
77
81
|
# Acts as Statused
|
78
82
|
status :string, permitted: false
|
@@ -161,6 +165,11 @@ module EffectiveEventsEventRegistration
|
|
161
165
|
end
|
162
166
|
end
|
163
167
|
|
168
|
+
# Code of Conduct Step
|
169
|
+
with_options(if: -> { current_step == :code_of_conduct }) do
|
170
|
+
validates :declare_code_of_conduct, acceptance: true
|
171
|
+
end
|
172
|
+
|
164
173
|
# If we're submitted. Try to move to completed.
|
165
174
|
before_save(if: -> { submitted? }) { try_completed! }
|
166
175
|
|
@@ -193,9 +202,18 @@ module EffectiveEventsEventRegistration
|
|
193
202
|
def required_steps
|
194
203
|
return self.class.test_required_steps if Rails.env.test? && self.class.test_required_steps.present?
|
195
204
|
|
196
|
-
|
197
|
-
|
198
|
-
|
205
|
+
[
|
206
|
+
:start,
|
207
|
+
:tickets,
|
208
|
+
:details,
|
209
|
+
(:addons if event.event_products.any? { |event_product| !event_product.archived? }),
|
210
|
+
(:code_of_conduct if EffectiveEvents.code_of_conduct_enabled?),
|
211
|
+
:summary,
|
212
|
+
:billing,
|
213
|
+
:checkout,
|
214
|
+
:submitted,
|
215
|
+
:complete
|
216
|
+
].compact
|
199
217
|
end
|
200
218
|
|
201
219
|
def delayed_payment_attributes
|
@@ -507,6 +525,11 @@ module EffectiveEventsEventRegistration
|
|
507
525
|
false
|
508
526
|
end
|
509
527
|
|
528
|
+
def wizard_step_title(step)
|
529
|
+
return EffectiveEvents.code_of_conduct_page_title if step == :code_of_conduct
|
530
|
+
default_wizard_step_title(step)
|
531
|
+
end
|
532
|
+
|
510
533
|
private
|
511
534
|
|
512
535
|
def update_deferred_event_registration!
|
@@ -446,7 +446,7 @@ module Effective
|
|
446
446
|
order = (Array(event_registration_submit_order) + Array(orders)).find { |order| order.in_progress? && !order.purchased_or_deferred? && !order.refund? }
|
447
447
|
return false if order.blank?
|
448
448
|
|
449
|
-
order.
|
449
|
+
order.send_payment_request!
|
450
450
|
end
|
451
451
|
|
452
452
|
def send_order_emails!
|
@@ -1,9 +1,3 @@
|
|
1
|
-
=
|
2
|
-
.row
|
3
|
-
.col-sm
|
4
|
-
%h5.card-title= event_registration.wizard_step_title(:addons)
|
5
|
-
.col-sm-auto.text-right
|
6
|
-
= link_to('Edit', wizard_path(:addons)) if edit_effective_wizard?
|
7
|
-
|
1
|
+
= wizard_card(event_registration) do
|
8
2
|
- datatable = EffectiveEventAddonsDatatable.new(event_registration: event_registration)
|
9
3
|
.mb-4= render_simple_datatable(datatable)
|
@@ -0,0 +1,6 @@
|
|
1
|
+
- f.object.declare_code_of_conduct = f.object.has_completed_step?(:code_of_conduct)
|
2
|
+
|
3
|
+
- page = EffectiveEvents.code_of_conduct_effective_page!
|
4
|
+
|
5
|
+
= f.check_box :declare_code_of_conduct, required: true,
|
6
|
+
label: "I agree to abide by the #{link_to(page.title, effective_pages.page_path(page), target: '_blank')}."
|
@@ -1,3 +1,4 @@
|
|
1
1
|
.effective-event-registration
|
2
2
|
- event_registration.render_steps.each do |partial|
|
3
|
-
|
3
|
+
- event_registration.render_step = partial
|
4
|
+
= render "effective/event_registrations/#{partial}", event_registration: event_registration
|
@@ -1,9 +1,3 @@
|
|
1
|
-
=
|
2
|
-
.row
|
3
|
-
.col-sm
|
4
|
-
%h5.card-title= event_registration.wizard_step_title(:tickets)
|
5
|
-
.col-sm-auto.text-right
|
6
|
-
= link_to('Edit', wizard_path(:tickets)) if edit_effective_wizard?
|
7
|
-
|
1
|
+
= wizard_card(event_registration) do
|
8
2
|
- datatable = EffectiveEventRegistrantsDatatable.new(event_registration: event_registration)
|
9
3
|
.mb-4= render_simple_datatable(datatable)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
11
11
|
= f.hidden_field :id
|
12
12
|
|
13
|
-
= f.fields_for(:owner, f.object.owner) do |
|
14
|
-
= effective_address_fields(
|
13
|
+
= f.fields_for(:owner, f.object.owner) do |fo|
|
14
|
+
= effective_address_fields(fo, :billing)
|
15
15
|
|
16
|
-
= f.
|
16
|
+
= f.submit 'Save and Continue', left: true
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render('effective/event_registrations/changing', resource: resource)
|
3
|
+
= render('effective/event_registrations/content', resource: resource)
|
4
|
+
|
5
|
+
= card do
|
6
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
7
|
+
= f.hidden_field :id
|
8
|
+
|
9
|
+
= render('effective/event_registrations/code_of_conduct_fields', f: f)
|
10
|
+
|
11
|
+
= f.submit 'Save and Continue', left: true
|
@@ -5,7 +5,6 @@
|
|
5
5
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
6
6
|
= f.hidden_field :id
|
7
7
|
|
8
|
-
= render('effective/event_registrations/
|
8
|
+
= render('effective/event_registrations/details_fields', form: f)
|
9
9
|
|
10
|
-
|
11
|
-
= f.save 'Save and Continue'
|
10
|
+
= f.submit 'Save and Continue', left: true
|
@@ -1,37 +1,34 @@
|
|
1
1
|
= render 'layout' do
|
2
2
|
= render('effective/event_registrations/content', resource: resource)
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
.
|
7
|
-
|
8
|
-
%p Welcome!
|
4
|
+
= card do
|
5
|
+
- # Signed out
|
6
|
+
- if resource.owner.blank?
|
7
|
+
%p Welcome!
|
9
8
|
|
10
|
-
|
9
|
+
%p You are about to register for #{resource.event}.
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
%p
|
12
|
+
Please
|
13
|
+
= link_to 'sign in', '/users/sign_in'
|
14
|
+
or
|
15
|
+
= link_to 'sign up', '/users/sign_up'
|
16
|
+
to continue.
|
17
|
+
|
18
|
+
%p= link_to 'Sign In to Continue', '/users/sign_in', class: 'btn btn-primary'
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
.card-body
|
25
|
-
%p Welcome #{current_user}!
|
20
|
+
- # Signed in
|
21
|
+
- if resource.owner.present?
|
22
|
+
%p Welcome #{current_user}!
|
26
23
|
|
27
|
-
|
24
|
+
%p You are registering for #{resource.event}.
|
28
25
|
|
29
|
-
|
30
|
-
|
26
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
27
|
+
= f.hidden_field :id
|
31
28
|
|
32
|
-
|
29
|
+
= f.hidden_field :event_id
|
33
30
|
|
34
|
-
|
35
|
-
|
31
|
+
= f.hidden_field :owner_type
|
32
|
+
= f.hidden_field :owner_id
|
36
33
|
|
37
|
-
|
34
|
+
= f.submit 'Save and Continue', left: true
|
@@ -1,9 +1,10 @@
|
|
1
1
|
= render 'layout' do
|
2
2
|
= render('effective/event_registrations/changing', resource: resource)
|
3
3
|
= render('effective/event_registrations/content', resource: resource)
|
4
|
+
|
4
5
|
= render('effective/event_registrations/event_registration', event_registration: resource)
|
5
6
|
|
6
7
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
7
8
|
= f.hidden_field :id
|
8
9
|
|
9
|
-
= f.
|
10
|
+
= f.submit 'Save and Continue', left: true
|
@@ -2,10 +2,10 @@
|
|
2
2
|
= render('effective/event_registrations/changing', resource: resource)
|
3
3
|
= render('effective/event_registrations/content', resource: resource)
|
4
4
|
|
5
|
-
=
|
6
|
-
=
|
5
|
+
= card do
|
6
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
7
|
+
= f.hidden_field :id
|
7
8
|
|
8
|
-
|
9
|
-
= render('effective/event_registrations/fields_event_ticket_selections', form: f)
|
9
|
+
= render('effective/event_registrations/tickets_fields', form: f)
|
10
10
|
|
11
|
-
= f.
|
11
|
+
= f.submit 'Save and Continue', left: true
|
@@ -58,6 +58,13 @@
|
|
58
58
|
.effective-event-body.mb-5
|
59
59
|
= @event.body.to_s
|
60
60
|
|
61
|
+
- if EffectiveEvents.code_of_conduct_enabled?
|
62
|
+
- page = EffectiveEvents.code_of_conduct_effective_page!
|
63
|
+
|
64
|
+
.effective-event-code-of-conduct.mb-4
|
65
|
+
View the
|
66
|
+
= link_to(page.title, effective_pages.page_path(page), target: '_blank')
|
67
|
+
|
61
68
|
- if @event.registerable?
|
62
69
|
.register.mb-4
|
63
70
|
- url = @event.external_registration_url.presence || effective_events.new_event_event_registration_path(@event)
|
data/config/effective_events.rb
CHANGED
@@ -29,6 +29,12 @@ EffectiveEvents.setup do |config|
|
|
29
29
|
# Hint text for event images attachments
|
30
30
|
config.events_hint_text = 'Optional. Shown on the events index and event pages. Dimensions are 220px tall and 350px wide.'
|
31
31
|
|
32
|
+
# Code of Conduct
|
33
|
+
# Enable the code of conduct checkbox on the event registration wizard
|
34
|
+
# Create an Effective::Page for the code of conduct with this slug.
|
35
|
+
config.code_of_conduct_enabled = false
|
36
|
+
config.code_of_conduct_slug = 'event-code-of-conduct'
|
37
|
+
|
32
38
|
# Mailer Settings
|
33
39
|
# Please see config/initializers/effective_resources.rb for default effective_* gem mailer settings
|
34
40
|
#
|
data/lib/effective_events.rb
CHANGED
@@ -11,6 +11,7 @@ module EffectiveEvents
|
|
11
11
|
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject,
|
12
12
|
:layout, :per_page, :use_effective_roles, :categories, :events_hint_text,
|
13
13
|
:organization_enabled, :create_users, :company_or_organization_required,
|
14
|
+
:code_of_conduct_enabled, :code_of_conduct_slug,
|
14
15
|
:event_registration_class_name
|
15
16
|
]
|
16
17
|
end
|
@@ -34,6 +35,22 @@ module EffectiveEvents
|
|
34
35
|
organization_enabled == true
|
35
36
|
end
|
36
37
|
|
38
|
+
def self.code_of_conduct_enabled?
|
39
|
+
code_of_conduct_enabled == true
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.code_of_conduct_effective_page
|
43
|
+
return unless defined?(Effective::Page)
|
44
|
+
Effective::Page.where(slug: code_of_conduct_slug).first
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.code_of_conduct_effective_page!
|
48
|
+
page = code_of_conduct_effective_page()
|
49
|
+
raise("The Effective::Page for slug \"#{code_of_conduct_slug}\" does not exist. Please create it.") if page.blank?
|
50
|
+
|
51
|
+
page
|
52
|
+
end
|
53
|
+
|
37
54
|
# If we can create delayed payment events at all
|
38
55
|
def self.delayed?
|
39
56
|
!!EffectiveOrders.try(:delayed?)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -270,20 +270,23 @@ files:
|
|
270
270
|
- app/views/effective/event_registrants/_fields.html.haml
|
271
271
|
- app/views/effective/event_registrations/_addons.html.haml
|
272
272
|
- app/views/effective/event_registrations/_changing.html.haml
|
273
|
+
- app/views/effective/event_registrations/_code_of_conduct.html.haml
|
274
|
+
- app/views/effective/event_registrations/_code_of_conduct_fields.html.haml
|
273
275
|
- app/views/effective/event_registrations/_content.html.haml
|
274
276
|
- app/views/effective/event_registrations/_dashboard.html.haml
|
275
277
|
- app/views/effective/event_registrations/_details.html.haml
|
278
|
+
- app/views/effective/event_registrations/_details_fields.html.haml
|
276
279
|
- app/views/effective/event_registrations/_event_registration.html.haml
|
277
|
-
- app/views/effective/event_registrations/_fields_event_registrants.html.haml
|
278
|
-
- app/views/effective/event_registrations/_fields_event_ticket_selections.html.haml
|
279
280
|
- app/views/effective/event_registrations/_form_blank_registrants.html.haml
|
280
281
|
- app/views/effective/event_registrations/_layout.html.haml
|
281
282
|
- app/views/effective/event_registrations/_orders.html.haml
|
282
283
|
- app/views/effective/event_registrations/_summary.html.haml
|
283
284
|
- app/views/effective/event_registrations/_tickets.html.haml
|
285
|
+
- app/views/effective/event_registrations/_tickets_fields.html.haml
|
284
286
|
- app/views/effective/event_registrations/addons.html.haml
|
285
287
|
- app/views/effective/event_registrations/billing.html.haml
|
286
288
|
- app/views/effective/event_registrations/checkout.html.haml
|
289
|
+
- app/views/effective/event_registrations/code_of_conduct.html.haml
|
287
290
|
- app/views/effective/event_registrations/complete.html.haml
|
288
291
|
- app/views/effective/event_registrations/details.html.haml
|
289
292
|
- app/views/effective/event_registrations/start.html.haml
|
File without changes
|