From b000fc7c80f6baf4b30fc307b91e521f2a58bc2c Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Thu, 20 Aug 2015 15:06:03 -0700
Subject: Removed state holding functionality when switching to access history
 or session view

---
 web/react/components/user_settings_security.jsx | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

(limited to 'web/react/components/user_settings_security.jsx')

diff --git a/web/react/components/user_settings_security.jsx b/web/react/components/user_settings_security.jsx
index 568d3fe99..39d707d90 100644
--- a/web/react/components/user_settings_security.jsx
+++ b/web/react/components/user_settings_security.jsx
@@ -62,11 +62,9 @@ module.exports = React.createClass({
         this.setState({confirmPassword: e.target.value});
     },
     handleHistoryOpen: function() {
-        this.setState({willReturn: true});
         $("#user_settings").modal('hide');
     },
     handleDevicesOpen: function() {
-        this.setState({willReturn: true});
         $("#user_settings").modal('hide');
     },
     handleClose: function() {
@@ -75,11 +73,7 @@ module.exports = React.createClass({
         });
         this.setState({currentPassword: '', newPassword: '', confirmPassword: '', serverError: null, passwordError: null});
 
-        if (!this.state.willReturn) {
-            this.props.updateTab('general');
-        } else {
-            this.setState({willReturn: false});
-        }
+        this.props.updateTab('general');
     },
     componentDidMount: function() {
         $('#user_settings').on('hidden.bs.modal', this.handleClose);
@@ -89,7 +83,7 @@ module.exports = React.createClass({
         this.props.updateSection('');
     },
     getInitialState: function() {
-        return {currentPassword: '', newPassword: '', confirmPassword: '', willReturn: false};
+        return {currentPassword: '', newPassword: '', confirmPassword: ''};
     },
     render: function() {
         var serverError = this.state.serverError ? this.state.serverError : null;
-- 
cgit v1.2.3-1-g7c22

