% provide :title do %>
<%= t ".title" %>
<% end %>
<%= decidim_form_for(@form) do |f| %>
<%= f.text_field :name, autofocus: true %>
<%= f.text_field :reference_prefix %>
<%= t(".reference_prefix_hint") %>
<%= f.text_field :host %>
<%= f.text_area :secondary_hosts %>
<%= t(".secondary_hosts_hint") %>
<%= f.text_field :organization_admin_name %>
<%= f.email_field :organization_admin_email %>
<%= f.fields_for :locales do |fields| %>
<%= f.label :organization_locales, "", class: @form.respond_to?(:errors) && @form.errors[:default_locale].present? ? "is-invalid-label" : "" %>
Locale |
Enabled <%= f.error_for(:available_locales) %> |
Default? <%= f.error_for(:default_locale) %> |
<% localized_locales.each do |locale| %>
<%= locale.name %> |
<%= check_box_tag "organization[available_locales][#{locale.id}]", locale.id, @form.available_locales.include?(locale.id) %> |
<%= radio_button_tag "organization[default_locale]", locale.id, @form.default_locale == locale.id %> |
<% end %>
<% end %>
<%= f.label :force_authentication %>
<%= f.check_box :force_users_to_authenticate_before_access_organization %>
<%= f.label :users_registration_mode %>
<%= f.collection_radio_buttons :users_registration_mode,
Decidim::Organization.users_registration_modes,
:first,
->(mode) { t("decidim.system.organizations.users_registration_mode.#{mode.first}") } %>
<%= f.label :available_authorizations %>
<%= f.collection_check_boxes :available_authorizations, Decidim.authorization_workflows, :name, :description %>
<%= render partial: "smtp_settings", locals: { f: f } %>
<%= f.submit t("decidim.system.models.organization.actions.save_and_invite") %>
<% end %>