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 81eeff3..32fc079 100644 --- a/app/views/decidim/extra_user_fields/_profile_form.html.erb +++ b/app/views/decidim/extra_user_fields/_profile_form.html.erb @@ -1,25 +1,27 @@ -<% if current_organization.activated_extra_field?(:date_of_birth) %> - <%= f.date_field :date_of_birth %> -<% end %> +<% if current_organization.extra_user_fields_enabled? %> + <% if current_organization.activated_extra_field?(:date_of_birth) %> + <%= f.date_field :date_of_birth %> + <% end %> -<% if current_organization.activated_extra_field?(:gender) %> - <%= f.collection_select :gender, f.object.gender_options_for_select, :first, :last %> -<% end %> + <% if current_organization.activated_extra_field?(:gender) %> + <%= f.collection_select :gender, f.object.gender_options_for_select, :first, :last %> + <% end %> -<% if current_organization.activated_extra_field?(:country) %> - <%= f.label :country do %> - <%= f.custom_country_select :country %> + <% if current_organization.activated_extra_field?(:country) %> + <%= f.label :country do %> + <%= f.custom_country_select :country %> + <% end %> <% end %> -<% end %> -<% if current_organization.activated_extra_field?(:postal_code) %> - <%= f.text_field :postal_code %> -<% end %> + <% if current_organization.activated_extra_field?(:postal_code) %> + <%= f.text_field :postal_code %> + <% 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 %> -<% 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 %> + <% end %> -<% if current_organization.activated_extra_field?(:location) %> - <%= f.text_field :location %> + <% if current_organization.activated_extra_field?(:location) %> + <%= f.text_field :location %> + <% end %> <% end %>