adds a new "organization sigup success" view. Related with #226
This commit is contained in:
@@ -5,6 +5,9 @@ class Organizations::RegistrationsController < Devise::RegistrationsController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def success
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
build_resource(sign_up_params)
|
build_resource(sign_up_params)
|
||||||
if resource.valid_with_captcha?
|
if resource.valid_with_captcha?
|
||||||
@@ -17,6 +20,11 @@ class Organizations::RegistrationsController < Devise::RegistrationsController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
def after_inactive_sign_up_path_for(resource)
|
||||||
|
organizations_sign_up_success_path
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def sign_up_params
|
def sign_up_params
|
||||||
|
|||||||
8
app/views/organizations/registrations/success.html.erb
Normal file
8
app/views/organizations/registrations/success.html.erb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<h1><%= t('devise_views.organizations.registrations.success.title') %></h1>
|
||||||
|
|
||||||
|
<p><%= t('devise_views.organizations.registrations.success.thank_you') %></p>
|
||||||
|
|
||||||
|
<p><%= t('devise_views.organizations.registrations.success.instructions') %></p>
|
||||||
|
|
||||||
|
<p><%= link_to t('devise_views.organizations.registrations.success.back_to_index'), root_path %></p>
|
||||||
|
|
||||||
@@ -66,6 +66,15 @@ en:
|
|||||||
phone_number_label: "Phone number"
|
phone_number_label: "Phone number"
|
||||||
password_confirmation_label: "Confirm password"
|
password_confirmation_label: "Confirm password"
|
||||||
submit: "Sign up"
|
submit: "Sign up"
|
||||||
|
success:
|
||||||
|
title: "Registration of organization / collective pending verification"
|
||||||
|
thank_you: "Thank you for registering your organization or collective in the website."
|
||||||
|
instructions:
|
||||||
|
We will contact you soon in order to verify that you represent your collective.
|
||||||
|
Meanwhile, please review your email. We have sent you a confirmation link which you
|
||||||
|
will have to click in order to activate your account. You will then be able to participate
|
||||||
|
as a non-verified organization.
|
||||||
|
back_to_index: "Ok, go back to index"
|
||||||
sessions:
|
sessions:
|
||||||
new:
|
new:
|
||||||
title: "Log in"
|
title: "Log in"
|
||||||
|
|||||||
@@ -66,6 +66,14 @@ es:
|
|||||||
phone_number_label: "Teléfono"
|
phone_number_label: "Teléfono"
|
||||||
password_confirmation_label: "Confirmar contraseña"
|
password_confirmation_label: "Confirmar contraseña"
|
||||||
submit: "Registrarse"
|
submit: "Registrarse"
|
||||||
|
success:
|
||||||
|
title: "Registro de organización / colectivo pendiente de verificación"
|
||||||
|
thank_you: "Gracias por registrar tu colectivo en la web."
|
||||||
|
instructions:
|
||||||
|
En breve nos pondremos en contacto contigo para verificar que realmente representas a un colectivo.
|
||||||
|
Entretanto, por favor revisa tu correo electrónico. Te hemos enviado un enlace que debes pulsar para confirmar
|
||||||
|
tu correo. Una vez confirmado, podrás empezar a participar como colectivo no verificado.
|
||||||
|
back_to_index: "Entendido, volver a la página principal"
|
||||||
sessions:
|
sessions:
|
||||||
new:
|
new:
|
||||||
title: "Entrar"
|
title: "Entrar"
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
devise_for :users, controllers: { registrations: 'users/registrations' }
|
devise_for :users, controllers: { registrations: 'users/registrations' }
|
||||||
devise_for :organizations, class_name: 'User',
|
devise_for(:organizations, class_name: 'User',
|
||||||
controllers: {
|
controllers: {
|
||||||
registrations: 'organizations/registrations',
|
registrations: 'organizations/registrations',
|
||||||
sessions: 'devise/sessions'
|
sessions: 'devise/sessions'
|
||||||
}
|
})
|
||||||
|
|
||||||
|
devise_scope :organization do
|
||||||
|
get "organizations/sign_up/success", to: "organizations/registrations#success"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# The priority is based upon order of creation: first created -> highest priority.
|
# The priority is based upon order of creation: first created -> highest priority.
|
||||||
# See how all your routes lay out with "rake routes".
|
# See how all your routes lay out with "rake routes".
|
||||||
|
|||||||
Reference in New Issue
Block a user