Fixed: confirmation_instructions

This commit is contained in:
Vokhmin Alexey V 2014-03-31 14:25:56 +04:00
parent 42a97c5c29
commit b1e98bd92f
7 changed files with 20 additions and 10 deletions

View File

@ -0,0 +1,3 @@
class Users::ConfirmationsController < Devise::ConfirmationsController
layout 'application'
end

View File

@ -1,5 +1,5 @@
.block
%h2= title t("devise.confirmations.resend_header")
%h2= title t("devise.confirmations.new.title")
.content
- if resource.errors.present?
.flash
@ -10,14 +10,12 @@
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: "form" }) do |f|
= f.hidden_field :reset_password_token
.group.wat-cf
.left
= f.label :email, class: "label"
.right
= f.text_field :email, class: "text_field"
= f.label :email, class: "label"
= f.text_field :email, class: "text_field"
.group.navform.wat-cf
%button.button{tyle: "submit"}
= image_tag("choose.png", alt: t("devise.confirmations.send"))
= t("devise.confirmations.send")
= image_tag("choose.png", alt: t("devise.confirmations.new.submit_html"))
= t("devise.confirmations.new.submit_html")
%span.text_button_padding
= render "devise/shared/links"

View File

@ -1,6 +1,6 @@
%p
Welcome #{@resource.email}!
%p You can confirm your account through the link below:
%p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token)
%p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
%br
%p== Support team «ROSA ABF»

View File

@ -1,6 +1,6 @@
%p
Здравствуйте, #{@resource.email}!
%p Вы можете подтвердить свой аккаунт, перейдя по ссылке снизу:
%p= link_to 'Подтвердить мой аккаунт', confirmation_url(@resource, confirmation_token: @resource.confirmation_token)
%p= link_to 'Подтвердить мой аккаунт', confirmation_url(@resource, confirmation_token: @token)
%br
%p== Команда поддержки «ROSA ABF»

View File

@ -38,6 +38,9 @@ en:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. You are now signed in.'
new:
title: "Resend confirmation instructions"
submit_html: "Resend the instructions&nbsp;&raquo;"
registrations:
signed_up: 'Welcome! You have signed up successfully.'
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'

View File

@ -41,6 +41,9 @@ ru:
send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.'
confirmed: "Ваша учётная запись подтверждена. Теперь вы вошли в систему."
error: "Неверный код подтверждения."
new:
title: "Отправить инструкцию по подтверждению учётной записи"
submit_html: "Отправить инструкцию&nbsp;&raquo;"
registrations:
signed_up: "Добро пожаловать! Вы успешно зарегистрировались."
signed_up_but_unconfirmed: 'Сообщение для подтверждения учетной записи было отправлено на Ваш email. Пожалуйста откройте ссылку из письма для активации.'

View File

@ -10,7 +10,10 @@ Rosa::Application.routes.draw do
post 'users' => 'users/registrations#create', as: :user_registration
end
devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' }, skip: [:registrations]
devise_for :users, controllers: {
omniauth_callbacks: 'users/omniauth_callbacks',
confirmations: 'users/confirmations'
}, skip: [:registrations]
namespace :api do
namespace :v1 do