Commit f462a77700a65245d7da0875777b20289e8e69a9
1 parent
f1b5c184
Exists in
master
and in
1 other branch
Made Devise authentication more configurable.
Showing
1 changed file
with
8 additions
and
5 deletions
Show diff stats
app/views/devise/sessions/new.html.haml
| 1 | - content_for :title, 'Sign in' | 1 | - content_for :title, 'Sign in' |
| 2 | 2 | ||
| 3 | = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| | 3 | = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| |
| 4 | + - auth_key = Devise.authentication_keys.first | ||
| 4 | .required | 5 | .required |
| 5 | - = f.label :email | ||
| 6 | - = f.text_field :email, :tabindex => 1 | 6 | + = f.label auth_key |
| 7 | + = f.text_field auth_key, :tabindex => 1 | ||
| 8 | + | ||
| 7 | .required | 9 | .required |
| 8 | = link_to 'forget it?', new_password_path(resource_name), :class => 'float-right' | 10 | = link_to 'forget it?', new_password_path(resource_name), :class => 'float-right' |
| 9 | = f.label :password | 11 | = f.label :password |
| 10 | = f.password_field :password, :tabindex => 2 | 12 | = f.password_field :password, :tabindex => 2 |
| 11 | - | 13 | + |
| 12 | - if devise_mapping.rememberable? | 14 | - if devise_mapping.rememberable? |
| 13 | %div.checkbox | 15 | %div.checkbox |
| 14 | = f.check_box :remember_me, :tabindex => 3 | 16 | = f.check_box :remember_me, :tabindex => 3 |
| 15 | = f.label :remember_me | 17 | = f.label :remember_me |
| 16 | - | 18 | + |
| 17 | %div.buttons | 19 | %div.buttons |
| 18 | - %button{:type => 'submit', :class => 'sign_in'}= "Sign in" | ||
| 19 | \ No newline at end of file | 20 | \ No newline at end of file |
| 21 | + %button{:type => 'submit', :class => 'sign_in'}= "Sign in" | ||
| 22 | + |