diff --git a/awx/ui/client/src/notifications/add/add.controller.js b/awx/ui/client/src/notifications/add/add.controller.js index 11f7eb1aa1..0455d2f626 100644 --- a/awx/ui/client/src/notifications/add/add.controller.js +++ b/awx/ui/client/src/notifications/add/add.controller.js @@ -75,7 +75,14 @@ export default ['Rest', 'Wait', 'NotificationsFormObject', multiple: false }); - $scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')]; + $scope.hipchatColors = [ + {'id': 'gray', 'name': i18n._('Gray')}, + {'id': 'green', 'name': i18n._('Green')}, + {'id': 'purple', 'name': i18n._('Purple')}, + {'id': 'red', 'name': i18n._('Red')}, + {'id': 'yellow', 'name': i18n._('Yellow')}, + {'id': 'random', 'name': i18n._('Random')} + ]; CreateSelect2({ element: '#notification_template_color', multiple: false diff --git a/awx/ui/client/src/notifications/edit/edit.controller.js b/awx/ui/client/src/notifications/edit/edit.controller.js index 0d871dd26f..dfde2038e9 100644 --- a/awx/ui/client/src/notifications/edit/edit.controller.js +++ b/awx/ui/client/src/notifications/edit/edit.controller.js @@ -122,7 +122,14 @@ export default ['Rest', 'Wait', multiple: false }); - $scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')]; + $scope.hipchatColors = [ + {'id': 'gray', 'name': i18n._('Gray')}, + {'id': 'green', 'name': i18n._('Green')}, + {'id': 'purple', 'name': i18n._('Purple')}, + {'id': 'red', 'name': i18n._('Red')}, + {'id': 'yellow', 'name': i18n._('Yellow')}, + {'id': 'random', 'name': i18n._('Random')} + ]; CreateSelect2({ element: '#notification_template_color', multiple: false diff --git a/awx/ui/client/src/notifications/notificationTemplates.form.js b/awx/ui/client/src/notifications/notificationTemplates.form.js index e2b15ef77b..c54843421b 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.form.js +++ b/awx/ui/client/src/notifications/notificationTemplates.form.js @@ -288,7 +288,7 @@ export default ['i18n', function(i18n) { label: i18n._('Notification Color'), dataTitle: i18n._('Notification Color'), type: 'select', - ngOptions: 'color for color in hipchatColors track by color', + ngOptions: 'color.id as color.name for color in hipchatColors', awPopOver: i18n._('Specify a notification color. Acceptable colors are: yellow, green, red purple, gray or random.'), awRequiredWhen: { reqExpression: "hipchat_required",