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