-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
949813e
commit 9f0f3c1
Showing
12 changed files
with
88 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/pages/contact-us/__components/ContactPageForm/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import PropTypes from "prop-types"; | ||
import clsx from "classnames"; | ||
import { Container } from "react-bootstrap"; | ||
import { Form, Title } from "@/ui"; | ||
import { getGlobal } from "@/getters/getGlobal"; | ||
|
||
export default function ContactPageForm({ className, title }) { | ||
const global = getGlobal(); | ||
|
||
return ( | ||
<> | ||
<a id="form" /> | ||
<div className={clsx(className)}> | ||
<Container> | ||
<Title title={title} /> | ||
<Form formId={global["_theme.contact.form.id"]} /> | ||
</Container> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
ContactPageForm.defaultProps = { | ||
className: "py-5", | ||
}; | ||
|
||
ContactPageForm.propTypes = { | ||
className: PropTypes.string, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { lazy } from "react"; | ||
|
||
export const ContactPageContent = lazy(() => import("./ContactPageContent")); | ||
export const ContactPageForm = lazy(() => import("./ContactPageForm")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import SourceFlowForm from "@sourceflow-uk/sourceflowform"; | ||
import SourceFlowApplicationForm from "@sourceflow-uk/sourceflowapplicationform"; | ||
import { Helmet } from "react-helmet"; | ||
import classes from "./styles.module.scss"; | ||
import clsx from "classnames"; | ||
|
||
/** | ||
* | ||
* @param id | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
export default function Form({ className, formId = null, jobId = null, onSubmitDone = () => {} }) { | ||
if (formId === null && jobId == null) { | ||
return null; | ||
} | ||
|
||
// noinspection JSUnresolvedLibraryURL | ||
return ( | ||
<> | ||
<Helmet> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css" /> | ||
</Helmet> | ||
<div className={clsx(className, classes.form)}> | ||
{jobId ? ( | ||
<SourceFlowApplicationForm jobId={jobId} onSubmitDone={onSubmitDone} /> | ||
) : ( | ||
<SourceFlowForm formId={formId} onSubmitDone={onSubmitDone} /> | ||
)} | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@import "src/scss/module"; | ||
|
||
.form { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters