adds responsible_name to org's account page

This commit is contained in:
Juanjo Bazán
2015-09-12 18:16:40 +02:00
parent 6b0edac6fc
commit d8c9974d1a
4 changed files with 4 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ class AccountController < ApplicationController
def account_params
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
params.require(:account).permit(:username, :email_on_debate_comment, :email_on_comment_reply)
end

View File

@@ -33,6 +33,7 @@
<% if @account.organization? %>
<%= 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 :responsible_name, autofocus: true, maxlength: Organization.responsible_name_max_length, placeholder: t("account.show.organization_responsible_name_placeholder") %>
<% end %>
<%= f.text_field :phone_number, placeholder: t("account.show.phone_number_label") %>

View File

@@ -176,6 +176,7 @@ en:
username_label: "Username"
phone_number_label: "Phone number"
organization_name_label: "Organization name"
organization_responsible_name_placeholder: "The responsible representative of the organization"
notifications: Notifications
finish_verification: "Finish verification"
verified_account: Verified account

View File

@@ -176,6 +176,7 @@ es:
username_label: "Nombre de usuario"
phone_number_label: "Teléfono"
organization_name_label: "Nombre de la organización"
organization_responsible_name_placeholder: "Representante de la asociación/colectivo"
notifications: Notificaciones
finish_verification: "Finalizar verificación"
verified_account: Cuenta verificada