Files
openfoodnetwork/app/views/checkout/_form.html.haml
Luis Ramos 85096a997f Add a checkbox to checkout to tick for Terms and Conditions
Checkout button should be disabled if checkbox is not ticked
2020-10-30 15:08:26 +00:00

22 lines
744 B
Plaintext

- content_for :injection_data do
= inject_available_shipping_methods
= inject_available_payment_methods
= inject_saved_credit_cards
= form_for current_order,
html: {name: "checkout",
id: "checkout_form",
novalidate: true,
"ng-submit" => "purchase($event, checkout)"} do |f|
= render "checkout/details", f: f
= render "checkout/billing", f: f
= render "checkout/shipping", f: f
= render "checkout/payment", f: f
= render "checkout/already_ordered", f: f if show_bought_items?
= render "checkout/terms_and_conditions", f: f
%p
%button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } }
= t :checkout_send
/ {{ checkout.$valid }}