Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix kids ticket form #242

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.2.3
148 changes: 74 additions & 74 deletions app/views/ticket_requests/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
- adult_guests = @ticket_request.adults
- adult_guests.times do |guest_id|
- default_value = guest_id == 0 ? @ticket_request.user.name_and_email : ''
= f.label "Adult Guest #{guest_id + 1}"
= f.label "Guest #{guest_id + 1}"
= f.text_field :guest_list, readonly: list_finalized, multiple: true, value: Array(@ticket_request.guests[0...adult_guests])[guest_id] || default_value, style: 'width: 80%'

- if @ticket_request.kids.positive?
Expand Down Expand Up @@ -105,7 +105,7 @@

%br

- if @event.kid_ticket_price
- if @event.kid_ticket_price.present?
%table.w-100.m-0.p-0
%tbody.m-0.p-0
%tr.align-middle
Expand All @@ -121,78 +121,78 @@
%td.w-10.text-end
= tooltip_box help_text_for(:kids), title: "Kid Tickets"

- unless is_update
.card.bg-warning-subtle.mb-3{:style => "max-width: 100%;"}
.card-body.bg-success-subtle.text-dark.pt-1
%h5.card-title Please Note:
%p.card-text
Once you submit this ticket request, and it's approved, you'll receive an email stating so. You can also bookmark this URL and return to it at a later date.
In order to pay for the ticket(s) you are required to fill out the list of guests (if any) and kids (if any) you are bringing and/or inviting.

.col-lg-6.col-xl-6.col-md-12.col-sm-12
.control-group

- if @event.allow_financial_assistance
%table.w-100
%tbody
%tr
%td.text-start
= f.label :needs_assistance, class: 'checkbox' do
= f.check_box :needs_assistance
I’m requesting financial assistance with purchasing my ticket(s)
%td.text-end
= tooltip_box help_text_for(:needs_assistance), title: "Financial Assistance"


.control-group

- if @event.allow_donations
%table.w-100
%tbody
%tr
%td
= f.label :donation, 'Your Optional Donation:'
= f.number_field :donation, class: 'input-mini', min: 0, required: false
%td.text-end
= tooltip_box "Your option donation to The California Foundation for The Advancement of Electronic Arts, Non Profit 501(c)(3), is greatly appreciated and is tax deductible!"

.control-group

- if @event.require_mailing_address
%fieldset
= f.label :address_line1, class: 'required-label' do
Address1
= tooltip_box help_text_for(:address)
= f.text_field :address_line1, required: true, placeholder: 'Street address, P.O. box, etc.', maxlength: 200
= f.label :address_line2 do
Address2
= f.text_field :address_line2, placeholder: 'Apartment, suite, unit, building, floor, etc.', maxlength: 200
= f.label :city, 'City', class: 'required-label'
= f.text_field :city, required: true, maxlength: 50
= f.label :state, 'State/Province/Region', class: 'required-label'
= f.text_field :state, required: true, maxlength: 50
= f.label :zip_code, 'Zip/Postal Code', class: 'required-label'
= f.text_field :zip_code, required: true, maxlength: 32
= f.label :country_code, 'Country', class: 'required-label'
= f.country_select "country_code", iso_codes: true, default_value: 'US'

.control-group
= f.label :notes do
Who did you hear about this event from?
Any special requests or things you want to mention?
%br

= f.text_area :notes,
rows: 4, columns: 100, maxlength: 500, style: 'width: 100%'

- if signed_in? && @event.admin?(current_user) && is_update
.well
= f.label :admin_notes do
Additional Notes
%p.text-error
Visible by event admins only.
= f.text_area :admin_notes, rows: 5, columns: 800, maxlength: 512, style: 'width: 100%'
%br
- if @event.tickets_require_approval && !is_update
.card.bg-warning-subtle.mb-3{:style => "max-width: 100%;"}
.card-body.bg-success-subtle.text-dark.pt-1
%h5.card-title Please Note:
%p.card-text
Once you submit this ticket request, and it's approved, you'll receive an email stating so. You can also bookmark this URL and return to it at a later date.
In order to pay for the ticket(s) you are required to fill out the list of guests (if any) and kids (if any) you are bringing and/or inviting.

.col-lg-6.col-xl-6.col-md-12.col-sm-12
.control-group

- if @event.allow_financial_assistance
%table.w-100
%tbody
%tr
%td.text-start
= f.label :needs_assistance, class: 'checkbox' do
= f.check_box :needs_assistance
I’m requesting financial assistance with purchasing my ticket(s)
%td.text-end
= tooltip_box help_text_for(:needs_assistance), title: "Financial Assistance"


.control-group

- if @event.allow_donations
%table.w-100
%tbody
%tr
%td
= f.label :donation, 'Your Optional Donation:'
= f.number_field :donation, class: 'input-mini', min: 0, required: false
%td.text-end
= tooltip_box "Your option donation to The California Foundation for The Advancement of Electronic Arts, a 501(c)(3) nonprofit organization, is greatly appreciated and is tax deductible!"

.control-group

- if @event.require_mailing_address
%fieldset
= f.label :address_line1, class: 'required-label' do
Address1
= tooltip_box help_text_for(:address)
= f.text_field :address_line1, required: true, placeholder: 'Street address, P.O. box, etc.', maxlength: 200
= f.label :address_line2 do
Address2
= f.text_field :address_line2, placeholder: 'Apartment, suite, unit, building, floor, etc.', maxlength: 200
= f.label :city, 'City', class: 'required-label'
= f.text_field :city, required: true, maxlength: 50
= f.label :state, 'State/Province/Region', class: 'required-label'
= f.text_field :state, required: true, maxlength: 50
= f.label :zip_code, 'Zip/Postal Code', class: 'required-label'
= f.text_field :zip_code, required: true, maxlength: 32
= f.label :country_code, 'Country', class: 'required-label'
= f.country_select "country_code", iso_codes: true, default_value: 'US'

.control-group
= f.label :notes do
Who did you hear about this event from?
Any special requests or things you want to mention?
%br

= f.text_area :notes,
rows: 4, columns: 100, maxlength: 500, style: 'width: 100%'

- if signed_in? && @event.admin?(current_user) && is_update
.well
= f.label :admin_notes do
Additional Notes
%p.text-error
Visible by event admins only.
= f.text_area :admin_notes, rows: 5, columns: 800, maxlength: 512, style: 'width: 100%'
%br
- unless is_update
%p
Every year, every attendee, no matter how long they've been coming, must
Expand Down