From 1cd1045c82a82012b8f67397ff26ee7bdf3c1b40 Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Tue, 17 Oct 2023 12:00:18 +0200 Subject: [PATCH] SONAR-20769 Changing input fields for devops integration modal --- .../AlmBindingDefinitionFormField.tsx | 146 ++++++++---------- .../almIntegration/BitbucketCloudForm.tsx | 5 - .../components/almIntegration/GithubForm.tsx | 35 ++--- .../AlmBindingDefinitionForm-test.tsx | 4 +- .../__tests__/AlmIntegration-it.tsx | 2 +- 5 files changed, 87 insertions(+), 105 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx index cc04a513f4a..9fc63fc2912 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx @@ -17,22 +17,23 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { + ButtonSecondary, + FlagMessage, + FormField, + InputField, + InputTextArea, + Link, +} from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import DocLink from '../../../../components/common/DocLink'; -import ValidationInput, { - ValidationInputErrorPlacement, -} from '../../../../components/controls/ValidationInput'; -import { ButtonLink } from '../../../../components/controls/buttons'; -import { Alert } from '../../../../components/ui/Alert'; -import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; +import { useDocUrl } from '../../../../helpers/docs'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { AlmBindingDefinitionBase } from '../../../../types/alm-settings'; import '../../styles.css'; export interface AlmBindingDefinitionFormFieldProps { autoFocus?: boolean; - error?: string; help?: React.ReactNode; id: string; isInvalid?: boolean; @@ -51,7 +52,6 @@ export function AlmBindingDefinitionFormField -
- - {!optional && } - {help &&
{help}
} -
-
- {!showField && overwriteOnly && ( -
-

{translate('settings.almintegration.form.secret.field')}

- { - props.onFieldChange(propKey, ''); - setShowField(true); - }} - > - {translate('settings.almintegration.form.secret.update_field')} - -
- )} - - {showField && isTextArea && ( -