Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachments in comments feature #356

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Change uploader
entantoencuanto committed Nov 22, 2024
commit 318af3936baeae68a117cee3050dd6156ba9865f
16 changes: 15 additions & 1 deletion app/cells/decidim/comments/comment_form/extended_comment_as.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<%= decidim_original_comment_as_for(form) %>

<% if attachments_allowed? %>
<%= form.upload :add_documents, multiple: true, button_class: "button button__lg button__transparent-secondary w-full" %>
<% if !reply? %>
<%= form.attachment(
:add_documents,
multiple: true,
modal_id: "#{form_id}-documents",
# label: t("decidim.proposals.collaborative_drafts.new.add_file"),
# button_label: t("decidim.proposals.collaborative_drafts.new.add_file"),
# button_edit_label: t("decidim.proposals.collaborative_drafts.new.edit_file"),
button_class: "button button__lg button__transparent-secondary w-full",
# help_text: t("attachment_legend", scope: "decidim.proposals.collaborative_drafts.edit"),
help_i18n_scope: "decidim.forms.file_help.file"
) %>
<% else %>
<%= form.file_field(:add_documents, multiple:true) %>
<% end %>
<% end %>