new.html.erb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class='row'>
  2. <div class='col-md-6 col-md-offset-3'>
  3. <div class='well'>
  4. <h2>Log in</h2>
  5. <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal', role: 'form'}) do |f| %>
  6. <div class="form-group">
  7. <%= f.label :login, class: 'col-md-2 col-md-offset-2 control-label' %>
  8. <div class="col-md-6">
  9. <%= f.text_field :login, autofocus: true, class: 'form-control' %>
  10. </div>
  11. </div>
  12. <div class="form-group">
  13. <%= f.label :password, class: 'col-md-2 col-md-offset-2 control-label' %>
  14. <div class="col-md-6">
  15. <%= f.password_field :password, class: 'form-control' %>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <div class="col-md-offset-4 col-md-10">
  20. <% if devise_mapping.rememberable? -%>
  21. <div class="checkbox">
  22. <label>
  23. <%= f.check_box :remember_me %> <%= f.label :remember_me %>
  24. </label>
  25. </div>
  26. <% end -%>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <div class="col-md-offset-4 col-md-10">
  31. <%= f.submit "Log in", class: "btn btn-default" %>
  32. </div>
  33. </div>
  34. <% end %>
  35. <hr>
  36. <%= render "devise/shared/links" %>
  37. </div>
  38. </div>
  39. </div>