<%= simple_form_for(@user, :html=>{:id=>"frm_create_user",:class=> "form-horizontal form-label-left"}, :url=>@url) do |f| %>

Create User <%= f.submit :Save , class: 'btn btn-success btn-sm pull-right btndashboard'%>

<% if @user.customer_id == 0 %>
<%= f.input :customer_id, :collection => Customer.all.map{|c| [c.name,c.id]}, label:false, input_html: { class:'form-control'},include_blank: 'Select Customer' %>
<%= f.input :email, autofocus: true, autocomplete: "email",label:false,input_html: { class:'form-control' } %>
<% else %> <%= f.hidden_field :user_id %> <% end %>
<%= f.input :name, autofocus: true, autocomplete: "name" ,label:false,input_html: { class:'form-control' }%>
<%= f.input :role,collection: @roles.map{|r,n| [n,r]}, autofocus: true, autocomplete: "email",label:false,input_html: { class:'form-control' },include_blank: 'Select Role' %>
<% if @minimum_password_length %> (<%= @minimum_password_length %> characters minimum) <% end %> <%= f.input :password, autocomplete: "off",label:false,input_html: { class:'form-control' } %>
<%= f.input :password_confirmation, autocomplete: "off",label:false,input_html: { class:'form-control' } %>
<% end %>