+
+
+ <%= form.select :state,
+ Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] },
+ {},
+ { disabled: !@form.state_updatable? } %>
+
+
+
+
+
+ <% unless single_initiative_type? %>
+ <%= form.select :type_id,
+ initiative_type_options,
+ {},
+ {
+ disabled: !@form.signature_type_updatable?,
+ "data-scope-selector": "initiative_decidim_scope_id",
+ "data-scope-id": form.object.decidim_scope_id.to_s,
+ "data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
+ "data-signature-types-selector": "initiative_signature_type",
+ "data-signature-type": current_initiative.signature_type,
+ "data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
+ } %>
+
+ <% else %>
+ <%= form.hidden_field :type_id,
+ {
+ disabled: !@form.signature_type_updatable?,
+ "data-scope-selector": "initiative_decidim_scope_id",
+ "data-scope-id": form.object.decidim_scope_id.to_s,
+ "data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
+ "data-signature-types-selector": "initiative_signature_type",
+ "data-signature-type": current_initiative.signature_type,
+ "data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
+ } %>
+ <% end %>
+
+ <%= form.select :decidim_scope_id, [], {}, { disabled: !@form.signature_type_updatable? } %>
+
+
+
+ <% if current_initiative.published? && current_user.admin? %>
+
+
+ <%= form.date_field :signature_start_date %>
+
+
+
+ <%= form.date_field :signature_end_date %>
+
+
+ <% end %>
+
+ <% if can_edit_custom_signature_end_date?(current_initiative) %>
+
+ <%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
+
+ <% end %>
+
+ <% if current_initiative.area_enabled? %>
+
+ <%= form.areas_select :area_id,
+ areas_for_select(current_organization),
+ {
+ selected: current_initiative.decidim_area_id,
+ include_blank: current_initiative.decidim_area_id.blank? || current_initiative.created?
+ },
+ disabled: !@form.area_updatable? %>
+
+ <% end %>
+
+
+
+ <%= form.select :signature_type, [], {}, { disabled: !@form.signature_type_updatable? } %>
+
+
+
+ <% if current_initiative.accepts_offline_votes? && current_user.admin? %>
+
+
+ <% @form.offline_votes.each do |scope_id, (votes, scope_name)| %>
+ <%= label_tag "initiative_offline_votes_#{scope_id}", t("activemodel.attributes.initiative.offline_votes_for_scope", scope_name: translated_attribute(scope_name)) %>
+ <%= number_field_tag "initiative[offline_votes][#{scope_id}]", votes, min: 0, id: "initiative_offline_votes_#{scope_id}" %>
+ <% end %>
+
+
+ <% end %>
+