mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Adding payment controller for consistency
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Darkswarm.controller "PaymentCtrl", ($scope) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
$scope.name = "payment"
|
||||
@@ -1,19 +1,20 @@
|
||||
%fieldset#payment
|
||||
%accordion-group
|
||||
%accordion-heading
|
||||
.row
|
||||
.large-6.columns
|
||||
Payment Details
|
||||
.large-6.columns.text-right
|
||||
{{ Order.paymentMethod().name }}
|
||||
- current_order.available_payment_methods.each do |method|
|
||||
.row
|
||||
.large-12.columns
|
||||
%label
|
||||
= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
|
||||
"ng-model" => "order.payment_method_id"
|
||||
= method.name
|
||||
.row{"ng-show" => "order.payment_method_id == #{method.id}"}
|
||||
.large-12.columns
|
||||
= render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }
|
||||
%ng-form{"ng-controller" => "PaymentCtrl", name: "payment"}
|
||||
%accordion-group
|
||||
%accordion-heading
|
||||
.row
|
||||
.large-6.columns
|
||||
Payment Details
|
||||
.large-6.columns.text-right
|
||||
{{ Order.paymentMethod().name }}
|
||||
- current_order.available_payment_methods.each do |method|
|
||||
.row
|
||||
.large-12.columns
|
||||
%label
|
||||
= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
|
||||
"ng-model" => "order.payment_method_id"
|
||||
= method.name
|
||||
.row{"ng-show" => "order.payment_method_id == #{method.id}"}
|
||||
.large-12.columns
|
||||
= render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }
|
||||
|
||||
|
||||
@@ -8,13 +8,11 @@
|
||||
|
||||
%accordion.row{"close-others" => "true"}
|
||||
%checkout{"ng-controller" => "CheckoutCtrl"}
|
||||
{{ order }}
|
||||
.large-9.columns
|
||||
- unless spree_current_user
|
||||
= render partial: "shop/checkout/authentication"
|
||||
.row
|
||||
= render partial: "shop/checkout/form"
|
||||
|
||||
.large-3.columns
|
||||
= render partial: "shop/checkout/summary"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user