decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb in decidim-0.4.4 vs decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb in decidim-0.5.0
- old
+ new
@@ -22,12 +22,29 @@
<div class="row column">
<%= form.categories_select :category_id, @form.categories, prompt: t(".select_a_category") %>
</div>
<% end %>
- <% if !@form.process_scope %>
+ <% if current_participatory_process.has_subscopes? %>
<div class="row column">
- <%= form.collection_select :scope_id, organization_scopes, :id, :name %>
+ <%= form.scopes_select :scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope) %>
+ </div>
+ <% end %>
+
+ <% if feature_settings.attachments_allowed? %>
+ <div class="row column">
+ <fieldset>
+ <legend><%= t('.attachment_legend') %></legend>
+ <%= form.fields_for :attachment, @form.attachment do |form| %>
+ <div class="row column">
+ <%= form.text_field :title %>
+ </div>
+
+ <div class="row column">
+ <%= form.upload :file, optional: false %>
+ </div>
+ <% end %>
+ </fieldset>
</div>
<% end %>
</div>
</div>