Add enterprise limit modal

This commit is contained in:
Matt-Yorkley
2018-01-23 20:02:55 +00:00
parent 5c046b76f0
commit d52f9fd43f
5 changed files with 21 additions and 5 deletions

View File

@@ -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