fixes failing i18n specs
Eliminates registering_with_oauth attr_accessor ELIMINATE Conflicts: app/views/users/registrations/finish_signup.html.erb improves devise confirmation message improves devise omniauth confirmation message improves devise omniauth confirmation message do not use nils on finish_signup fields Fixes auth specs after changing the i18n
This commit is contained in:
@@ -39,7 +39,6 @@ class User < ActiveRecord::Base
|
||||
accepts_nested_attributes_for :organization, update_only: true
|
||||
|
||||
attr_accessor :skip_password_validation
|
||||
attr_accessor :registering_with_oauth
|
||||
|
||||
scope :administrators, -> { joins(:administrators) }
|
||||
scope :moderators, -> { joins(:moderator) }
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
<div class="auth row">
|
||||
<div class="small-12 medium-8 large-5 column small-centered">
|
||||
<div class="panel">
|
||||
<h1><%= t('omniauth.finish_signup.title') %></h1>
|
||||
<h2><%= t('omniauth.finish_signup.title') %></h2>
|
||||
|
||||
<%= form_for current_user, as: :user, url: do_finish_signup_path, html: { role: 'form'} do |f| %>
|
||||
<%= form_for current_user, as: :user, url: do_finish_signup_path, html: { role: 'form'} do |f| %>
|
||||
<%= render 'shared/errors', resource: current_user %>
|
||||
|
||||
<% if current_user.errors.include? :username %>
|
||||
<%= f.text_field :username, placeholder: t("devise_views.users.registrations.new.username_label"), value: nil %>
|
||||
<%= f.text_field :username, placeholder: t("devise_views.users.registrations.new.username_label") %>
|
||||
<% else %>
|
||||
<%= f.hidden_field :username %>
|
||||
<% end %>
|
||||
|
||||
<% if current_user.errors.include? :email %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label"), value: nil %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>
|
||||
<% else %>
|
||||
<%= f.hidden_field :email %>
|
||||
<% end %>
|
||||
|
||||
<%= f.submit t("devise_views.users.registrations.new.submit"), class: 'button radius expand' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -15,7 +15,7 @@ en:
|
||||
not_found_in_database: "Invalid %{authentication_keys} or password."
|
||||
timeout: "Your session has expired. Please sign in again to continue."
|
||||
unauthenticated: "You must sign in or register to continue."
|
||||
unconfirmed: "You must confirm your account to continue."
|
||||
unconfirmed: "To continue, please click on the confirmation link that we have sent you via email"
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Confirmation instructions"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
es:
|
||||
devise:
|
||||
confirmations:
|
||||
confirmed: "Tu cuenta ha sido confirmada."
|
||||
confirmed: "Tu cuenta ha sido confirmada. Por favor autentifícate con tu red social o tu usuario y contraseña"
|
||||
send_instructions: "Recibirás un correo electrónico en unos minutos con instrucciones sobre cómo restablecer tu contraseña."
|
||||
send_paranoid_instructions: "Si tu correo electrónico existe en nuestra base de datos recibirás un correo electrónico en unos minutos con instrucciones sobre cómo restablecer tu contraseña."
|
||||
failure:
|
||||
@@ -13,7 +13,7 @@ es:
|
||||
not_found_in_database: "%{authentication_keys} o contraseña inválidos."
|
||||
timeout: "Tu sesión ha expirado, por favor inicia sesión nuevamente para continuar."
|
||||
unauthenticated: "Necesitas iniciar sesión o registrarte para continuar."
|
||||
unconfirmed: "Debes confirmar tu cuenta para continuar."
|
||||
unconfirmed: "Para continuar, por favor pulsa en el enlace de confirmación que hemos enviado a tu cuenta de correo."
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Instrucciones de confirmación"
|
||||
@@ -22,8 +22,8 @@ es:
|
||||
unlock_instructions:
|
||||
subject: "Instrucciones de desbloqueo"
|
||||
omniauth_callbacks:
|
||||
failure: "No se te ha podido autorizar de %{kind} debido a \"%{reason}\"."
|
||||
success: "Identificado correctamente de %{kind}."
|
||||
failure: "No se te ha podido identificar via %{kind} por el siguiente motivo: \"%{reason}\"."
|
||||
success: "Identificado correctamente via %{kind}."
|
||||
passwords:
|
||||
no_token: "No puedes acceder a esta página si no es a través de un enlace para restablecer la contraseña. Si has accedido desde el enlace para restablecer la contraseña, asegúrate de que la URL esté completa."
|
||||
send_instructions: "Recibirás un correo electrónico con instrucciones sobre cómo restablecer tu contraseña en unos minutos."
|
||||
|
||||
@@ -477,13 +477,12 @@ en:
|
||||
facebook:
|
||||
sign_in: "Sign in with Facebook"
|
||||
sign_up: "Sign up with Facebook"
|
||||
#google_oauth2:
|
||||
# sign_in: "Sign in with Google"
|
||||
# sign_up: "Sign up with Google"
|
||||
google_oauth2:
|
||||
sign_in: "Sign in with Google"
|
||||
sign_up: "Sign up with Google"
|
||||
legislation:
|
||||
help:
|
||||
title: "How I can comment this document?"
|
||||
text_logged: "Select the text you want to comment and press the button with the pencil."
|
||||
text: "To comment this document you must %{sign_in} or %{sign_up}. Then select the text you want to comment and press the button with the pencil."
|
||||
text_sign_in: "login"
|
||||
text_sign_up: "sign up"
|
||||
|
||||
@@ -477,13 +477,12 @@ es:
|
||||
facebook:
|
||||
sign_in: "Entra con Facebook"
|
||||
sign_up: "Regístrate con Facebook"
|
||||
#google_oauth2:
|
||||
# sign_in: "Entra con Google"
|
||||
# sign_up: "Regístrate con Google"
|
||||
google_oauth2:
|
||||
sign_in: "Entra con Google"
|
||||
sign_up: "Regístrate con Google"
|
||||
legislation:
|
||||
help:
|
||||
title: "¿Cómo puedo comentar este documento?"
|
||||
text_logged: "Selecciona el texto que quieres comentar y pulsa en el botón con el lápiz."
|
||||
text: "Para comentar este documento debes %{sign_in} o %{sign_up}. Después selecciona el texto que quieres comentar y pulsa en el botón con el lápiz."
|
||||
text_sign_in: "iniciar sesión"
|
||||
text_sign_up: "registrarte"
|
||||
|
||||
@@ -101,6 +101,8 @@ feature 'Users' do
|
||||
fill_in 'user_email', with: 'manueladelascarmenas@example.com'
|
||||
click_button 'Register'
|
||||
|
||||
expect(page).to have_content "To continue, please click on the confirmation link that we have sent you via email"
|
||||
|
||||
confirm_email
|
||||
|
||||
expect(page).to have_content "Your email address has been successfully confirmed"
|
||||
@@ -173,7 +175,7 @@ feature 'Users' do
|
||||
fill_in 'user_email', with: 'somethingelse@example.com'
|
||||
click_button 'Register'
|
||||
|
||||
expect(page).to have_content "You must confirm your account to continue"
|
||||
expect(page).to have_content "To continue, please click on the confirmation link that we have sent you via email"
|
||||
|
||||
confirm_email
|
||||
expect(page).to have_content "Your account has been confirmed"
|
||||
|
||||
Reference in New Issue
Block a user