mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Add user's phonePrefix.
This commit is contained in:
parent
36895801f0
commit
d586efc242
@ -33,6 +33,7 @@ type User struct {
|
||||
DisplayName string `xorm:"varchar(100)" json:"displayName"`
|
||||
Avatar string `xorm:"varchar(255)" json:"avatar"`
|
||||
Email string `xorm:"varchar(100)" json:"email"`
|
||||
PhonePrefix string `xorm:"varchar(10)" json:"phonePrefix"`
|
||||
Phone string `xorm:"varchar(100)" json:"phone"`
|
||||
Affiliation string `xorm:"varchar(100)" json:"affiliation"`
|
||||
Tag string `xorm:"varchar(100)" json:"tag"`
|
||||
|
@ -286,7 +286,12 @@ class UserEditPage extends React.Component {
|
||||
{i18next.t("general:Phone")}:
|
||||
</Col>
|
||||
<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);
|
||||
}} />
|
||||
</Col>
|
||||
|
@ -52,7 +52,8 @@ class UserListPage extends React.Component {
|
||||
displayName: `New User - ${this.state.users.length}`,
|
||||
avatar: "https://casbin.org/img/casbin.svg",
|
||||
email: "user@example.com",
|
||||
phone: "1-12345678",
|
||||
phonePrefix: "86",
|
||||
phone: "12345678",
|
||||
affiliation: "Example Inc.",
|
||||
tag: "staff",
|
||||
isAdmin: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user