<%= form_for(@charge, :url => { :action => :create }, :html => { :class => "form-horizontal" }) do |f| %> <%= f.hidden_field :account_id %>
<% if @invoice.present? %> <%= f.hidden_field :invoice_id %>
<% end %>
<%= f.label :amount, "Charge amount", :class => "control-label" %>
<%= f.text_field :amount, :id => 'charge_amount', :class => 'input-small' %>

<%= @account.currency %>

<%= label_tag :requested_date, 'Requested Date:', :class => "control-label" %>
<%= text_field_tag :requested_date, Time.now.utc.iso8601, :class => 'input-xlarge date-picker' %>
<%= label_tag :comment, "Comment", :class => "control-label" %>
<%= text_area_tag :comment, "", :rows => 3, :class => 'input-xlarge' %>
<%= f.label :description, "Description (Viewable on the invoice that the customer will see)", :class => "control-label" %>
<%= f.text_area :description, :rows => 3, :class => 'input-xlarge' %>
<%= button_tag "Create charge", :class =>"btn btn-primary" %> <%= link_to 'Back', :back, :class => 'btn' %>
<% end %> <%= javascript_tag do %> $(document).ready(function() { $("#charge_amount").keydown(function(event) { preventNonNumericValues(event); }); }); <% end %>