From d5f802ec7d2d5e7d607609603f91d3ab3faf7f20 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Tue, 28 Dec 2021 17:48:24 +0800 Subject: [PATCH] Support IdCard in signup page. --- controllers/account.go | 2 ++ web/src/SignupTable.js | 1 + web/src/auth/SignupPage.js | 22 ++++++++++++++++++++++ web/src/locales/de/data.json | 3 +++ web/src/locales/en/data.json | 3 +++ web/src/locales/fr/data.json | 3 +++ web/src/locales/ja/data.json | 3 +++ web/src/locales/ko/data.json | 3 +++ web/src/locales/ru/data.json | 3 +++ web/src/locales/zh/data.json | 3 +++ 10 files changed, 46 insertions(+) diff --git a/controllers/account.go b/controllers/account.go index 18b8ce39..b86b7187 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -38,6 +38,7 @@ type RequestForm struct { Email string `json:"email"` Phone string `json:"phone"` Affiliation string `json:"affiliation"` + IdCard string `json:"idCard"` Region string `json:"region"` Application string `json:"application"` @@ -151,6 +152,7 @@ func (c *ApiController) Signup() { Phone: form.Phone, Address: []string{}, Affiliation: form.Affiliation, + IdCard: form.IdCard, Region: form.Region, Score: getInitScore(), IsAdmin: false, diff --git a/web/src/SignupTable.js b/web/src/SignupTable.js index d005844c..5e61d600 100644 --- a/web/src/SignupTable.js +++ b/web/src/SignupTable.js @@ -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'}, diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index e732d816..7cec7414 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -225,6 +225,28 @@ class SignupPage extends React.Component { ) + } else if (signupItem.name === "ID card") { + return ( + + + + ) } else if (signupItem.name === "Country/Region") { return (