effective_events 0.12.5 → 0.13.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 +4 -0
- data/app/models/effective/event.rb +17 -0
- data/app/views/admin/events/_form.html.haml +0 -5
- data/app/views/admin/events/_form_event.html.haml +27 -10
- data/app/views/effective/event_registrations/checkout.html.haml +4 -6
- data/db/migrate/101_create_effective_events.rb +3 -0
- data/lib/effective_events/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26de7ee7dbc2f5ec71bac062d12c9dffa48adaa6286f82eee122e3c3f5e13a56
|
4
|
+
data.tar.gz: 59249f1f8d89f11f4c7c1bbea1f923db8455635167338e0d98a64b33748f6dda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9141865746360f1831a30429017eaabb44ba31e5ed7c05763c1ced28badcdd3b9c3776a5d7eb7965a641666bec7bffe87ddb590796b013c8ee0143bbfd8bbd
|
7
|
+
data.tar.gz: 145136b9ac1891673542dc28eadb43498377f03320f261e779e82b0bdbdcc2986c456fcf6f1dccff17dbb434c56e1bee5ab0daeca8abc75e2a98ddf9f2d7850a
|
@@ -150,6 +150,10 @@ module EffectiveEventsEventRegistration
|
|
150
150
|
with_outstanding_coupon_fees(submit_fees)
|
151
151
|
end
|
152
152
|
|
153
|
+
def delayed_payment_attributes
|
154
|
+
{ delayed_payment: event&.delayed_payment, delayed_payment_date: event&.delayed_payment_date }
|
155
|
+
end
|
156
|
+
|
153
157
|
# All Fees and Orders
|
154
158
|
def submit_fees
|
155
159
|
if defined?(EffectiveMemberships)
|
@@ -68,6 +68,10 @@ module Effective
|
|
68
68
|
|
69
69
|
allow_blank_registrants :boolean
|
70
70
|
|
71
|
+
# Delayed Payments feature
|
72
|
+
delayed_payment :boolean
|
73
|
+
delayed_payment_date :date
|
74
|
+
|
71
75
|
# Access
|
72
76
|
roles_mask :integer
|
73
77
|
authenticate_user :boolean
|
@@ -131,10 +135,15 @@ module Effective
|
|
131
135
|
validates :published_at, presence: true, unless: -> { draft? }
|
132
136
|
validates :start_at, presence: true
|
133
137
|
validates :end_at, presence: true
|
138
|
+
validates :external_registration_url, url: true
|
134
139
|
|
135
140
|
validates :registration_start_at, presence: true, unless: -> { external_registration? }
|
136
141
|
validates :registration_end_at, presence: true, unless: -> { external_registration? }
|
137
142
|
|
143
|
+
validates :delayed_payment, inclusion: { in: [false], message: "cannot be used for external registration events" }, if: -> { external_registration? }
|
144
|
+
validates :delayed_payment_date, presence: true, if: -> { delayed_payment? }
|
145
|
+
validates :delayed_payment_date, absence: true, unless: -> { delayed_payment? }
|
146
|
+
|
138
147
|
validate(if: -> { start_at && end_at }) do
|
139
148
|
errors.add(:end_at, 'must be after start date') unless start_at < end_at
|
140
149
|
end
|
@@ -151,6 +160,14 @@ module Effective
|
|
151
160
|
errors.add(:early_bird_end_at, 'must be before start date') unless early_bird_end_at < start_at
|
152
161
|
end
|
153
162
|
|
163
|
+
validate(if: -> { delayed_payment? }) do
|
164
|
+
errors.add(:delayed_payment, 'no delayed payment processor available') unless EffectiveOrders.try(:delayed?)
|
165
|
+
end
|
166
|
+
|
167
|
+
validate(if: -> { delayed_payment_date && registration_end_at }) do
|
168
|
+
errors.add(:delayed_payment_date, 'must be after registration end date') unless registration_end_at < delayed_payment_date
|
169
|
+
end
|
170
|
+
|
154
171
|
validate(if: -> { file.attached? }) do
|
155
172
|
errors.add(:file, 'must be an image') unless file.image?
|
156
173
|
end
|
@@ -16,11 +16,6 @@
|
|
16
16
|
- datatable = Admin::EffectiveEventProductsDatatable.new(event_id: event.id)
|
17
17
|
= render_inline_datatable(datatable)
|
18
18
|
|
19
|
-
-# = tab 'Registrations' do
|
20
|
-
-# %h2 Registrations
|
21
|
-
-# - datatable = Admin::EffectiveEventRegistrationsDatatable.new(event_id: event.id)
|
22
|
-
-# .mb-4= render_inline_datatable(datatable)
|
23
|
-
|
24
19
|
= tab 'Registrants & Addons' do
|
25
20
|
%h2 Registrants
|
26
21
|
.mb-4
|
@@ -22,19 +22,36 @@
|
|
22
22
|
.col-md-6= f.datetime_field :start_at, label: "Event Start"
|
23
23
|
.col-md-6= f.datetime_field :end_at, label: "Event End"
|
24
24
|
|
25
|
-
%
|
26
|
-
%p The online registration and purchase for this event will be available between:
|
27
|
-
= f.datetime_field :registration_start_at, label: "Registration Start"
|
28
|
-
= f.datetime_field :registration_end_at, label: "Registration End"
|
29
|
-
= f.datetime_field :early_bird_end_at, label: "Early Bird End",
|
30
|
-
hint: 'Event tickets can be purchased for early bird pricing before this date. Afterwards regular pricing applies.'
|
25
|
+
%hr
|
31
26
|
|
32
|
-
|
27
|
+
.row
|
28
|
+
.col-md-6
|
29
|
+
%h2 Registration
|
30
|
+
%p The online registration and purchase for this event will be available between:
|
31
|
+
= f.datetime_field :registration_start_at, label: "Registration Start"
|
32
|
+
= f.datetime_field :registration_end_at, label: "Registration End"
|
33
|
+
= f.datetime_field :early_bird_end_at, label: "Early Bird End",
|
34
|
+
hint: 'Event tickets can be purchased for early bird pricing before this date. Afterwards regular pricing applies.'
|
35
|
+
|
36
|
+
= f.check_box :allow_blank_registrants, label: "Yes, allow blank ticket registrations", hint: "Allow event tickets to be purchased without adding a name. The purchaser may return to add names later."
|
37
|
+
|
38
|
+
= f.check_box :external_registration, label: "Yes, the registration for this event is handled by another website"
|
39
|
+
|
40
|
+
= f.show_if(:external_registration, true) do
|
41
|
+
= f.url_field :external_registration_url, hint: "The url for external event registration. Must start with http(s)://"
|
42
|
+
|
43
|
+
.col-md-6
|
44
|
+
- if EffectiveOrders.try(:delayed?)
|
45
|
+
%h2 Delayed Payments
|
46
|
+
%p The online payment for this event will be charged as follows:
|
47
|
+
|
48
|
+
= f.check_box :delayed_payment, label: "Yes, this is a delayed payment event", hint: "Allow registrations for this event without paying immediately.<br>A secure token representing their credit card will be saved and charged automatically on the following payment date."
|
33
49
|
|
34
|
-
|
50
|
+
= f.hide_if(:delayed_payment, true) do
|
51
|
+
= f.hidden_field :delayed_payment_date, value: ''
|
35
52
|
|
36
|
-
|
37
|
-
|
53
|
+
= f.show_if(:delayed_payment, true) do
|
54
|
+
= f.date_field :delayed_payment_date, label: "Delayed Payment Charge Date", hint: "The date that the credit card will be charged. Expects a date in the future, after the registration end date. Changing this date will not affect previously generated event registration delayed payment orders."
|
38
55
|
|
39
56
|
= f.submit do
|
40
57
|
= f.save 'Save'
|
@@ -2,9 +2,8 @@
|
|
2
2
|
= render 'effective/event_registrations/content', resource: resource
|
3
3
|
|
4
4
|
- if resource.submit_order.deferred?
|
5
|
-
|
6
|
-
.
|
7
|
-
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
5
|
+
= card do
|
6
|
+
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
8
7
|
- elsif resource.event.registerable? == false
|
9
8
|
.alert.alert-danger Your selected event is no longer available for registration.
|
10
9
|
- elsif resource.unavailable_event_tickets.present?
|
@@ -12,7 +11,6 @@
|
|
12
11
|
- elsif resource.unavailable_event_products.present?
|
13
12
|
.alert.alert-danger Your selected number of event add-ons are no longer available.
|
14
13
|
- else
|
15
|
-
|
16
|
-
.
|
17
|
-
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
14
|
+
= card do
|
15
|
+
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
18
16
|
|
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: 0.
|
4
|
+
version: 0.13.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: 2024-05-
|
11
|
+
date: 2024-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|