mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Add a directive attribute 'selected' that update AdminStripeElements when true
Filled with `PaymentCtrl.isSelected(payment_method_id)` Therefore, each time a stripe payment is selected, the one that is actually selected is linked to `AdminStripeElements.card` and `AdminStripeElements.stripe`
This commit is contained in:
@@ -8,3 +8,6 @@ angular.module("admin.payments").controller "PaymentCtrl", ($scope, Payment, Sta
|
||||
$scope.submitted = true
|
||||
StatusMessage.display 'progress', t("spree.admin.payments.source_forms.stripe.submitting_payment")
|
||||
Payment.purchase()
|
||||
|
||||
$scope.isSelected = (payment_method_id) ->
|
||||
return parseInt($scope.form_data.payment_method) == payment_method_id
|
||||
|
||||
Reference in New Issue
Block a user