Skip to content

Instantly share code, notes, and snippets.

@cmhobbs
Created October 26, 2012 03:33
Show Gist options
  • Save cmhobbs/3956716 to your computer and use it in GitHub Desktop.
Save cmhobbs/3956716 to your computer and use it in GitHub Desktop.
%hr
%fieldset
.control-group
= label_tag :invite_code, nil, :class => "control-label"
.controls
= text_field_tag :invite_code
.control-group
.controls
= f.hidden_field :stripe_token
= f.hidden_field :last_4_digits
- if @user.last_4_digits
.control-group
= label_tag :card, nil, :class => "control-label"
.controls
Using card ending with #{@user.last_4_digits}
= link_to "(change)", "#"
%hr
%fieldset
%noscript
%p
This form requires Javascript to use
.control-group#credit-card{ :style => @user.last_4_digits ? "display:none" : "display:block" }
#credit-card-errors{:style => "display:none"}
#stripe-error-message.alert-message.block-message.error
.control-group
= label_tag :credit_card_number, nil, :class => "control-label"
.controls= text_field_tag :credit_card_number, params[:credit_card_number], :class => "field", :disabled => true
.control-group
= label_tag :cvv, "Security code (CVV)", :class => "control-label"
.controls= text_field_tag :cvv, params[:cvv], :class => "small", :disabled => true
.control-group
= label_tag :expiry_date, nil, :class => "control-label"
.controls= date_select "", :expiry_date, {:discard_day => true, :order => [:month, :year], :use_month_numbers => true, :start_year => Date.today.year, :end_year => Date.today.year + 25, :disabled => true}, {:class => "input-small"}
/empty
%p
Subscriptions will be billed $12 annually.
%fieldset.form-submit
= submit_tag 'Sign up', :class => 'btn btn-large btn-primary'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment