mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
12 lines
369 B
CoffeeScript
12 lines
369 B
CoffeeScript
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
|