Files
openfoodnetwork/app/views/checkout/_payment.html.haml

38 lines
1.3 KiB
Plaintext

%fieldset#payment
%ng-form{"ng-controller" => "PaymentCtrl", name: "payment"}
%h5{"ng-class" => "{valid: payment.$valid, dirty: payment.$dirty}"}
%span.right
%label.label.round.alert.right
%i.ofn-i_009-close
%label.label.round.success.right
%i.ofn-i_051-check-big
Payment
%accordion-group{"is-open" => "accordion.payment",
"ng-class" => "{valid: payment.$valid, open: accordion.payment}"}
%accordion-heading
.row
.small-11.columns
%em
%small
{{ Order.paymentMethod().name }}
.small-1.columns.right
%span.accordion-up.right
%i.ofn-i_006-caret-up
%span.accordion-down.right
%i.ofn-i_005-caret-down
- current_order.available_payment_methods.each do |method|
.row
.small-12.columns
%label
= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
required: true,
"ng-model" => "order.payment_method_id"
= method.name
.row{"ng-if" => "order.payment_method_id == #{method.id}"}
.small-12.columns
= render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }