diff --git a/awx/ui/client/src/notifications/add/add.controller.js b/awx/ui/client/src/notifications/add/add.controller.js index 4716eb8a0c..e42b2dcf1f 100644 --- a/awx/ui/client/src/notifications/add/add.controller.js +++ b/awx/ui/client/src/notifications/add/add.controller.js @@ -164,6 +164,13 @@ export default ['Rest', 'Wait', 'NotificationsFormObject', }); } }); + $scope.$watch('notification_type', (value) => { + if (value) { + $scope.$broadcast('reset-code-mirror', { + customize_messages: $scope.customize_messages, + }); + } + }); $scope.emailOptionsChange = function () { if ($scope.email_options === 'use_ssl') { diff --git a/awx/ui/client/src/notifications/edit/edit.controller.js b/awx/ui/client/src/notifications/edit/edit.controller.js index 49c2c6a953..30c449b63d 100644 --- a/awx/ui/client/src/notifications/edit/edit.controller.js +++ b/awx/ui/client/src/notifications/edit/edit.controller.js @@ -258,6 +258,13 @@ export default ['Rest', 'Wait', }); } }); + $scope.$watch('notification_type', (value) => { + if (value) { + $scope.$broadcast('reset-code-mirror', { + customize_messages: $scope.customize_messages, + }); + } + }); $scope.emailOptionsChange = function () { if ($scope.email_options === 'use_ssl') {