From: Laurence Maultsby Date: Thu, 27 Apr 2017 18:57:46 +0000 (-0400) Subject: Change password requires all fields to be input before checking equivalence. X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=1dbfa8939bc1a6ef759b47b94c452829c47e9aac;p=osm%2FUI.git Change password requires all fields to be input before checking equivalence. Signed-off-by: Laurence Maultsby --- 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;