From 1dbfa8939bc1a6ef759b47b94c452829c47e9aac Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Thu, 27 Apr 2017 14:57:46 -0400 Subject: [PATCH] Change password requires all fields to be input before checking equivalence. Signed-off-by: Laurence Maultsby --- skyquake/plugins/user_management/src/dashboard/dashboard.jsx | 4 ++++ .../plugins/user_management/src/userProfile/userProfile.jsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/skyquake/plugins/user_management/src/dashboard/dashboard.jsx b/skyquake/plugins/user_management/src/dashboard/dashboard.jsx index a3b6a6398..cb6b9a017 100644 --- a/skyquake/plugins/user_management/src/dashboard/dashboard.jsx +++ b/skyquake/plugins/user_management/src/dashboard/dashboard.jsx @@ -132,6 +132,10 @@ class UserManagementDashboard extends React.Component { let newOne = state['new-password']; let confirmOne = state['confirm-password']; if(true) { + if(!oldOne || !newOne) { + self.props.actions.showNotification('Please fill in all fields.'); + return false; + } if(oldOne == newOne) { self.props.actions.showNotification('Your new password must not match your old one'); return false; diff --git a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx index a7868583c..a3fbced0a 100644 --- a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx +++ b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx @@ -126,6 +126,10 @@ class UserProfileDashboard extends React.Component { let newOne = state['new-password']; let confirmOne = state['confirm-password']; if(true) { + if(!oldOne || !newOne) { + self.props.actions.showNotification('Please fill in all fields.'); + return false; + } if(oldOne == newOne) { self.props.actions.showNotification('Your new password must not match your old one'); return false; -- 2.17.1