Skip to content

Commit

Permalink
Merge branch 'hotfix/0.2.21_fix'
Browse files Browse the repository at this point in the history
* hotfix/0.2.21_fix:
  fix auth
  • Loading branch information
kalashnikovisme committed Jul 2, 2015
2 parents 1b24049 + bb2c744 commit 8d05d65
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/web/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def create
sign_in @user
redirect_to account_path
else
@user = @user.becomes! User
render :new
end
else
Expand Down
9 changes: 8 additions & 1 deletion app/views/web/sessions/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
.container.mic-form-container
.row
.medium-6.small-12.columns.medium-push-3
= simple_form_for @user, url: { controller: 'web/sessions', action: :create } do |f|
- if @user.email.present?
%span.label.alert
%i.fa.fa-exclamation-circle
= t('.wrong_email_or_password')
%span.label.info
%i.fa.fa-info-circle
= t('.may_be_you_have_auth_via_social_network')
= simple_form_for @user, url: { controller: 'web/sessions', action: :create }, method: :post do |f|
= f.input :email, as: :string
= f.input :password, required: true
= f.button :submit, t('helpers.enter'), class: "mic-flat-button"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ru/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ ru:
new:
title: Авторизация
register: Зарегистрироваться
wrong_email_or_password: Неверный логин или пароль
may_be_you_have_auth_via_social_network: Возможно вы авторизовывались через социальные сети
pages:
shared:
not_found:
Expand Down

0 comments on commit 8d05d65

Please sign in to comment.