mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Checkout: Display error when shipping or payment method is not selected
This commit is contained in:
@@ -23,9 +23,13 @@
|
||||
%label
|
||||
= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
|
||||
required: true,
|
||||
name: "order.payment_method_id",
|
||||
"ng-model" => "order.payment_method_id"
|
||||
= method.name
|
||||
|
||||
%small.error.medium.input-text{"ng-show" => "!fieldValid('order.payment_method_id')"}
|
||||
= "{{ fieldErrors('order.payment_method_id') }}"
|
||||
|
||||
.row{"ng-if" => "order.payment_method_id == #{method.id}"}
|
||||
.small-12.columns
|
||||
= render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }
|
||||
|
||||
@@ -17,10 +17,14 @@
|
||||
%label{"ng-repeat" => "method in ShippingMethods.shipping_methods"}
|
||||
%input{type: :radio,
|
||||
required: true,
|
||||
name: "order.shipping_method_id",
|
||||
"ng-value" => "method.id",
|
||||
"ng-model" => "order.shipping_method_id"}
|
||||
{{ method.name }}
|
||||
|
||||
%small.error.medium.input-text{"ng-show" => "!fieldValid('order.shipping_method_id')"}
|
||||
= "{{ fieldErrors('order.shipping_method_id') }}"
|
||||
|
||||
%label{"ng-if" => "Checkout.requireShipAddress()"}
|
||||
%input{type: :checkbox, "ng-model" => "Checkout.ship_address_same_as_billing"}
|
||||
Shipping address same as billing address?
|
||||
|
||||
Reference in New Issue
Block a user