From 51dfe9d8d8456425c933f377f8865b2ddf2145f6 Mon Sep 17 00:00:00 2001 From: eskilmar Date: Tue, 2 Feb 2021 10:39:37 +0200 Subject: [PATCH] Taking out edit_form_fields from overriding files --- .../proposals/_edit_form_fields.html.erb | 78 ------------------- .../proposals/proposals/complete.html.erb | 2 +- .../proposals/proposals/edit_draft.html.erb | 2 +- 3 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 app/views/decidim/proposals/proposals/_edit_form_fields.html.erb diff --git a/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb b/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb deleted file mode 100644 index 4a6d86db..00000000 --- a/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +++ /dev/null @@ -1,78 +0,0 @@ -
- <%= form.text_field :title, class: "js-hashtags", hashtaggable: true, value: form_presenter.title %> -
- -
- <%= text_editor_for_proposal_body(form) %> -
- -<% if @form.component_automatic_hashtags.any? %> -
- <%= form.label :automatic_hashtags %> -
- <% @form.component_automatic_hashtags.each do |hashtag| %> - - <% end %> -
-
-<% end %> - -<% if @form.component_suggested_hashtags.any? %> -
- <%= form.label :suggested_hashtags %> -
- <%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option| - option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text } - end %> -
-
-<% end %> - -<% if component_settings.geocoding_enabled? %> -
- <%= form.check_box :has_address, checked: form_has_address? %> -
- -
- <%= form.text_field :address %> -
-<% end %> - -<% if @form.categories&.any? %> -
- <%= form.categories_select :category_id, @form.categories, prompt: t("decidim.proposals.proposals.edit.select_a_category") %> -
-<% end %> - -<% if current_participatory_space.has_subscopes? %> -
- <%= scopes_picker_field form, :scope_id %> -
-<% end %> - -<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %> -
- <%= user_group_select_field form, :user_group_id %> -
-<% end %> - -<% if component_settings.attachments_allowed? && @proposal %> -
- <%= t("attachment_legend", scope: "decidim.proposals.proposals.edit") %> - <%= form.fields_for :attachment, @form.attachment do |nested_form| %> - -
- <%= nested_form.upload :file, optional: false %> - <% if @form.errors[:attachment].present? %> - <% @form.errors[:attachment].each do |message| %> - - <%= message %> - - <% end %> - <% end %> -
- <% end %> -
-<% end %> diff --git a/app/views/decidim/proposals/proposals/complete.html.erb b/app/views/decidim/proposals/proposals/complete.html.erb index 9d94dcf0..fb681a38 100644 --- a/app/views/decidim/proposals/proposals/complete.html.erb +++ b/app/views/decidim/proposals/proposals/complete.html.erb @@ -7,7 +7,7 @@
- <%= decidim_form_for(@form) do |form| %> + <%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %> <%= render partial: "edit_form_fields", locals: { form: form } %>
diff --git a/app/views/decidim/proposals/proposals/edit_draft.html.erb b/app/views/decidim/proposals/proposals/edit_draft.html.erb index 1ad47676..1dd418ee 100644 --- a/app/views/decidim/proposals/proposals/edit_draft.html.erb +++ b/app/views/decidim/proposals/proposals/edit_draft.html.erb @@ -7,7 +7,7 @@
- <%= decidim_form_for(@form) do |form| %> + <%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %> <%= render partial: "edit_form_fields", locals: { form: form } %>