From e9a6a69d3f952f93d95889baf3233a725d99f5bd Mon Sep 17 00:00:00 2001 From: MANOJ PUTHRAN Date: Fri, 20 Sep 2024 18:30:50 +0530 Subject: [PATCH] add option to add new dialog for terraform template --- .../terraform-template-catalog-form.schema.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/javascript/components/terraform-template-catalog-form/terraform-template-catalog-form.schema.js b/app/javascript/components/terraform-template-catalog-form/terraform-template-catalog-form.schema.js index 9c05a42f4d4..861d3565eac 100644 --- a/app/javascript/components/terraform-template-catalog-form/terraform-template-catalog-form.schema.js +++ b/app/javascript/components/terraform-template-catalog-form/terraform-template-catalog-form.schema.js @@ -206,12 +206,23 @@ const provisionTabSchema = ( keyLabel: __('Variable'), valueLabel: __('Default value'), }, + { + component: componentTypes.RADIO, + id: 'config_info.provision.dialog_type', + name: 'config_info.provision.dialog_type', + label: __('Dialog'), + options: [{ value: 'useExisting', label: __('Use Existing') }, { value: 'createNew', label: __('Create New') }], + }, { component: componentTypes.SELECT, id: 'config_info.provision.dialog_id', name: 'config_info.provision.dialog_id', label: __('Existing Dialog'), options: transformGeneralOptions(dialogs), + condition: { + when: 'config_info.provision.dialog_type', + is: 'useExisting', + }, includeEmpty: true, isRequired: true, validate: [{ type: validatorTypes.REQUIRED }],