mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #2337 from Matt-Yorkley/uk/modal_fix
Fix guest checkout login modal
This commit is contained in:
@@ -13,7 +13,7 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
|
||||
submit: =>
|
||||
Loading.message = t 'submitting_order'
|
||||
$http.put('/checkout.json', {order: @preprocess()}).success (data, status)=>
|
||||
Navigation.go data.path
|
||||
Navigation.goWithoutHashFragments data.path
|
||||
.error (response, status)=>
|
||||
if response.path
|
||||
Navigation.go response.path
|
||||
|
||||
@@ -16,6 +16,10 @@ Darkswarm.factory 'Navigation', ($location, $window) ->
|
||||
else
|
||||
@navigate(path)
|
||||
|
||||
goWithoutHashFragments: (path) ->
|
||||
# Redirects to specified path, without Angular hash fragments such as '#/login'
|
||||
$window.location.href = $window.location.origin + path
|
||||
|
||||
go: (path)->
|
||||
if path.match /^http/
|
||||
$window.location.href = path
|
||||
|
||||
Reference in New Issue
Block a user