diff --git a/components/newappeal/aboutyou.js b/components/newappeal/aboutyou.js
index f52596b6..24a4c304 100644
--- a/components/newappeal/aboutyou.js
+++ b/components/newappeal/aboutyou.js
@@ -10,6 +10,99 @@ import {
MultiLinefield,
} from "../elements";
+const RenderTextfield = ({
+ id,
+ className,
+ rows,
+ datafieldname,
+ name,
+ label,
+ input,
+ type,
+ errorMsg,
+ disabled,
+ meta: { touched, error },
+ ...custom
+}) => {
+ return (
+ <>
+
+
+ {touched && error && (
+
+ Error:{" "}
+ {touched &&
+ ((error && (
+ {errorMsg ? errorMsg : error}
+ )) ||
+ (warning && {warning}))}
+
+ )}
+
+
+ >
+ );
+};
+
+const RenderMultiline = ({
+ id,
+ className,
+ rows,
+ datafieldname,
+ name,
+ label,
+ input,
+ errorMsg,
+ meta: { touched, error },
+ ...custom
+}) => {
+ return (
+ <>
+
+
+ {touched && error && (
+
+ Error:{" "}
+ {touched &&
+ ((error && (
+ {errorMsg ? errorMsg : error}
+ )) ||
+ (warning && {warning}))}
+
+ )}
+
+
+ >
+ );
+};
+
let AboutYou = (props) => {
let { t } = useTranslation();
@@ -44,64 +137,6 @@ let AboutYou = (props) => {
? "Invalid phone number"
: undefined;
- const RenderTextfield = ({
- id,
- className,
- rows,
- datafieldname,
- name,
- label,
- input,
- type,
- errorMsg,
- disabled,
- meta: { touched, error },
- ...custom
- }) => {
- return (
- <>
-
-
- {touched && error && (
-
-
- Error:
- {" "}
- {touched &&
- ((error && (
- {errorMsg ? errorMsg : error}
- )) ||
- (warning && {warning}))}
-
- )}
-
-
- >
- );
- };
-
const RenderYesNo = ({
datafieldname,
name,
@@ -174,58 +209,6 @@ let AboutYou = (props) => {
>
);
};
- const RenderMultiline = ({
- id,
- className,
- rows,
- datafieldname,
- name,
- label,
- input,
- errorMsg,
- meta: { touched, error },
- ...custom
- }) => {
- return (
- <>
-
-
- {touched && error && (
-
-
- Error:
- {" "}
- {touched &&
- ((error && (
- {errorMsg ? errorMsg : error}
- )) ||
- (warning && {warning}))}
-
- )}
-
-
- >
- );
- };
const RenderRadio = ({
datafieldname,
diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js
index 432f7357..1aa9292e 100644
--- a/components/search/advancedsearch.js
+++ b/components/search/advancedsearch.js
@@ -19,6 +19,55 @@ export const minLength = (errorMsg) => (value) =>
export const leastOneValue = (errorMsg) => {};
+const RenderTextfield = ({
+ id,
+ className,
+ rows,
+ datafieldname,
+ name,
+ label,
+ input,
+ hint1,
+ hint2,
+ hint3,
+ meta: { touched, error },
+ ...custom
+}) => {
+ let { t } = useTranslation();
+
+ return (
+ <>
+
+
+
+
+
+
+
+ {touched && error && (
+
+
+ Error:
+ {" "}
+ {error}
+
+ )}
+
+
+ >
+ );
+};
+
let AdvancedSearch = (props) => {
let { t } = useTranslation();
@@ -56,53 +105,6 @@ let AdvancedSearch = (props) => {
? [{}]
: props.LPAData.LPAData.value;
- const RenderTextfield = ({
- id,
- className,
- rows,
- datafieldname,
- name,
- label,
- input,
- hint1,
- hint2,
- hint3,
- meta: { touched, error },
- ...custom
- }) => {
- return (
- <>
-
-
-
-
-
-
-
- {touched && error && (
-
-
- Error:
- {" "}
- {error}
-
- )}
-
-
- >
- );
- };
-
const RenderLPAList = ({
name,
id,