diff --git a/app/forms/decidim/extra_user_fields/admin/extra_user_fields_form.rb b/app/forms/decidim/extra_user_fields/admin/extra_user_fields_form.rb index 3b2e364..185d6f0 100644 --- a/app/forms/decidim/extra_user_fields/admin/extra_user_fields_form.rb +++ b/app/forms/decidim/extra_user_fields/admin/extra_user_fields_form.rb @@ -15,7 +15,7 @@ class ExtraUserFieldsForm < Decidim::Form attribute :location, Boolean attribute :phone_number_pattern, String - attribute :phone_number_placeholder, String + translatable_attribute :phone_number_placeholder, String # Block ExtraUserFields Attributes # EndBlock diff --git a/app/views/decidim/extra_user_fields/_profile_form.html.erb b/app/views/decidim/extra_user_fields/_profile_form.html.erb index 32fc079..4d82d2a 100644 --- a/app/views/decidim/extra_user_fields/_profile_form.html.erb +++ b/app/views/decidim/extra_user_fields/_profile_form.html.erb @@ -18,7 +18,7 @@ <% end %> <% if current_organization.activated_extra_field?(:phone_number) %> - <%= f.telephone_field :phone_number, placeholder: f.object.phone_number_extra_user_field_placeholder, pattern: f.object.phone_number_extra_user_field_pattern %> + <%= f.telephone_field :phone_number, placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), pattern: f.object.phone_number_extra_user_field_pattern %> <% end %> <% if current_organization.activated_extra_field?(:location) %> diff --git a/app/views/decidim/extra_user_fields/_registration_form.html.erb b/app/views/decidim/extra_user_fields/_registration_form.html.erb index 06317b1..1c1d85e 100644 --- a/app/views/decidim/extra_user_fields/_registration_form.html.erb +++ b/app/views/decidim/extra_user_fields/_registration_form.html.erb @@ -21,7 +21,7 @@ <% end %> <% if current_organization.activated_extra_field?(:phone_number) %> - <%= f.telephone_field :phone_number, placeholder: f.object.phone_number_extra_user_field_placeholder, pattern: f.object.phone_number_extra_user_field_pattern %> + <%= f.telephone_field :phone_number, placeholder: translated_attribute(f.object.phone_number_extra_user_field_placeholder), pattern: f.object.phone_number_extra_user_field_pattern %> <% end %> <% if current_organization.activated_extra_field?(:location) %> diff --git a/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb b/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb index 92806da..d8a053e 100644 --- a/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb +++ b/app/views/decidim/extra_user_fields/admin/extra_user_fields/fields/_phone_number.html.erb @@ -4,6 +4,6 @@