internetee/registry

View on GitHub
app/views/admin/accounts/_search_form.html.erb

Summary

Maintainability
Test Coverage
<div class="row">
    <div class="col-md-12">
        <%= search_form_for @q, url: [:admin, :accounts], html: { style: 'margin-bottom: 0;' } do |f| %>
            <div class="row">
                <div class="col-md-3">
                    <div class="form-group">
                        <%= f.label t(:registrar_name) %>
                        <%= f.select :registrar_id_in, Registrar.all.map { |x| [x, x.id] }, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true %>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <%= label_tag t(:results_per_page) %>
                        <%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) %>
                    </div>
                </div>

                <div class="col-md-6 text-right" style="padding-top: 25px;">
                    <button class="btn btn-default search">
                        &nbsp;
                        <span class="glyphicon glyphicon-search"></span>
                        &nbsp;
                    </button>
                    <%= button_tag t('.download_csv_btn'),
                                   formaction: admin_accounts_path(format: 'csv'),
                                   class: 'btn btn-default' %>
                    <%= link_to(t('.reset_btn'), admin_accounts_path, class: 'btn btn-default') %>
                </div>
            </div>
        <% end %>
    </div>
</div>