
  <%= form_with(model: [ :admin, user ], class: 'form-plain has--key-ctrls' ) do |form| %>

    <div class="form-section"> 
      <%= render partial: 'material/check_box_icon', locals: { f: form, attr: :enabled_at, label: t(:'activerecord.attributes.user.enabled_at')} %>
      <%= render partial: 'material/select_field', locals: { f: form, attr: :role, include_blank: false, choices: User.roles.map { |k,v| [t(k, scope: :'users.roles'), k] }.sort } %>                
    </div>

    <div class="form-section">
      <%= render partial: 'material/text_field', locals: { f: form, attr: :firstname } %>
      <%= render partial: 'material/text_field', locals: { f: form, attr: :lastname } %>
      <%= render partial: 'material/text_field', locals: { f: form, attr: :title } %>
      <%= render partial: 'material/text_field', locals: { f: form, attr: :email } %>
      <%= render partial: 'material/text_field', locals: { f: form, attr: :phone } %>    
    </div>

    <div class="form-section">
      <%= render partial: 'material/password_field', locals: { f: form, attr: :password } %>
      <%= render partial: 'material/password_field', locals: { f: form, attr: :password_confirmation } %>
    </div>

    <div class="form-ctrls">      
      <%= link_to t(:'ui.cancel'), url_for(controller: 'users', action: 'index'), data: {turbo_action: 'advance'} %>  
      <%= form.submit t(:'ui.save') %>      
    </div>

  <% end %>
