Merge pull request #247 from ONLYOFFICE/bugfix/fixed-incorrect-date
Web: People: fixed incorrect user date of birth
This commit is contained in:
commit
a89cace9b2
@ -285,17 +285,25 @@ class CreateUserForm extends React.Component {
|
|||||||
|
|
||||||
handleSubmit = () => {
|
handleSubmit = () => {
|
||||||
if (!this.validate()) return false;
|
if (!this.validate()) return false;
|
||||||
const { setIsEditingForm, homepage } = this.props;
|
const {
|
||||||
|
setIsEditingForm,
|
||||||
|
homepage,
|
||||||
|
createProfile,
|
||||||
|
createdAvatar,
|
||||||
|
t,
|
||||||
|
history,
|
||||||
|
} = this.props;
|
||||||
|
const profile = this.state.profile;
|
||||||
|
if (!profile.birthday) profile.birthday = new Date();
|
||||||
|
|
||||||
this.setState({ isLoading: true });
|
this.setState({ isLoading: true });
|
||||||
this.props
|
createProfile(profile)
|
||||||
.createProfile(this.state.profile)
|
|
||||||
.then((profile) => {
|
.then((profile) => {
|
||||||
if (this.props.createdAvatar.tmpFile !== "") {
|
if (createdAvatar.tmpFile !== "") {
|
||||||
this.createAvatar(profile.id, profile.userName);
|
this.createAvatar(profile.id, profile.userName);
|
||||||
} else {
|
} else {
|
||||||
toastr.success(this.props.t("ChangesSavedSuccessfully"));
|
toastr.success(t("ChangesSavedSuccessfully"));
|
||||||
this.props.history.push(
|
history.push(
|
||||||
combineUrl(
|
combineUrl(
|
||||||
AppServerConfig.proxyURL,
|
AppServerConfig.proxyURL,
|
||||||
homepage,
|
homepage,
|
||||||
|
Loading…
Reference in New Issue
Block a user