diff --git a/src/components/auth/PanelTransition.jsx b/src/components/auth/PanelTransition.jsx index ab15178..ca9eb0a 100644 --- a/src/components/auth/PanelTransition.jsx +++ b/src/components/auth/PanelTransition.jsx @@ -194,7 +194,7 @@ class PanelTransition extends Component { '/password': 1, '/activation': 1, '/oauth/permissions': -1, - '/password-change': 1, + '/change-password': 1, '/forgot-password': 1 }; const sign = map[key]; @@ -216,7 +216,7 @@ class PanelTransition extends Component { '/register': not('/activation') ? 'Y' : 'X', '/activation': not('/register') ? 'Y' : 'X', '/oauth/permissions': 'Y', - '/password-change': 'Y', + '/change-password': 'Y', '/forgot-password': not('/password') && not('/login') ? 'Y' : 'X' }; diff --git a/src/components/auth/passwordChange/PasswordChange.jsx b/src/components/auth/changePassword/ChangePassword.jsx similarity index 70% rename from src/components/auth/passwordChange/PasswordChange.jsx rename to src/components/auth/changePassword/ChangePassword.jsx index ec043f1..8eb9a2d 100644 --- a/src/components/auth/passwordChange/PasswordChange.jsx +++ b/src/components/auth/changePassword/ChangePassword.jsx @@ -5,15 +5,14 @@ import Helmet from 'react-helmet'; import buttons from 'components/ui/buttons.scss'; import { Input } from 'components/ui/Form'; - import BaseAuthBody from 'components/auth/BaseAuthBody'; -import passwordChangedMessages from './PasswordChange.messages'; - import icons from 'components/ui/icons.scss'; -import styles from './passwordChange.scss'; + +import messages from './ChangePassword.messages'; +import styles from './changePassword.scss'; class Body extends BaseAuthBody { - static displayName = 'PasswordChangeBody'; + static displayName = 'ChangePasswordBody'; render() { return ( @@ -25,40 +24,47 @@ class Body extends BaseAuthBody {

- +

- + + ); } } -export default function PasswordChange() { +export default function ChangePassword() { const componentsMap = { Title: () => ( // TODO: separate component for PageTitle - + {(msg) => {msg}} ), Body, Footer: () => ( ), Links: (props, context) => ( @@ -67,7 +73,7 @@ export default function PasswordChange() { context.reject(); }}> - + ) }; diff --git a/src/components/auth/passwordChange/PasswordChange.messages.js b/src/components/auth/changePassword/ChangePassword.messages.js similarity index 87% rename from src/components/auth/passwordChange/PasswordChange.messages.js rename to src/components/auth/changePassword/ChangePassword.messages.js index 566dce3..40b3659 100644 --- a/src/components/auth/passwordChange/PasswordChange.messages.js +++ b/src/components/auth/changePassword/ChangePassword.messages.js @@ -17,6 +17,10 @@ export default defineMessages({ id: 'change', defaultMessage: 'Change' }, + currentPassword: { + id: 'currentPassword', + defaultMessage: 'Enter current password' + }, newPassword: { id: 'newPassword', defaultMessage: 'Enter new password' diff --git a/src/components/auth/passwordChange/passwordChange.scss b/src/components/auth/changePassword/changePassword.scss similarity index 100% rename from src/components/auth/passwordChange/passwordChange.scss rename to src/components/auth/changePassword/changePassword.scss diff --git a/src/routes.js b/src/routes.js index 72f4931..d7f96e0 100644 --- a/src/routes.js +++ b/src/routes.js @@ -14,7 +14,7 @@ import Permissions from 'components/auth/permissions/Permissions'; import Activation from 'components/auth/activation/Activation'; import Password from 'components/auth/password/Password'; import Logout from 'components/auth/Logout'; -import PasswordChange from 'components/auth/passwordChange/PasswordChange'; +import ChangePassword from 'components/auth/changePassword/ChangePassword'; import ForgotPassword from 'components/auth/forgotPassword/ForgotPassword'; import Finish from 'components/auth/finish/Finish'; @@ -47,7 +47,7 @@ export default function routesFactory(store) { - + diff --git a/src/services/authFlow/AuthFlow.js b/src/services/authFlow/AuthFlow.js index c2563e5..66d87ae 100644 --- a/src/services/authFlow/AuthFlow.js +++ b/src/services/authFlow/AuthFlow.js @@ -96,7 +96,7 @@ export default class AuthFlow { case '/login': case '/password': case '/activation': - case '/password-change': + case '/change-password': case '/oauth/permissions': case '/oauth/finish': this.setState(new LoginState()); diff --git a/src/services/authFlow/ChangePasswordState.js b/src/services/authFlow/ChangePasswordState.js index 531ae7c..e2f8eab 100644 --- a/src/services/authFlow/ChangePasswordState.js +++ b/src/services/authFlow/ChangePasswordState.js @@ -3,7 +3,7 @@ import CompleteState from './CompleteState'; export default class ChangePasswordState extends AbstractState { enter(context) { - context.navigate('/password-change'); + context.navigate('/change-password'); } reject(context) {