Restructure host signup terms dialog documents config and dialog
							parent
							
								
									3ed6f1fe5d
								
							
						
					
					
						commit
						e31b89b952
					
				|  | @ -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")}  | ||||
|                     <a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener"> | ||||
|                         {termsDialog.privacyPolicy.text} | ||||
|                     </a>,  | ||||
|                     <a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener"> | ||||
|                         {termsDialog.termsOfService.text} | ||||
|                     </a> {_t("and")}  | ||||
|                     <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, | ||||
|             }, | ||||
|         ); | ||||
|  |  | |||
|  | @ -53,7 +53,9 @@ interface ILink { | |||
| 
 | ||||
| interface IHostSignupTermsDialogConfig { | ||||
|     acceptText: string; | ||||
|     termsDocuments: Array<ILink>; | ||||
|     cookiePolicy: ILink; | ||||
|     privacyPolicy: ILink; | ||||
|     termsOfService: ILink; | ||||
|     text: string; | ||||
|     title: string; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Jason Robinson
						Jason Robinson