mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Add enterprise limit modal
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
angular.module('admin.enterprises').directive 'enterpriseLimit', (InfoDialog) ->
|
||||
restrict: 'A'
|
||||
scope: {
|
||||
limit_reached: '=enterpriseLimit',
|
||||
modal_message: '@modalMessage'
|
||||
}
|
||||
link: (scope, element, attr) ->
|
||||
element.bind 'click', (event)->
|
||||
if scope.limit_reached
|
||||
event.preventDefault()
|
||||
InfoDialog.open 'error', scope.modal_message
|
||||
Reference in New Issue
Block a user