diff --git a/jsx/Modal.tsx b/jsx/Modal.tsx
index ca7f683d711..3de965079bf 100644
--- a/jsx/Modal.tsx
+++ b/jsx/Modal.tsx
@@ -3,6 +3,7 @@ import Swal from 'sweetalert2';
import Loader from './Loader';
import {
ButtonElement,
+ FormElement,
} from 'jsx/Form';
type ModalProps = PropsWithChildren<{
@@ -86,11 +87,7 @@ const Modal = ({
*/
const submitButton = () => {
if (onSubmit && !(loading || success)) { // Show button if conditions met
- return (
-
-
-
- );
+ return
;
}
};
@@ -193,6 +190,17 @@ const Modal = ({
);
+ const content = (
+ <>
+ {show && children}
+
+ {loader}
+ {successDisplay}
+ {submitButton()}
+
+ >
+ );
+
return (
e.stopPropagation()}>
@@ -201,12 +209,11 @@ const Modal = ({
×
-
{show && children}
-
- {loader}
- {successDisplay}
- {submitButton()}
-
+ {onSubmit ? (
+
+ {content}
+
+ ) : content}
diff --git a/modules/biobank/jsx/specimenForm.js b/modules/biobank/jsx/specimenForm.js
index 2870460838e..ace4f7abf03 100644
--- a/modules/biobank/jsx/specimenForm.js
+++ b/modules/biobank/jsx/specimenForm.js
@@ -362,60 +362,58 @@ class SpecimenForm extends React.Component {
onSubmit={this.handleSubmit}
throwWarning={true}
>
-
-
-
- {renderNote()}
- {renderGlobalFields()}
-
- {renderRemainingQuantityFields()}
-
-
-
-
+
+ {renderNote()}
+ {renderGlobalFields()}
+
-
-
-
-
+
+
+
-
-
- this.setState({[name]: value})}
- value={this.state.printBarcodes}
- />
-
+
+
+
+
+
+
+ this.setState({[name]: value})}
+ value={this.state.printBarcodes}
+ />
);
}