vicvega/chaltron

View on GitHub
app/views/chaltron/ldap/multi_new.html.erb

Summary

Maintainability
Test Coverage
<div class='container-fluid'>
  <h3 class='pt-4'><%= t('.title') %></h3>

    <%= content_tag :p, t('.par') %>

    <%= bootstrap_form_for(User.new, url: ldap_multi_create_path, method: :post,
      layout: :horizontal, html: {id: 'ldap_create'}) do |f| %>

      <div class='form-group row'>
        <div class='col-sm-2'></div>
        <div class='col-sm-10'>
          <%= content_tag 'table', id: 'ldap_create', class: 'table table-striped table-sm' do %>
            <thead>
              <tr>
                <th class='checkbox'>
                  <%= custom_checkbox(id: 'entry-check-all', class: 'entry') %>
                </th>
                <th class='username'>
                  <%= User.human_attribute_name(:username) %>
                </th>
                <th class='fullname'>
                  <%= User.human_attribute_name(:fullname) %>
                </th>
                <th class='email'>
                  <%= User.human_attribute_name(:email) %>
                </th>
                <th class='department'>
                  <%= User.human_attribute_name(:department) %>
                </th>
              </tr>
            </thead>
            <tbody>
              <%= render partial: 'entry', collection: @entries %>
            </tbody>
          <% end %>
        </div>
      </div>

      <%= f.role_select %>

      <div class='form-group row'>
        <div class='col-sm-2'></div>
        <div class='col-sm-10'>
          <%= f.submit t('.submit_text'), id: 'ldap_create_button',
                                          class: 'btn btn-primary',
                                          disabled: true %>
          <%= back_link class: 'btn btn-secondary float-right',
            text: t('chaltron.common.cancel'), icon: 'times' %>
        </div>
      </div>

    <% end %>
</div>