internetee/registry

View on GitHub
app/views/admin/billing/prices/_search_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_for :search, url: admin_prices_path, method: :get, html: { class: 'form-horizontal' } do |f| %>
    <div class="form-group">
        <%= f.label :status, class: 'col-sm-2 control-label' %>

        <div class="col-sm-2">
            <%= f.select :status, options_for_select(statuses, search.status), { include_blank: t('.all') },
                         class: 'form-control' %>
        </div>

        <%= f.label :results_per_page, class: 'col-sm-2 control-label' %>

        <div class="col-md-2">
            <%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) %>
        </div>

        <div class="col-sm-3">
            <%= f.submit t('.search_btn'), class: 'btn btn-primary', name: nil %>
            <%= link_to t('.reset_btn'), admin_prices_path,
                        class: 'btn btn-default price-search-form-search-btn' %>
        </div>
    </div>
<% end %>