Pass checkout form to controller method

This commit is contained in:
Rohan Mitchell
2014-11-06 14:11:31 +11:00
parent 75b250d3fe
commit cbb968d87f
4 changed files with 7 additions and 11 deletions

View File

@@ -18,7 +18,7 @@ Darkswarm.controller "CheckoutCtrl", ($scope, storage, Checkout, CurrentUser, Cu
$scope.enabled = !!CurrentUser
$scope.purchase = (event)->
$scope.purchase = (event, form) ->
event.preventDefault()
$scope.submitted = true
$scope.Checkout.submit() if $scope.checkout.$valid
$scope.Checkout.submit() if form.$valid