<%= apphelp_heading() %>

<% form_for :payment_card, @item, :url => { :action => :create } do | f | %> <%= f.error_messages %>

'(*)' <%= apphelp_generic( :requirement_hint ) %>

<%= f.label :card_name %> (*)
<%= f.text_field :card_name, :size => 30, :maxlength => User::MAXLEN_NAME %>
<%= f.label :card_number %> (*)
<%= f.text_field :card_number, :autocomplete => 'off', :size => 30, :maxlength => PaymentCard::MAXLEN_CARD_NUMBER %> <% if ( ActiveMerchant::Billing::CreditCard.requires_verification_value? ) -%>
<%= f.label :card_cvv %> <%= help_link( :card_cvv ) %> (*)
<%= f.text_field :card_cvv, :autocomplete => 'off', :size => 4, :maxlength => PaymentCard::MAXLEN_CARD_CVV %> <% end -%>
<%= f.label :card_type %> (*)
<%= purchasecardshelp_type_menu( f, :card_type ) %>
<%= f.label :card_to %> (*)
<%= f.date_select( :card_to, :add_month_numbers => true, :start_year => Time.now.year, :end_year => Time.now.year + 15, :discard_day => true, :order => [ :month, :year ], :include_blank => true ) %>
<%= f.label :card_from %>
<%= f.date_select( :card_from, :add_month_numbers => true, :start_year => Time.now.year - 15, :end_year => Time.now.year, :discard_day => true, :order => [ :month, :year ], :include_blank => true ) %>
<%= f.label :card_issue %>
<%= f.text_field :card_issue, :size => 30, :maxlength => PaymentCard::MAXLEN_CARD_ISSUE %>

 

<%= f.label :address_1 %> (*)
<%= f.text_field :address_1, :size => 30, :maxlength => PaymentCard::MAXLEN_ADDRESS_1 %>
<%= f.label :address_2 %>
<%= f.text_field :address_2, :size => 30, :maxlength => PaymentCard::MAXLEN_ADDRESS_2 %>
<%= f.label :address_3 %>
<%= f.text_field :address_3, :size => 30, :maxlength => PaymentCard::MAXLEN_ADDRESS_3 %>
<%= f.label :city %> (*)
<%= f.text_field :city, :size => 30, :maxlength => PaymentCard::MAXLEN_CITY %>
<%= f.label :state %>
<%= f.text_field :state, :size => 30, :maxlength => PaymentCard::MAXLEN_STATE %>
<%= f.label :country %> (*)
<%= f.text_field :country, :size => 30, :maxlength => PaymentCard::MAXLEN_COUNTRY %>
<%= f.label :postcode %>
<%= f.text_field :postcode, :size => 30, :maxlength => PaymentCard::MAXLEN_POSTCODE %>

<%= apphelp_submit( f, apphelp_view_hint( :review_order ), ' ' ) %> <%= apphelp_protected_button_to( :delete, { :method => :delete_poll_payment_gateway_onsite_path, :controller => PaymentGatewayOnsiteController, :model => PaymentGateway, :icon => :cancel, :variant => :negative }, { :poll_id => params[ :poll_id ] } # NOT just 'params' or URL generation fails ) -%>
<% end %>