Farmbot-Web-App/frontend/front_page/terms_checkbox.tsx

20 lines
624 B
TypeScript
Raw Normal View History

2018-11-30 19:41:50 -07:00
import * as React from "react";
import { PartialFormEvent } from "./front_page";
2019-04-02 13:59:37 -06:00
import { t } from "../i18next_wrapper";
2018-11-30 19:41:50 -07:00
export const TermsCheckbox = (props: {
privUrl: string,
tosUrl: string,
onChange: (event: PartialFormEvent) => void,
agree: boolean | undefined,
}) =>
<div className="tos">
{`${t("I agree to the")} `}
<a href={props.privUrl} target="_blank">{t("Privacy Policy")}</a>
{` ${t("and")} `}
<a href={props.tosUrl} target="_blank">{t("Terms of Use")}</a>
2020-02-28 09:34:28 -07:00
<input type="checkbox" name="tos"
2018-11-30 19:41:50 -07:00
onChange={props.onChange}
value={props.agree ? "false" : "true"} />
</div>;