mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-16 14:08:12 +00:00
[user settings] removed 'telephone'
This commit is contained in:
parent
7bcb942ef6
commit
06a22b37e3
@ -14,14 +14,12 @@ class UserBasicInfoForm extends React.Component {
|
|||||||
const {
|
const {
|
||||||
contact_email,
|
contact_email,
|
||||||
login_id,
|
login_id,
|
||||||
name,
|
name
|
||||||
telephone
|
|
||||||
} = this.props.userInfo;
|
} = this.props.userInfo;
|
||||||
this.state = {
|
this.state = {
|
||||||
contactEmail: contact_email,
|
contactEmail: contact_email,
|
||||||
loginID: login_id,
|
loginID: login_id,
|
||||||
name: name,
|
name: name
|
||||||
telephone: telephone
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,17 +35,10 @@ class UserBasicInfoForm extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTelephoneInputChange = (e) => {
|
|
||||||
this.setState({
|
|
||||||
telephone: e.target.value
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSubmit = (e) => {
|
handleSubmit = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let data = {
|
let data = {
|
||||||
name: this.state.name,
|
name: this.state.name
|
||||||
telephone: this.state.telephone
|
|
||||||
};
|
};
|
||||||
if (enableUserSetContactEmail) {
|
if (enableUserSetContactEmail) {
|
||||||
data.contact_email = this.state.contactEmail;
|
data.contact_email = this.state.contactEmail;
|
||||||
@ -59,8 +50,7 @@ class UserBasicInfoForm extends React.Component {
|
|||||||
const {
|
const {
|
||||||
contactEmail,
|
contactEmail,
|
||||||
loginID,
|
loginID,
|
||||||
name,
|
name
|
||||||
telephone
|
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -93,14 +83,6 @@ class UserBasicInfoForm extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(telephone != undefined) && (
|
|
||||||
<div className="form-group row">
|
|
||||||
<label className="col-sm-1 col-form-label" htmlFor="telephone">{gettext('Telephone:')}</label>
|
|
||||||
<div className="col-sm-5">
|
|
||||||
<input className="form-control" id="telephone" type="text" name="telephone" value={telephone} disabled={!enableUpdateUserInfo} readOnly={!enableUpdateUserInfo} onChange={this.handleTelephoneInputChange} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<button type="submit" className="btn btn-outline-primary offset-sm-1" disabled={!enableUpdateUserInfo}>{gettext('Submit')}</button>
|
<button type="submit" className="btn btn-outline-primary offset-sm-1" disabled={!enableUpdateUserInfo}>{gettext('Submit')}</button>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user