From b119bc475f1cf1dc50e7afc10d410fe954015738 Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Fri, 4 Sep 2020 09:07:07 -0700 Subject: [PATCH] convert http headers field to string for codemirror --- .../shared/CustomMessagesSubForm.jsx | 2 +- .../shared/NotificationTemplateForm.jsx | 6 +++ .../shared/TypeInputsSubForm.jsx | 41 +++++-------------- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx b/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx index ede9ac1d79..7dd5b2b4bd 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx @@ -8,7 +8,7 @@ import { FormFullWidthLayout, SubFormLayout, } from '../../../components/FormLayout'; -import { CodeMirrorField } from '../../../components/CodeMirrorInput'; +import CodeMirrorField from '../../../components/CodeMirrorInput/CodeMirrorField'; function CustomMessagesSubForm({ defaultMessages, type, i18n }) { const [useCustomField, , useCustomHelpers] = useField('useCustomMessages'); diff --git a/awx/ui_next/src/screens/NotificationTemplate/shared/NotificationTemplateForm.jsx b/awx/ui_next/src/screens/NotificationTemplate/shared/NotificationTemplateForm.jsx index 5f3b6d3df5..6999ff62dd 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/shared/NotificationTemplateForm.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/shared/NotificationTemplateForm.jsx @@ -121,6 +121,8 @@ function NotificationTemplateForm({ }; }; + const { headers } = template?.notification_configuration || {}; + return ( - - } - > - { - headersHelpers.setValue(value); - }} - mode="javascript" - rows={5} - /> - +