Commit 4e0d8fd4c0e9b606ed51dc55da52d07618b1c827

Authored by Cyril Mougel
2 parents c231035e c7a869e4
Exists in master and in 1 other branch production

Merge pull request #519 from nyaa/email_input

Sign in: email input type=email for mobile browsers keyboard
app/assets/stylesheets/errbit.css
@@ -304,7 +304,7 @@ form label.inline { display: inline; } @@ -304,7 +304,7 @@ form label.inline { display: inline; }
304 form .checkbox label { display: inline; } 304 form .checkbox label { display: inline; }
305 form .required label { padding-right: 20px; background: transparent url(images/icons/required.png) right 50% no-repeat; } 305 form .required label { padding-right: 20px; background: transparent url(images/icons/required.png) right 50% no-repeat; }
306 form .field_with_errors label { color: #900; } 306 form .field_with_errors label { color: #900; }
307 -form input[type=text], form input[type=password] { 307 +form input[type=text], form input[type=password], form input[type=email] {
308 width: 96%; padding: 0.8em; 308 width: 96%; padding: 0.8em;
309 font-size: 1em; 309 font-size: 1em;
310 color: #787878; border: 1px solid #C6C6C6; 310 color: #787878; border: 1px solid #C6C6C6;
@@ -316,7 +316,7 @@ form textarea { @@ -316,7 +316,7 @@ form textarea {
316 } 316 }
317 form textarea.short { height: 8em; } 317 form textarea.short { height: 8em; }
318 form textarea.supershort { height: 4em; } 318 form textarea.supershort { height: 4em; }
319 -form input[type=text]:focus, form input[type=password]:focus, form textarea:focus { 319 +form input[type=text]:focus, form input[type=password]:focus, form input[type=email]:focus, form textarea:focus {
320 box-shadow: 0px 0px 4px #69C; 320 box-shadow: 0px 0px 4px #69C;
321 -moz-box-shadow: 0px 0px 4px #69C; 321 -moz-box-shadow: 0px 0px 4px #69C;
322 -webkit-box-shadow: 0px 0px 4px #69C 322 -webkit-box-shadow: 0px 0px 4px #69C
app/views/devise/sessions/new.html.haml
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| 9 = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
10 .required 10 .required
11 = f.label auth_key 11 = f.label auth_key
12 - = f.text_field auth_key, :tabindex => 1 12 + = f.text_field auth_key, :type => (Errbit::Config.user_has_username ? 'text' : 'email'), :tabindex => 1
13 13
14 .required 14 .required
15 = link_to 'forget it?', new_password_path(resource_name), :class => 'float-right', :id => "forgot_password" 15 = link_to 'forget it?', new_password_path(resource_name), :class => 'float-right', :id => "forgot_password"