more
This commit is contained in:
@@ -28,8 +28,7 @@ const PaymentModal = ({
|
|||||||
setPaymentdata,
|
setPaymentdata,
|
||||||
}) => {
|
}) => {
|
||||||
const fieldsChunkSize = 2;
|
const fieldsChunkSize = 2;
|
||||||
console.log("paymentfields", paymentfields);
|
|
||||||
/*
|
|
||||||
const ModalForm = () => {
|
const ModalForm = () => {
|
||||||
return splitEvery(
|
return splitEvery(
|
||||||
Object.keys(paymentfields).slice(0, -2),
|
Object.keys(paymentfields).slice(0, -2),
|
||||||
@@ -38,6 +37,7 @@ const PaymentModal = ({
|
|||||||
<Row key={`row${j}`}>
|
<Row key={`row${j}`}>
|
||||||
{names.map((name, i) => (
|
{names.map((name, i) => (
|
||||||
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
||||||
|
{console.log("paymentdata", paymentdata)}
|
||||||
<TextInput
|
<TextInput
|
||||||
name={name}
|
name={name}
|
||||||
value={paymentdata[name].value}
|
value={paymentdata[name].value}
|
||||||
@@ -58,7 +58,7 @@ const PaymentModal = ({
|
|||||||
</Row>
|
</Row>
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
return (
|
return (
|
||||||
<Modal show="true" onHide={onCancel} size="lg">
|
<Modal show="true" onHide={onCancel} size="lg">
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
@@ -66,7 +66,9 @@ const PaymentModal = ({
|
|||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<span>{modalText}</span>
|
<span>{modalText}</span>
|
||||||
<Form className="signup-form">{/* <ModalForm />*/}</Form>
|
<Form className="signup-form">
|
||||||
|
<ModalForm />
|
||||||
|
</Form>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
<Modal.Footer>
|
<Modal.Footer>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const SignupPage = () => {
|
|||||||
const [isBusy, setIsBusy] = useState(false);
|
const [isBusy, setIsBusy] = useState(false);
|
||||||
const [data, setData] = useState(getFormDataDefaults(signupfields));
|
const [data, setData] = useState(getFormDataDefaults(signupfields));
|
||||||
const [paymentdata, setPaymentdata] = useState(
|
const [paymentdata, setPaymentdata] = useState(
|
||||||
getFormDataDefaults(signupfields)
|
getFormDataDefaults(paymentfields)
|
||||||
);
|
);
|
||||||
const [showPaymentModal, setShowPaymentModal] = useState(false);
|
const [showPaymentModal, setShowPaymentModal] = useState(false);
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ const SignupPage = () => {
|
|||||||
const handleChangePaymentInput = (e, name) => {
|
const handleChangePaymentInput = (e, name) => {
|
||||||
const newData = handleFormDataChange(e, name, data, signupfields);
|
const newData = handleFormDataChange(e, name, data, signupfields);
|
||||||
if (newData !== null) {
|
if (newData !== null) {
|
||||||
setData(newData);
|
setPaymentdata(newData);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,6 +184,7 @@ const SignupPage = () => {
|
|||||||
<Row key={`row${j}`}>
|
<Row key={`row${j}`}>
|
||||||
{names.map((name, i) => (
|
{names.map((name, i) => (
|
||||||
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
||||||
|
{console.log("data", data)}
|
||||||
<TextInput
|
<TextInput
|
||||||
name={name}
|
name={name}
|
||||||
value={data[name].value}
|
value={data[name].value}
|
||||||
@@ -278,11 +279,11 @@ const SignupPage = () => {
|
|||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
handleChangePaymentInput={handleChangePaymentInput}
|
handleChangePaymentInput={handleChangePaymentInput}
|
||||||
handleSignup={handleSignup}
|
handleSignup={handleSignup}
|
||||||
paymentdata={paymentdata}
|
|
||||||
paymentfields={paymentfields}
|
paymentfields={paymentfields}
|
||||||
setPaymentdata={setPaymentdata}
|
setPaymentdata={setPaymentdata}
|
||||||
|
paymentdata={paymentdata}
|
||||||
buttonLabelText="Signup"
|
buttonLabelText="Signup"
|
||||||
modalText="Please enter payment information"
|
modalText="Annual/Monthly option description"
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user