From 4ff6ac1021539aae066d65252aa160a680df75e8 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 19 Oct 2016 11:34:08 -0400 Subject: [PATCH] fix lag on password reset form --- client/modules/IDE/components/ResetPasswordForm.js | 7 +++++-- client/modules/User/actions.js | 7 ++++--- client/styles/abstracts/_placeholders.scss | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/client/modules/IDE/components/ResetPasswordForm.js b/client/modules/IDE/components/ResetPasswordForm.js index 3efe16b3..48ba0666 100644 --- a/client/modules/IDE/components/ResetPasswordForm.js +++ b/client/modules/IDE/components/ResetPasswordForm.js @@ -13,7 +13,7 @@ function ResetPasswordForm(props) { {...email} />

- + ); } @@ -26,7 +26,10 @@ ResetPasswordForm.propTypes = { initiateResetPassword: PropTypes.func.isRequired, submitting: PropTypes.bool, invalid: PropTypes.bool, - pristine: PropTypes.bool + pristine: PropTypes.bool, + user: PropTypes.shape({ + resetPasswordInitiate: PropTypes.bool + }) }; export default ResetPasswordForm; diff --git a/client/modules/User/actions.js b/client/modules/User/actions.js index bd67e0c3..c8083166 100644 --- a/client/modules/User/actions.js +++ b/client/modules/User/actions.js @@ -107,11 +107,12 @@ export function logoutUser() { export function initiateResetPassword(formValues) { return (dispatch) => { + dispatch({ + type: ActionTypes.RESET_PASSWORD_INITIATE + }); axios.post(`${ROOT_URL}/reset-password`, formValues, { withCredentials: true }) .then(() => { - dispatch({ - type: ActionTypes.RESET_PASSWORD_INITIATE - }); + // do nothing }) .catch(response => dispatch({ type: ActionTypes.ERROR, diff --git a/client/styles/abstracts/_placeholders.scss b/client/styles/abstracts/_placeholders.scss index c4c4c45a..398dfc0c 100644 --- a/client/styles/abstracts/_placeholders.scss +++ b/client/styles/abstracts/_placeholders.scss @@ -59,12 +59,12 @@ border: 1px solid getThemifyVariable('button-border-color'); border-radius: 2px; padding: #{10 / $base-font-size}rem #{30 / $base-font-size}rem; - &:hover { + &:enabled:hover { border-color: getThemifyVariable('button-background-hover-color'); background-color: getThemifyVariable('button-background-hover-color'); color: getThemifyVariable('button-hover-color'); } - &:active { + &:enabled:active { border-color: getThemifyVariable('button-background-active-color'); background-color: getThemifyVariable('button-background-active-color'); color: getThemifyVariable('button-active-color');