mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-16 05:43:50 +08:00
Add user's phonePrefix.
This commit is contained in:
@ -33,6 +33,7 @@ type User struct {
|
|||||||
DisplayName string `xorm:"varchar(100)" json:"displayName"`
|
DisplayName string `xorm:"varchar(100)" json:"displayName"`
|
||||||
Avatar string `xorm:"varchar(255)" json:"avatar"`
|
Avatar string `xorm:"varchar(255)" json:"avatar"`
|
||||||
Email string `xorm:"varchar(100)" json:"email"`
|
Email string `xorm:"varchar(100)" json:"email"`
|
||||||
|
PhonePrefix string `xorm:"varchar(10)" json:"phonePrefix"`
|
||||||
Phone string `xorm:"varchar(100)" json:"phone"`
|
Phone string `xorm:"varchar(100)" json:"phone"`
|
||||||
Affiliation string `xorm:"varchar(100)" json:"affiliation"`
|
Affiliation string `xorm:"varchar(100)" json:"affiliation"`
|
||||||
Tag string `xorm:"varchar(100)" json:"tag"`
|
Tag string `xorm:"varchar(100)" json:"tag"`
|
||||||
|
@ -286,7 +286,12 @@ class UserEditPage extends React.Component {
|
|||||||
{i18next.t("general:Phone")}:
|
{i18next.t("general:Phone")}:
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Input value={this.state.user.phone} onChange={e => {
|
<Input addonBefore={
|
||||||
|
<Select virtual={false} style={{width: 70}} value={this.state.user.phonePrefix} onChange={(value => {this.updateUserField('phonePrefix', value);})}>
|
||||||
|
<Option value="1">+1</Option>
|
||||||
|
<Option value="86">+86</Option>
|
||||||
|
</Select>
|
||||||
|
} value={this.state.user.phone} onChange={e => {
|
||||||
this.updateUserField('phone', e.target.value);
|
this.updateUserField('phone', e.target.value);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -52,7 +52,8 @@ class UserListPage extends React.Component {
|
|||||||
displayName: `New User - ${this.state.users.length}`,
|
displayName: `New User - ${this.state.users.length}`,
|
||||||
avatar: "https://casbin.org/img/casbin.svg",
|
avatar: "https://casbin.org/img/casbin.svg",
|
||||||
email: "user@example.com",
|
email: "user@example.com",
|
||||||
phone: "1-12345678",
|
phonePrefix: "86",
|
||||||
|
phone: "12345678",
|
||||||
affiliation: "Example Inc.",
|
affiliation: "Example Inc.",
|
||||||
tag: "staff",
|
tag: "staff",
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
|
Reference in New Issue
Block a user