adds responsible_name to org's account page
This commit is contained in:
@@ -23,7 +23,7 @@ class AccountController < ApplicationController
|
|||||||
|
|
||||||
def account_params
|
def account_params
|
||||||
if @account.organization?
|
if @account.organization?
|
||||||
params.require(:account).permit(:phone_number, :email_on_debate_comment, :email_on_comment_reply, organization_attributes: [:name])
|
params.require(:account).permit(:phone_number, :email_on_debate_comment, :email_on_comment_reply, organization_attributes: [:name, :responsible_name])
|
||||||
else
|
else
|
||||||
params.require(:account).permit(:username, :email_on_debate_comment, :email_on_comment_reply)
|
params.require(:account).permit(:username, :email_on_debate_comment, :email_on_comment_reply)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<% if @account.organization? %>
|
<% if @account.organization? %>
|
||||||
<%= f.fields_for :organization do |fo| %>
|
<%= f.fields_for :organization do |fo| %>
|
||||||
<%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length, placeholder: t("account.show.organization_name_label") %>
|
<%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length, placeholder: t("account.show.organization_name_label") %>
|
||||||
|
<%= fo.text_field :responsible_name, autofocus: true, maxlength: Organization.responsible_name_max_length, placeholder: t("account.show.organization_responsible_name_placeholder") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>
|
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ en:
|
|||||||
username_label: "Username"
|
username_label: "Username"
|
||||||
phone_number_label: "Phone number"
|
phone_number_label: "Phone number"
|
||||||
organization_name_label: "Organization name"
|
organization_name_label: "Organization name"
|
||||||
|
organization_responsible_name_placeholder: "The responsible representative of the organization"
|
||||||
notifications: Notifications
|
notifications: Notifications
|
||||||
finish_verification: "Finish verification"
|
finish_verification: "Finish verification"
|
||||||
verified_account: Verified account
|
verified_account: Verified account
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ es:
|
|||||||
username_label: "Nombre de usuario"
|
username_label: "Nombre de usuario"
|
||||||
phone_number_label: "Teléfono"
|
phone_number_label: "Teléfono"
|
||||||
organization_name_label: "Nombre de la organización"
|
organization_name_label: "Nombre de la organización"
|
||||||
|
organization_responsible_name_placeholder: "Representante de la asociación/colectivo"
|
||||||
notifications: Notificaciones
|
notifications: Notificaciones
|
||||||
finish_verification: "Finalizar verificación"
|
finish_verification: "Finalizar verificación"
|
||||||
verified_account: Cuenta verificada
|
verified_account: Cuenta verificada
|
||||||
|
|||||||
Reference in New Issue
Block a user