feat: add country/region select (#207)

Signed-off-by: sh1luo <690898835@qq.com>
This commit is contained in:
sh1luo
2021-07-31 16:02:48 +08:00
committed by GitHub
parent eabeef094a
commit bc5e748e5c
9 changed files with 110 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ import PasswordModal from "./PasswordModal";
import ResetModal from "./ResetModal";
import AffiliationSelect from "./common/AffiliationSelect";
import OAuthWidget from "./common/OAuthWidget";
import SelectRegionBox from "./SelectRegionBox";
import "codemirror/lib/codemirror.css"
require('codemirror/theme/material-darker.css');
@@ -224,6 +225,16 @@ class UserEditPage extends React.Component {
{ this.state.user.id === this.props.account?.id ? (<ResetModal org={this.state.application?.organizationObj} buttonText={i18next.t("user:Reset Phone...")} destType={"phone"} coolDownTime={60}/>) : null}
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("user:Country/Region"), i18next.t("user:Country/Region - Tooltip"))} :
</Col>
<Col span={22} >
<SelectRegionBox defaultValue={this.state.user.region} onChange={(value) => {
this.updateUserField("region", value);
}} />
</Col>
</Row>
{
(this.state.application === null || this.state.user === null) ? null : (
<AffiliationSelect labelSpan={(Setting.isMobile()) ? 22 : 2} application={this.state.application} user={this.state.user} onUpdateUserField={(key, value) => { return this.updateUserField(key, value)}} />