Skip to content

Instantly share code, notes, and snippets.

@cwsaylor
Created October 26, 2012 23:32
Show Gist options
  • Save cwsaylor/3962187 to your computer and use it in GitHub Desktop.
Save cwsaylor/3962187 to your computer and use it in GitHub Desktop.
= form_for @subscription, :html => { 'data-stripe-key' => "#{STRIPE_PUBLISHABLE_KEY}" } do |f|
= f.hidden_field :stripe_customer_token
= f.hidden_field :last4
= f.hidden_field :exp_month
= f.hidden_field :exp_year
= f.hidden_field :plan_id
.panel.userForm.active
.featurehead
h1 Payment Information
fieldset.reg.docmail
= error_messages_for :subscription, header_message: "There were errors during your subscription", message: nil, class: "registration_error_message"
// credit card
hr
h2 Credit Card
p
label
em.em
sup *
| Credit Card Number
= text_field_tag :card_number, nil, name: nil, class: "long", placeholder: @subscription.last4.blank? ? '' : "************#{@subscription.last4}"
p.multi
label
em.em
sup *
| Expiration Date
= select_month Date.new(@subscription.exp_year.to_i, @subscription.exp_month.to_i), {add_month_numbers: true}, {name: nil, id: "card_month"}
label
em.em
|  
= select_year Date.new(@subscription.exp_year.to_i, @subscription.exp_month.to_i), {start_year: Date.today.year, end_year: Date.today.year+15}, {name: nil, id: "card_year"}
.clear
p.multi
label
em.em
sup *
| Security Code
= text_field_tag :card_code, nil, name: nil, class: "short", placeholder: @subscription.last4.blank? ? '' : '***'
label
em.em
br
em Visa, MC, Discover: 3-digits
em American Express: 4-digits
.clear
p
label
em.em
| Promotional Code
= f.text_field :stripe_promo_code, :placeholder => "Optional", :class => "medium"
// name
h2 Billing Information
p.multi
label
em.em
sup *
| First Name
= f.text_field :firstname, :placeholder => "", :class => "mediumer", :size => "30"
label
em.em
sup *
| Last Name
= f.text_field :lastname, :placeholder => "", :class => "mediumer", :size => "30"
.clearfix
p
label
em.em
sup *
| Billing Email
= f.text_field :email, :placeholder => "Email", :class => "longer"
p
label
em.em
sup *
| Billing Address
= f.text_field :address_line1, :placeholder => "Street", :class => "longer"
label
= f.text_field :address_line2, :placeholder => "If Applicable", :class => "longer"
p.multi
label
em.em
sup *
| City
= f.text_field :city, :placeholder => "City", :class => "medium"
label
em.em
sup *
| State
= f.select :state, State.options_for_select, :class => "zip"
label
em.em
sup *
| Zip
= f.text_field :postal_code, :placeholder => "Zip", :class => "zip"
= f.hidden_field :country, :value => "US"
.clearfix
p
label
em.em
sup *
| Billing Phone
= f.text_field :phone_number, :placeholder => "", :class => "medium"
p
label.tic
= f.check_box :policy_agreement, :class => "left"
em.left
| By checking this box, you agree to the
a href="/privacy#pp8" target="_blank" Refund Policy.
br
| Your paid account will be renewed automatically. You can cancel anytime.
.clearfix
hr
p.buttonset
button.next#submit_recruiter_subscription.button Review Order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment