From c63f7017d9a86395ff5c2538a2a51db41101e158 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 16 Oct 2023 21:54:23 +0200 Subject: [PATCH] feat: temp --- .../components/D2Form/D2Section.component.js | 21 ++++++++++--------- .../D2Form/D2SectionFields.component.js | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/core_modules/capture-core/components/D2Form/D2Section.component.js b/src/core_modules/capture-core/components/D2Form/D2Section.component.js index e0cf89264c..d9a58c009d 100644 --- a/src/core_modules/capture-core/components/D2Form/D2Section.component.js +++ b/src/core_modules/capture-core/components/D2Form/D2Section.component.js @@ -74,6 +74,7 @@ class D2SectionPlain extends React.PureComponent { renderSection(sectionProps) { const { sectionMetaData, classes, sectionId, ...passOnProps } = sectionProps; + const { applyCustomFormClass } = this.props; if (!sectionMetaData.showContainer || this.props.formHorizontal) { return ( @@ -87,7 +88,10 @@ class D2SectionPlain extends React.PureComponent { ); } return ( -
+
{ } render() { - const { isHidden, applyCustomFormClass, ...passOnProps } = this.props; + const { isHidden, ...passOnProps } = this.props; if (isHidden) { return null; } - return (
- { - this.renderSection(passOnProps) - } -
); + return ( + + {this.renderSection(passOnProps)} + + ); } } diff --git a/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js b/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js index 218004f055..bf7e55746e 100644 --- a/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js +++ b/src/core_modules/capture-core/components/D2Form/D2SectionFields.component.js @@ -274,6 +274,7 @@ export class D2SectionFieldsComponent extends Component { { this.formBuilderInstance = instance; }} id={formId} + data-test="dhis2-capture-form" fields={this.getFieldConfigWithRulesEffects()} dataElements={this.formFields} values={values}