From bdcd3f9dc2f8adbda0f8a82c958c10c428c6feaf Mon Sep 17 00:00:00 2001 From: "Nicholas O. Wilburn" Date: Thu, 14 Sep 2017 15:44:13 -0700 Subject: [PATCH] Remove unnecessary fields from mattermost notification UI files --- .../src/notifications/notificationTemplates.form.js | 12 ------------ .../src/notifications/shared/type-change.service.js | 3 --- 2 files changed, 15 deletions(-) diff --git a/awx/ui/client/src/notifications/notificationTemplates.form.js b/awx/ui/client/src/notifications/notificationTemplates.form.js index cea2a49eb3..29ef601191 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.form.js +++ b/awx/ui/client/src/notifications/notificationTemplates.form.js @@ -347,10 +347,6 @@ export default ['i18n', function(i18n) { mattermost_username: { label: i18n._('Username'), type: 'text', - awRequiredWhen: { - reqExpression: "mattermost_username_required", - init: "false" - }, ngShow: "notification_type.value == 'mattermost' ", subForm: 'typeSubForm', ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)' @@ -358,10 +354,6 @@ export default ['i18n', function(i18n) { mattermost_channel: { label: i18n._('Channel'), type: 'text', - awRequiredWhen: { - reqExpression: "mattermost_channel_required", - init: "false" - }, ngShow: "notification_type.value == 'mattermost' ", subForm: 'typeSubForm', ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)' @@ -369,10 +361,6 @@ export default ['i18n', function(i18n) { mattermost_icon_url: { label: i18n._('Icon URL'), type: 'text', - awRequiredWhen: { - reqExpression: "mattermost_icon_url_required", - init: "false" - }, ngShow: "notification_type.value == 'mattermost' ", subForm: 'typeSubForm', ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)' diff --git a/awx/ui/client/src/notifications/shared/type-change.service.js b/awx/ui/client/src/notifications/shared/type-change.service.js index fb725a8f43..543300b877 100644 --- a/awx/ui/client/src/notifications/shared/type-change.service.js +++ b/awx/ui/client/src/notifications/shared/type-change.service.js @@ -51,9 +51,6 @@ function (i18n) { break; case 'mattermost': obj.mattermost_required = true; - obj.mattermost_username_required = false; - obj.mattermost_channel_required = false; - obj.mattermost_icon_url_required = false; break; case 'pagerduty': obj.tokenLabel = ' ' + i18n._('API Token');