mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-07 22:46:06 +00:00
Ensure previously selected shipping method is selected in form
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
6f2035febe
commit
937ba3ca0a
@@ -67,11 +67,13 @@
|
||||
%div.checkout-title
|
||||
= t("split_checkout.step1.delivery_address.title")
|
||||
|
||||
- selected_shipping_method = @order.shipping_method&.id
|
||||
- @shipping_methods.each do |shipping_method|
|
||||
%div.checkout-input
|
||||
= fields_for shipping_method do |shipping_method_form|
|
||||
= shipping_method_form.radio_button :name, shipping_method.id,
|
||||
id: "shipping_method_#{shipping_method.id}",
|
||||
checked: (shipping_method.id == selected_shipping_method),
|
||||
"data-description": shipping_method.description,
|
||||
"data-action": "toggle#toggle shippingmethod#selectShippingMethod",
|
||||
"data-toggle-show": shipping_method.require_ship_address
|
||||
|
||||
Reference in New Issue
Block a user