Removed state holding functionality when switching to access history or session view
Этот коммит содержится в:
@@ -62,11 +62,9 @@ module.exports = React.createClass({
|
|||||||
this.setState({confirmPassword: e.target.value});
|
this.setState({confirmPassword: e.target.value});
|
||||||
},
|
},
|
||||||
handleHistoryOpen: function() {
|
handleHistoryOpen: function() {
|
||||||
this.setState({willReturn: true});
|
|
||||||
$("#user_settings").modal('hide');
|
$("#user_settings").modal('hide');
|
||||||
},
|
},
|
||||||
handleDevicesOpen: function() {
|
handleDevicesOpen: function() {
|
||||||
this.setState({willReturn: true});
|
|
||||||
$("#user_settings").modal('hide');
|
$("#user_settings").modal('hide');
|
||||||
},
|
},
|
||||||
handleClose: function() {
|
handleClose: function() {
|
||||||
@@ -75,11 +73,7 @@ module.exports = React.createClass({
|
|||||||
});
|
});
|
||||||
this.setState({currentPassword: '', newPassword: '', confirmPassword: '', serverError: null, passwordError: null});
|
this.setState({currentPassword: '', newPassword: '', confirmPassword: '', serverError: null, passwordError: null});
|
||||||
|
|
||||||
if (!this.state.willReturn) {
|
this.props.updateTab('general');
|
||||||
this.props.updateTab('general');
|
|
||||||
} else {
|
|
||||||
this.setState({willReturn: false});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
$('#user_settings').on('hidden.bs.modal', this.handleClose);
|
$('#user_settings').on('hidden.bs.modal', this.handleClose);
|
||||||
@@ -89,7 +83,7 @@ module.exports = React.createClass({
|
|||||||
this.props.updateSection('');
|
this.props.updateSection('');
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {currentPassword: '', newPassword: '', confirmPassword: '', willReturn: false};
|
return {currentPassword: '', newPassword: '', confirmPassword: ''};
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var serverError = this.state.serverError ? this.state.serverError : null;
|
var serverError = this.state.serverError ? this.state.serverError : null;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user