Created
January 19, 2015 21:19
-
-
Save MartinHeimbring/b775e151ce93f908ba8f to your computer and use it in GitHub Desktop.
Devise session form styled with bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %h2.text-center Sign in | |
| %br/ | |
| = form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: 'form-horizontal'}) do |f| | |
| .form-group | |
| = f.label :email, class: "col-sm-2 control-label" | |
| .col-sm-6 | |
| = f.email_field :email, autofocus: true , class: "form-control" | |
| .form-group | |
| = f.label :password, class: "col-sm-2 control-label" | |
| .col-sm-6 | |
| = f.password_field :password, autocomplete: "off", class: "form-control" | |
| - if devise_mapping.rememberable? | |
| .form-group | |
| .col-sm-6.col-sm-offset-2 | |
| = f.check_box :remember_me | |
| = f.label :remember_me | |
| .form-group | |
| .col-sm-6.col-sm-offset-2 | |
| = f.submit "Sign in", class: 'btn btn-primary' | |
| .form-group | |
| .col-sm-6.col-sm-offset-2 | |
| = render "devise/shared/links" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment