diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 8d6b3d8c..13f35917 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {Button, Form, Input, Radio, Result, Row, message} from "antd"; +import {Button, Form, Input, Radio, Result, Row, Select, message} from "antd"; import * as Setting from "../Setting"; import * as AuthBackend from "./AuthBackend"; import * as ProviderButton from "./ProviderButton"; @@ -198,6 +198,10 @@ class SignupPage extends React.Component { onFinish(values) { const application = this.getApplicationObj(); + if (Array.isArray(values.gender)) { + values.gender = values.gender.join(", "); + } + const params = new URLSearchParams(window.location.search); values.plan = params.get("plan"); values.pricing = params.get("pricing"); @@ -366,7 +370,9 @@ class SignupPage extends React.Component { }, ]} > - {this.setState({region: value});}} /> + { + this.setState({region: value}); + }} /> ); } else if (signupItem.name === "Email" || signupItem.name === "Phone" || signupItem.name === "Email or Phone" || signupItem.name === "Phone or Email") { @@ -403,27 +409,29 @@ class SignupPage extends React.Component { }, ]} > - this.setState({email: e.target.value})} /> + this.setState({email: e.target.value})} /> { signupItem.rule !== "No verification" && - - - + + + } ); @@ -432,7 +440,8 @@ class SignupPage extends React.Component { const renderPhoneItem = () => { return ( - + { signupItem.rule !== "No verification" && - - - + + + } ); @@ -524,7 +533,7 @@ class SignupPage extends React.Component { return ( - + { this.setState({ emailOrPhoneMode: e.target.value, @@ -618,7 +627,8 @@ class SignupPage extends React.Component { }, ]} > - + ); } else if (signupItem.name === "Agreement") { @@ -633,7 +643,7 @@ class SignupPage extends React.Component { -   {i18next.t("signup:Have account?")}  +   {i18next.t("signup:Have account?")}  { const linkInStorage = sessionStorage.getItem("signinUrl"); if (linkInStorage !== null && linkInStorage !== "") { @@ -671,6 +681,59 @@ class SignupPage extends React.Component { }) ); + } else if (signupItem.name === "Gender") { + if (!signupItem.type) { + return ( + + + + ); + } + if (!signupItem.type || signupItem.type === "Input") { + return ( + + + + ); + } else if (signupItem.type === "Single Choice" || signupItem.type === "Multiple Choices") { + return ( + +