mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
add checkout subbmission directive
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user