Reworking the checkout

This commit is contained in:
Will Marshall
2014-05-08 16:38:21 +10:00
parent 998fb07330
commit 5fa0d845a4
6 changed files with 48 additions and 31 deletions

View File

@@ -3,10 +3,7 @@ Darkswarm.controller "CheckoutCtrl", ($scope, storage, CheckoutFormState, Order,
storage.bind $scope, "Order.order", {storeName: "order_#{Order.order.id}"}
$scope.order = Order.order # Ordering is important
if CurrentUser
$scope.enabled = true
else
$scope.enabled = false
$scope.enabled = if CurrentUser then true else false
$scope.purchase = (event)->
event.preventDefault()