Skip to content

Commit 44023de

Browse files
Fixed button_to helper being called inside existing form
1 parent efd292d commit 44023de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/views/partners/_form.html.erb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@
5353
<% if doc.persisted? %>
5454
<li class="attached-document d-flex justify-content-between align-items-center p-2 border rounded mb-2" data-document-id="<%= doc.signed_id %>">
5555
<%= link_to doc.blob.filename.to_s, rails_blob_path(doc), class: "font-weight-bold w-75 text-truncate" %>
56-
<%= f.hidden_field :documents, multiple: true, value: doc.signed_id %>
57-
<%= delete_button_to attachment_path(doc), { text: "Remove", size: "md", confirm: "Are you sure you want to permanently remove this document?" } %>
56+
<%= f.hidden_field :documents, multiple: true, value: doc.signed_id %>
57+
<%= f.button :button, formmethod: :delete, formaction: attachment_path(doc), class: "btn btn-danger btn-md", data: {disable_with: "Please wait..."} do
58+
fa_icon "trash", text: "Remove"
59+
end %>
5860
</li>
5961
<% end %>
6062
<% end %>

0 commit comments

Comments
 (0)