From 1142fa60846a2bc09a38d35b993d84ef6d17cdca Mon Sep 17 00:00:00 2001 From: Hugoren Martinako Date: Thu, 4 Apr 2024 16:32:39 +0200 Subject: [PATCH] refactor country selector --- app/views/decidim/extra_user_fields/_profile_form.html.erb | 6 +++++- .../decidim/extra_user_fields/_registration_form.html.erb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 fb33188..ca68184 100644 --- a/app/views/decidim/extra_user_fields/_profile_form.html.erb +++ b/app/views/decidim/extra_user_fields/_profile_form.html.erb @@ -7,7 +7,11 @@ <% end %> <% if current_organization.activated_extra_field?(:country) %> - <%= f.custom_country_select :country %> + <%= f.label :country do %> + <%# TODO: include the required attribute properly %> + <%= t("activemodel.attributes.user.country") %> + <%= f.country_select :country %> + <% end %> <% end %> <% if current_organization.activated_extra_field?(:postal_code) %> 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 8020125..e6eb234 100644 --- a/app/views/decidim/extra_user_fields/_registration_form.html.erb +++ b/app/views/decidim/extra_user_fields/_registration_form.html.erb @@ -11,7 +11,11 @@ <% end %> <% if current_organization.activated_extra_field?(:country) %> - <%= f.custom_country_select :country %> + <%= f.label :country do %> + <%# TODO: include the required attribute properly %> + <%= t("activemodel.attributes.user.country") %> + <%= f.country_select :country %> + <% end %> <% end %> <% if current_organization.activated_extra_field?(:postal_code) %>