app/views/decidim/proposals/proposals/new.html.erb in decidim-proposals-0.4.4 vs app/views/decidim/proposals/proposals/new.html.erb in decidim-proposals-0.5.0
- old
+ new
@@ -3,13 +3,18 @@
<%= icon "chevron-left", class: "icon--small" %>
<%= t(".back") %>
<% end %>
<h2 class="section-heading"><%= t(".title") %></h2>
</div>
+
<div class="row">
<div class="columns large-6 medium-centered">
<div class="card">
+ <% if translated_attribute(feature_settings.new_proposal_help_text).present? %>
+ <%= render partial: "decidim/shared/announcement", locals: { announcement: feature_settings.new_proposal_help_text } %>
+ <% end %>
+
<div class="card__content">
<%= decidim_form_for(@form) do |form| %>
<div class="field">
<%= form.text_field :title %>
</div>
@@ -31,19 +36,34 @@
<div class="field">
<%= 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="field">
- <%= 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 current_user.user_groups.verified.any? %>
<div class="field">
<%= form.select :user_group_id, current_user.user_groups.verified.map{|g| [g.name, g.id]}, prompt: current_user.name %>
</div>
+ <% end %>
+
+ <% if feature_settings.attachments_allowed? %>
+ <fieldset>
+ <legend><%= t('.attachment_legend') %></legend>
+ <%= form.fields_for :attachment, @form.attachment do |form| %>
+ <div class="field">
+ <%= form.text_field :title %>
+ </div>
+
+ <div class="field">
+ <%= form.upload :file, optional: false %>
+ </div>
+ <% end %>
+ </fieldset>
<% end %>
<div class="actions">
<%= form.submit t(".send"), class: "button expanded", "data-disable-with" => "#{t('.send')}..." %>
</div>