From 8738eb23693b2cf4fdc2e5e77378478ba05eee24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Leutg=C3=B6b?= Date: Tue, 11 Dec 2012 11:25:55 +0100 Subject: [PATCH] Change html input type to "email" on sign-in view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As long as the username is the user's email address it makes sense to use input="email" helper for the email field. This allows HTML5 capable (mobile) devices to bring up an email input keyboard instead of the default one. --- app/views/devise/sessions/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 38192d71..54d088ca 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -3,7 +3,7 @@ - else = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login-box" }) do |f| = image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" - = f.text_field :email, :class => "text top", :placeholder => "Email" + = f.email_field :email, :class => "text top", :placeholder => "Email" = f.password_field :password, :class => "text bottom", :placeholder => "Password" - if devise_mapping.rememberable? .clearfix.inputs-list