<%= form_for locales_settings, url: admin_locales_path, html: { class: "locales-form" } do |f| %> <% if many_available_locales? %> <%= f.select :default, locales_options, hint: sanitize(t("admin.locales.default_help_text")) %> <% else %>
<%= attribute_name(:default) %>

<%= sanitize(t("admin.locales.default_help_text")) %>

<%= f.collection_radio_buttons( :default, available_locales, :to_sym, ->(locale) { name_for_locale(locale) } ) do |b| %> <%= b.label { b.radio_button + b.text } %> <% end %>
<% end %>
<%= attribute_name(:enabled) %>

<%= t("admin.locales.enabled_help_text") %>

<% if many_available_locales? %> <%= render Shared::CheckAllNoneComponent.new %> <% end %>
<%= f.collection_check_boxes( :enabled, available_locales, :to_sym, ->(locale) { name_for_locale(locale) } ) do |b| %> <%= b.label { b.check_box + b.text } %> <% end %>
<%= submit_tag %> <% end %>