From e56d21a9208209d515b645f95d293eae51f51f8d Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 30 Oct 2015 16:33:51 -0400 Subject: Added a confirmation dialog for unsaved theme changes and removed unnecessary dialog close handling --- .../components/user_settings/user_settings_security.jsx | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'web/react/components/user_settings/user_settings_security.jsx') diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx index 4d414008e..d4d6bf035 100644 --- a/web/react/components/user_settings/user_settings_security.jsx +++ b/web/react/components/user_settings/user_settings_security.jsx @@ -17,7 +17,6 @@ export default class SecurityTab extends React.Component { this.updateCurrentPassword = this.updateCurrentPassword.bind(this); this.updateNewPassword = this.updateNewPassword.bind(this); this.updateConfirmPassword = this.updateConfirmPassword.bind(this); - this.handleClose = this.handleClose.bind(this); this.setupInitialState = this.setupInitialState.bind(this); const state = this.setupInitialState(); @@ -80,24 +79,9 @@ export default class SecurityTab extends React.Component { updateConfirmPassword(e) { this.setState({confirmPassword: e.target.value}); } - handleClose() { - $(ReactDOM.findDOMNode(this)).find('.form-control').each(function resetValue() { - this.value = ''; - }); - this.setState({currentPassword: '', newPassword: '', confirmPassword: '', serverError: null, passwordError: null}); - - this.props.updateTab('general'); - } setupInitialState() { return {currentPassword: '', newPassword: '', confirmPassword: ''}; } - componentDidMount() { - $('#user_settings').on('hidden.bs.modal', this.handleClose); - } - componentWillUnmount() { - $('#user_settings').off('hidden.bs.modal', this.handleClose); - this.props.updateSection(''); - } render() { var serverError; if (this.state.serverError) { -- cgit v1.2.3-1-g7c22