Skip to content

Commit

Permalink
Fixes issue where the donation pitch isn't saving. Adds non-refundabl…
Browse files Browse the repository at this point in the history
…e verbiage to the checkout screen.
  • Loading branch information
toomuchpete committed Apr 1, 2024
1 parent 0b1ef42 commit 2b07636
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/leagues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def league_params
:description, {commissioner_ids: []}, :male_limit, :female_limit,
:max_grank_age, :allow_pairs, :covid_vax_required, :track_spirit_scores, :display_spirit_scores, :self_rank_type, :eos_tourney, :mst_tourney, :eos_champion_id, :mst_champion_id,
{core_options: [:type, :male_limit, :female_limit, :rank_limit, :male_rank_constant, :female_rank_constant]},
:solicit_donations, :donation_earmark
:solicit_donations, :donation_earmark, :donation_pitch
]

if permitted_to? :assign_comps, self
Expand Down
2 changes: 1 addition & 1 deletion app/views/registrations/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
= f.check_box :waiver_accepted, value: 1, label: raw('I have read, understand, and accept the <br /> AFDC\'s <a href="http://blog.afdc.com/wp-content/uploads/2012/05/2012-AFDC-Waiver-Minors.pdf">liability waiver</a> and <a href="http://www.afdc.com/refund-policy/">refund policy</a>.')
- if @registration.errors[:waiver_accepted].any?
= f.alert_message @registration.errors[:waiver_accepted].first
- if @registration.new_record?
- if @registration.status == 'registering' || @registration.status == 'registering_waitlisted'
= f.submit "Register", disable_with: 'Registering...', class: "btn btn-primary"
- else
= f.submit "Update", disable_with: 'Updating...', class: "btn btn-primary"
5 changes: 4 additions & 1 deletion app/views/registrations/pay.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
</div>
<% if donation %>
<div class="row" style="margin-bottom: 20px;">
<div class="span4"><b>Tax-deductible Donation</b></div>
<div class="span4">
<b>Tax-deductible Donation</b>
<small>NON-REFUNDABLE</small>
</div>
<div class="span2 text-right"><%= number_to_currency donation.amount %></div>
</div>
<%= hidden_field_tag 'donation_amount', donation.amount %>
Expand Down

0 comments on commit 2b07636

Please sign in to comment.