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.
37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
|
-# licensed under the Affero General Public License version 3 or later. See
|
|
-# 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|
|
|
%fieldset
|
|
%legend
|
|
= t('devise.sessions.new.login')
|
|
|
|
.control-group
|
|
= f.label :username, t('username'), :class => "control-label"
|
|
.controls
|
|
= f.text_field :username
|
|
|
|
.control-group
|
|
= f.label :password , t('password'), :class => "control-label"
|
|
.controls
|
|
= f.password_field :password
|
|
|
|
= hidden_field(:user, :remember_me, :value => 1)
|
|
|
|
.controls
|
|
= f.submit t('devise.sessions.new.sign_in'), :class => 'btn primary'
|
|
|
|
%footer
|
|
- if display_registration_link?
|
|
= link_to t('devise.shared.links.sign_up'), new_registration_path(resource_name)
|
|
|
|
- if display_password_reset_link?
|
|
= link_to t('devise.passwords.new.forgot_password'), new_password_path(resource_name)
|
|
|
|
= link_to t('layouts.application.toggle'), toggle_mobile_path
|