new.html.erb 1.4 KB

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