Skip to content

Commit

Permalink
Update Product Link form for Alchemy 7.1
Browse files Browse the repository at this point in the history
Alchemy 7.1 now allows to submit the form like
any other form with Enter key and prevents submits
correctly.

This still works with Alchemy 6.1 and 7.0 because of
the data attribute we kept on the button tag.
  • Loading branch information
tvdeyen committed Dec 21, 2023
1 parent b5493e2 commit b6f6cbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/alchemy/admin/pages/_product_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_tag do %>
<form data-link-form-type="product">
<%= render_message do %>
<h3><%= Alchemy.t(:choose_product_to_link) %></h3>
<% end %>
Expand All @@ -23,8 +23,8 @@
class: 'alchemy_selectbox link_target' %>
</div>
<div class="submit">
<%= button_tag Alchemy.t(:apply), class: 'create-link button', data: { link_type: 'product' } %>
<%= button_tag Alchemy.t(:apply), class: "create-link", data: { link_type: "product" } %>
</div>
<% end %>
</form>

<%= render "product_link_script" %>

0 comments on commit b6f6cbf

Please sign in to comment.