Support IdCard in signup page.

This commit is contained in:
Yang Luo
2021-12-28 17:48:24 +08:00
parent 64d3b7e87f
commit d5f802ec7d
10 changed files with 46 additions and 0 deletions

View File

@ -74,6 +74,7 @@ class SignupTable extends React.Component {
{id: 'Display name', name: 'Display name'},
{id: 'Affiliation', name: 'Affiliation'},
{id: 'Country/Region', name: 'Country/Region'},
{id: 'ID card', name: 'ID card'},
{id: 'Email', name: 'Email'},
{id: 'Password', name: 'Password'},
{id: 'Confirm password', name: 'Confirm password'},

View File

@ -225,6 +225,28 @@ class SignupPage extends React.Component {
<Input />
</Form.Item>
)
} else if (signupItem.name === "ID card") {
return (
<Form.Item
name="idCard"
key="idCard"
label={i18next.t("user:ID card")}
rules={[
{
required: required,
message: i18next.t("signup:Please input your ID card number!"),
whitespace: true,
},
{
required: required,
pattern: new RegExp(/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$/, "g"),
message: i18next.t("signup:Please input the correct ID card number!"),
},
]}
>
<Input />
</Form.Item>
)
} else if (signupItem.name === "Country/Region") {
return (
<Form.Item

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "Please accept the agreement!",
"Please click the below button to sign in": "Please click the below button to sign in",
"Please confirm your password!": "Please confirm your password!",
"Please input the correct ID card number!": "Please input the correct ID card number!",
"Please input your Email!": "Please input your Email!",
"Please input your ID card number!": "Please input your ID card number!",
"Please input your address!": "Please input your address!",
"Please input your affiliation!": "Please input your affiliation!",
"Please input your display name!": "Please input your display name!",
@ -375,6 +377,7 @@
"Empty input!": "Empty input!",
"Homepage": "Homepage",
"Homepage - Tooltip": "Homepage - Tooltip",
"ID card": "ID card",
"Input your email": "Input your email",
"Input your phone number": "Input your phone number",
"Is admin": "Is admin",

View File

@ -309,7 +309,9 @@
"Please accept the agreement!": "请先同意用户协议!",
"Please click the below button to sign in": "请点击下方按钮登录",
"Please confirm your password!": "请再次确认您的密码!",
"Please input the correct ID card number!": "请输入正确的身份证号!",
"Please input your Email!": "请输入您的电子邮箱!",
"Please input your ID card number!": "请输入您的身份证号!",
"Please input your address!": "请输入您的地址!",
"Please input your affiliation!": "请输入您所在的工作单位!",
"Please input your display name!": "请输入您的显示名称!",
@ -375,6 +377,7 @@
"Empty input!": "输入为空!",
"Homepage": "个人主页",
"Homepage - Tooltip": "个人主页链接",
"ID card": "身份证号",
"Input your email": "请输入邮箱",
"Input your phone number": "输入手机号",
"Is admin": "是管理员",