add checkout subbmission directive

This commit is contained in:
Rafael Schouten
2014-10-10 17:53:28 +11:00
parent 01aa8cb761
commit 3ad7165fd6

View File

@@ -0,0 +1,13 @@
Darkswarm.directive "submitCheckout", () ->
restrict: "A"
link: (scope, elm, attr)->
elm.bind 'click', (ev)->
ev.preventDefault()
names = ["details", "billing", "shipping", "payment"]
for name of names
if not scope[name].$valid
$scope.show name
# else
# scope.purchase(ev)