7f8f7e624d
Rather than figure out how to upgrade the Stripe gem to be compatible with future Rails, I'd rather just delete the references, since it's currently unused. I'm not so bold as to go in and fully trash all our donation code; I just want to ensure we're not sending people down broken codepaths, and that if they reach them, the error messages are clear enough.
128 lines
5.6 KiB
Text
128 lines
5.6 KiB
Text
- title "Support Dress to Impress"
|
|
|
|
- if @current_campaign.progress > 0
|
|
= campaign_progress(@current_campaign) do
|
|
We've received #{cents_to_currency(@current_campaign.progress)}
|
|
toward #{@current_campaign.purpose}.
|
|
Thanks so much!
|
|
|
|
-# TODO: Reinstall Stripe before showing the checkout form
|
|
= form_tag donations_path, method: 'POST', id: 'donation-form',
|
|
'data-checkout-image' => image_path('default_preview.png'),
|
|
'data-checkout-publishable-key' => Rails.configuration.stripe[:publishable_key],
|
|
'data-campaign-theme' => @current_campaign.theme_id do
|
|
= hidden_field_tag 'donation[stripe_token]'
|
|
= hidden_field_tag 'donation[stripe_token_type]'
|
|
= hidden_field_tag 'donation[donor_email]'
|
|
= hidden_field_tag 'donation[amount]'
|
|
%header
|
|
%p#donation-form-title
|
|
Thanks for supporting Dress to Impress!
|
|
%p
|
|
From modeling to servers, Dress to Impress is a community effort.
|
|
This year, we need to raise
|
|
#{cents_to_currency(@current_campaign.goal, precision: 0)}
|
|
to cover our #{@current_campaign.name} hosting costs.
|
|
%p
|
|
As a thank-you gift, for every $5 you give, we'll feature one of your
|
|
outfits here and on the homepage. Show off your latest designs!
|
|
%p
|
|
All donations are securely powered by
|
|
#{link_to 'Stripe', 'https://stripe.com/'}, and go directly toward our
|
|
hosting costs. Thank you for your help!
|
|
#donation-fields
|
|
#amount-header Amount
|
|
#amount-choices
|
|
%li
|
|
%input#amount-5{type: 'radio', name: 'amount', value: '5.00'}
|
|
%label{for: 'amount-5'} $5
|
|
%li
|
|
%input#amount-10{type: 'radio', name: 'amount', value: '10.00'}
|
|
%label{for: 'amount-10'} $10
|
|
%li
|
|
%input#amount-30{type: 'radio', name: 'amount', value: '20.00', checked: true}
|
|
%label{for: 'amount-30'} $20
|
|
%li
|
|
%input#amount-50{type: 'radio', name: 'amount', value: '50.00'}
|
|
%label{for: 'amount-50'} $50
|
|
%li
|
|
%input#amount-custom{type: 'radio', name: 'amount', value: 'custom'}
|
|
%label{for: 'amount-custom'} Other
|
|
%label#amount-custom-fields{for: 'amount-custom-value'}
|
|
%input#amount-custom-value{type: 'text'}
|
|
#donation-controls
|
|
%button{type: 'submit'} Donate now!
|
|
|
|
- if @donations.present?
|
|
#outfits-header
|
|
%h2 Thanks to our lovely donors!
|
|
- if @all_campaigns.length > 1
|
|
%ul#all-campaigns-list
|
|
- @all_campaigns.each do |campaign|
|
|
%li
|
|
- if campaign == @campaign
|
|
%strong= campaign.name
|
|
- else
|
|
= link_to campaign.name, campaign
|
|
%ul#outfits
|
|
- @donations.each do |donation|
|
|
-# if large_donation?(donation.amount)
|
|
%li.banner
|
|
%span
|
|
Thanks, #{donation.donor_name}, for donating
|
|
#{number_to_currency(donation.amount / 100.0)}!
|
|
- donation.features.each do |feature|
|
|
- if outfit_image?(feature.outfit) || !large_donation?(donation.amount)
|
|
%li
|
|
- if outfit_image?(feature.outfit)
|
|
= link_to image_tag(feature.outfit.image.small.url), feature.outfit
|
|
- else
|
|
= image_tag 'default_preview.png'
|
|
|
|
%header Thanks, #{donation.donor_name.presence || 'Anonymous'}!
|
|
- else
|
|
- current_index = @all_campaigns.index(@campaign)
|
|
- prev_campaign = @all_campaigns[current_index + 1]
|
|
- if prev_campaign
|
|
%p#last-years-donors= link_to "Don't forget to check out last year's donors, too!", prev_campaign
|
|
|
|
#fine-print
|
|
%h2 Some notes on featured outfits
|
|
:markdown
|
|
**TL;DR: We love to help and acknowledge our good-faith donors,
|
|
but reserve the right not to do those things,
|
|
in order to better handle bad-faith donors and unexpected circumstances.**
|
|
#{image_tag 'emoticons/smiley.gif'}
|
|
|
|
When you make a donation, we'll divide the amount by $5 USD, and, rounding
|
|
down, that's how many of your outifts we'll feature. This is our way of
|
|
publicly thanking our donors, and we love doing it! However, it is not a
|
|
purchased service. Your outfit is not guaranteed to appear anywhere on the
|
|
site, for any amount of time. (That said, our donors' outfits generally
|
|
appear on the site very quickly, and we plan to continue to showcase them
|
|
for as long as the site stays up!)
|
|
|
|
We reserve the right to refuse to post any content for any reason, and we
|
|
reserve the right to remove any previously posted content at any time for
|
|
any reason. If we we're not comfortable with the outfit's name, the
|
|
outfit's appearance, or the name on your donation, or anything else, then
|
|
we might choose not to publish it.
|
|
(That said, we plan to allow any name and outfit that are appropriate for
|
|
Neopians of all ages.)
|
|
|
|
If you change your mind about donating, no worries: you can request a
|
|
refund at any time #{image_tag 'emoticons/smiley.gif'} If it's within 30
|
|
days of when you donated, then we promise to refund your donation as soon
|
|
as we can. If it's been longer, we're a bit more limited in what we can do,
|
|
but we'll try our best to help! Additionally, if we remove your outfit
|
|
because we didn't feel comfortable showcasing it, then we may choose not to
|
|
issue a refund, regardless of when you ask. (Sorry for the extra
|
|
complexity, but this exception helps us discourage bad behavior.)
|
|
|
|
We also accept donations via PayPal.
|
|
#{mail_to 'webmaster@openneo.net', "Please email us for more information."}
|
|
Thank you!!
|
|
|
|
- content_for :javascripts do
|
|
= javascript_include_tag 'https://checkout.stripe.com/checkout.js',
|
|
'static/donate.js'
|