From 7081a504b5276d18f9fefb00d35e3871515de20c Mon Sep 17 00:00:00 2001 From: okatu-loli Date: Tue, 24 Sep 2024 16:15:07 +0800 Subject: [PATCH] feat: support more field in signup page --- controllers/account.go | 1 + form/auth.go | 1 + web/src/auth/SignupPage.js | 40 +++----------------------------------- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/controllers/account.go b/controllers/account.go index 29696516..bc648649 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -200,6 +200,7 @@ func (c *ApiController) Signup() { Type: userType, Password: authForm.Password, DisplayName: authForm.Name, + Gender: authForm.Gender, Avatar: organization.DefaultAvatar, Email: authForm.Email, Phone: authForm.Phone, diff --git a/form/auth.go b/form/auth.go index 86df5980..9f1a7f2c 100644 --- a/form/auth.go +++ b/form/auth.go @@ -26,6 +26,7 @@ type AuthForm struct { Name string `json:"name"` FirstName string `json:"firstName"` LastName string `json:"lastName"` + Gender string `json:"gender"` Email string `json:"email"` Phone string `json:"phone"` Affiliation string `json:"affiliation"` diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 69e7c98e..13f35917 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -634,43 +634,9 @@ class SignupPage extends React.Component { } else if (signupItem.name === "Agreement") { return AgreementModal.renderAgreementFormItem(application, required, tailFormItemLayout, this); } else if (signupItem.name.startsWith("Text ")) { - if (signupItem.type) { - if (!signupItem.type || signupItem.type === "Input") { - return ( - - - - ); - } else if (signupItem.type === "Single Choice" || signupItem.type === "Multiple Choices") { - return ( - -