Sha256: 60202a6d0c8ba6c59f9ad1426fff5bb0748d28868ca0b5e55ce0306db23eec4e

Contents?: true

Size: 1.91 KB

Versions: 8

Compression:

Stored size: 1.91 KB

Contents

<%= form_for @charge, :url => {:action => :create}, :html => {:class => 'form-horizontal'} do |f| %>
    <%= f.hidden_field :invoice_id %>

    <% if @invoice.nil? %>
        <div class='form-group'>
          <div class="col-sm-offset-2 col-sm-10">
            <div class="checkbox">
              <%= label_tag :auto_commit do %>
                  <%= check_box_tag :auto_commit, '1', true %>Auto-commit?
              <% end %>
            </div>
          </div>
        </div>
    <% end %>
    <div class="form-group">
      <%= f.label :amount, 'Amount', :class => 'col-sm-2 control-label' %>
      <div class="col-sm-10">
        <%= f.number_field :amount, :id => 'charge_amount', :class => 'form-control' %>
        <% if @invoice.present? %>
            <p class="help-block">Currency: <%= @invoice.currency %></p>
        <% end %>
      </div>
    </div>
    <% unless @invoice.present? %>
        <div class="form-group">
          <%= f.label :currency, 'Currency', :class => 'col-sm-2 control-label' %>
          <div class="col-sm-10">
            <%= f.select :currency, currencies, {}, :class => 'form-control' %>
          </div>
        </div>
    <% else %>
        <!--https://github.com/killbill/killbill/issues/388-->
        <%= f.hidden_field :currency %>
    <% end %>
    <div class="form-group">
      <%= f.label :description, 'Description', :class => 'col-sm-2 control-label' %>
      <div class="col-sm-10">
        <%= f.text_area :description, :rows => 3, :class => 'form-control' %>
      </div>
    </div>
    <div class="form-group">
      <%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
      <div class="col-sm-10">
        <%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <%= submit_tag 'Save', :class => 'btn btn-default' %>
      </div>
    </div>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kaui-2.0.1 app/views/kaui/charges/_form.html.erb
kaui-2.0.0 app/views/kaui/charges/_form.html.erb
kaui-1.4.1 app/views/kaui/charges/_form.html.erb
kaui-1.4.0 app/views/kaui/charges/_form.html.erb
kaui-1.3.0 app/views/kaui/charges/_form.html.erb
kaui-1.2.0 app/views/kaui/charges/_form.html.erb
kaui-1.1.0 app/views/kaui/charges/_form.html.erb
kaui-1.0.0 app/views/kaui/charges/_form.html.erb