mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
fix navigation check on submission
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
angular.module("admin.enterprises")
|
||||
.controller "enterpriseCtrl", ($scope, longDescription, Enterprise, PaymentMethods, ShippingMethods) ->
|
||||
.controller "enterpriseCtrl", ($scope, longDescription, NavigationCheck, Enterprise, PaymentMethods, ShippingMethods) ->
|
||||
$scope.Enterprise = Enterprise.enterprise
|
||||
$scope.PaymentMethods = PaymentMethods.paymentMethods
|
||||
$scope.ShippingMethods = ShippingMethods.shippingMethods
|
||||
$scope.navClear = NavigationCheck.clear
|
||||
# htmlVariable is used by textAngular wysiwyg for the long descrtiption.
|
||||
$scope.htmlVariable = longDescription
|
||||
# Provide a callback for a warning message displayed when leaving the page.
|
||||
|
||||
# Provide a callback for generating warning messages displayed before leaving the page. This is passed in
|
||||
# from a directive "nav-check" in the page - if we pass it here it will be called in the test suite,
|
||||
# and on all new uses of this contoller, and we might not want that .
|
||||
$scope.enterpriseNavCallback = ->
|
||||
"You are editing an enterprise!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user