Restructure host signup terms dialog documents config and dialog

pull/21833/head
Jason Robinson 2021-02-09 12:23:27 +02:00
parent 3ed6f1fe5d
commit e31b89b952
2 changed files with 26 additions and 4 deletions

View File

@ -168,12 +168,32 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
}
private onAccountDetailsRequest = () => {
const termsDialog = this.config.termsDialog;
const textComponent = (
<>
<p>
{termsDialog.text}
</p>
<p>
{_t("Learn more in our")}&nbsp;
<a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener">
{termsDialog.privacyPolicy.text}
</a>,&nbsp;
<a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener">
{termsDialog.termsOfService.text}
</a> {_t("and")}&nbsp;
<a href={termsDialog.cookiePolicy.href} target="_blank" rel="noreferrer noopener">
{termsDialog.cookiePolicy.text}
</a>.
</p>
</>
);
Modal.createDialog(
QuestionDialog,
{
title: this.config.termsDialog.title,
description: this.config.termsDialog.text,
button: this.config.termsDialog.acceptText,
title: termsDialog.title,
description: textComponent,
button: termsDialog.acceptText,
onFinished: this.onAccountDetailsDialogFinished,
},
);

View File

@ -53,7 +53,9 @@ interface ILink {
interface IHostSignupTermsDialogConfig {
acceptText: string;
termsDocuments: Array<ILink>;
cookiePolicy: ILink;
privacyPolicy: ILink;
termsOfService: ILink;
text: string;
title: string;
}