From f5fdb8ade18d8191a94ada6c850d1299d2b6f13a Mon Sep 17 00:00:00 2001 From: Steven Hancock Date: Tue, 27 Mar 2012 04:35:07 -0700 Subject: [PATCH] Add an error message to the mobile login page This adds an error message to the mobile version of the login page for failed logins, as requested in #3048 This (along with the standard login page) appears to use the Devise i18n for the error message, which may need to be updated to reflect the fact that we're not using email addresses for authentication. --- app/views/sessions/new.mobile.haml | 2 ++ public/stylesheets/sass/mobile.scss | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/app/views/sessions/new.mobile.haml b/app/views/sessions/new.mobile.haml index 59e588335..85598fd0c 100644 --- a/app/views/sessions/new.mobile.haml +++ b/app/views/sessions/new.mobile.haml @@ -3,6 +3,8 @@ -# the COPYRIGHT file. #main_stream.stream + - flash.each do |name, msg| + %p{:class => "login_#{name}"}= msg #login_form .login-container = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'form-horizontal'}) do |f| diff --git a/public/stylesheets/sass/mobile.scss b/public/stylesheets/sass/mobile.scss index 667bc12fc..addace4e8 100644 --- a/public/stylesheets/sass/mobile.scss +++ b/public/stylesheets/sass/mobile.scss @@ -105,6 +105,15 @@ body { top: 1px solid #ccc; }; } +.login_error, +.login_alert { + color: rgb(208, 49, 43); + text-shadow: 1px 1px 20px rgb(208, 49, 43); } + +.login_notice { + color: rgb(10, 150, 10); + text-shadow: 1px 1px 20px rgb(126, 240, 77); } + #login_form { padding: 0;