<%= form_for(@chargeback, :url => { :action => :create }, :html => { :class => "form-horizontal" }) do |f| %> <%= hidden_field_tag :account_id, @account_id %> <%= hidden_field_tag :invoice_id, @invoice_id %> <%= f.hidden_field :payment_id %>
<%= f.label :chargeback_amount, "Chargeback amount", :class => "control-label" %>
<%= f.text_field :chargeback_amount, :id => 'chargeback_amount', :class => 'input-small' %>

<%= @account.currency %>

<%= label_tag :reason, "Reason", :class => "control-label" %>
<%= select_tag :reason, options_for_select(Kaui::Chargeback::SAMPLE_REASON_CODES) %>
<%= label_tag :cancel_all_subs, "Cancel account subscriptions?", :class => "control-label" %>
<%= label_tag :comment, "Comment", :class => "control-label" %>
<%= text_area_tag :comment, "", :rows => 3, :class => 'input-xlarge' %>
<%= button_tag "Apply chargeback", :class =>"btn btn-primary" %> <%= link_to 'Back', :back, :class => 'btn' %>
<% end %> <%= javascript_tag do %> $(document).ready(function() { $("#chargeback_amount").keydown(function(event) { preventNonNumericValues(event); }); }); <% end %>