Adds phone_number to the regular user registration / account views
This commit is contained in:
@@ -21,7 +21,7 @@ class AccountController < ApplicationController
|
||||
end
|
||||
|
||||
def account_params
|
||||
params.require(:account).permit(:first_name, :last_name, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
|
||||
params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
||||
private
|
||||
|
||||
def sign_up_params
|
||||
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :use_nickname, :nickname)
|
||||
params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :last_name, t("account.show.phone_number_label") %>
|
||||
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :email_on_debate_comment do %>
|
||||
<%= f.check_box :email_on_debate_comment %>
|
||||
|
||||
@@ -42,6 +42,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :phone_number, t("devise_views.users.registrations.new.phone_number_label") %>
|
||||
<%= f.text_field :phone_number, placeholder: t("devise_views.users.registrations.new.phone_number_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :password, t("devise_views.users.registrations.new.password_label"), class: "inline-block" %>
|
||||
|
||||
@@ -56,6 +56,7 @@ en:
|
||||
nickname_label: "Nickname"
|
||||
use_nickname_label: "Use nickname"
|
||||
email_label: "Email"
|
||||
phone_number_label: "Phone number"
|
||||
password_label: "Password"
|
||||
min_length: "(%{min} characters minimum)"
|
||||
password_confirmation_label: "Confirm password"
|
||||
|
||||
@@ -56,6 +56,7 @@ es:
|
||||
nickname_label: "Pseudónimo"
|
||||
use_nickname_label: "Usar pseudónimo"
|
||||
email_label: "Email"
|
||||
phone_number_label: "Teléfono"
|
||||
password_label: "Contraseña"
|
||||
min_length: "(mínimo %{min} caracteres)"
|
||||
password_confirmation_label: "Confirmar contraseña"
|
||||
|
||||
@@ -70,6 +70,7 @@ en:
|
||||
change_credentials_link: "Change my credentials"
|
||||
first_name_label: "First Name"
|
||||
last_name_label: "Last Name"
|
||||
phone_number_label: "Phone number"
|
||||
use_nickname_label: "Use nickname"
|
||||
nickname_label: "Nickname"
|
||||
recaptcha:
|
||||
|
||||
@@ -70,6 +70,7 @@ es:
|
||||
email_on_comment_reply_label: "Recibir un email cuando alguien contesta a mis comentarios"
|
||||
first_name_label: "Nombre"
|
||||
last_name_label: "Apellidos"
|
||||
phone_number_label: "Teléfono"
|
||||
use_nickname_label: "Usar pseudónimo"
|
||||
nickname_label: "Pseudónimo"
|
||||
recaptcha:
|
||||
|
||||
Reference in New Issue
Block a user