diff --git a/src/components/auth/activation/Activation.jsx b/src/components/auth/activation/Activation.jsx
index 204960c..ec1bf8e 100644
--- a/src/components/auth/activation/Activation.jsx
+++ b/src/components/auth/activation/Activation.jsx
@@ -1,17 +1,16 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import messages from './Activation.intl.json';
import Body from './ActivationBody';
-export default function Activation() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.accountActivationTitle,
+ body: Body,
+ footer: {
+ color: 'blue',
+ label: messages.confirmEmail
+ },
+ links: {
+ label: messages.didNotReceivedEmail
+ }
+});
diff --git a/src/components/auth/changePassword/ChangePassword.jsx b/src/components/auth/changePassword/ChangePassword.jsx
index c60ebb9..b3236db 100644
--- a/src/components/auth/changePassword/ChangePassword.jsx
+++ b/src/components/auth/changePassword/ChangePassword.jsx
@@ -1,17 +1,16 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import Body from './ChangePasswordBody';
import messages from './ChangePassword.intl.json';
-export default function ChangePassword() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.changePasswordTitle,
+ body: Body,
+ footer: {
+ color: 'darkBlue',
+ label: messages.change
+ },
+ links: {
+ label: messages.skipThisStep
+ }
+});
diff --git a/src/components/auth/factory.jsx b/src/components/auth/factory.jsx
new file mode 100644
index 0000000..2421cb1
--- /dev/null
+++ b/src/components/auth/factory.jsx
@@ -0,0 +1,29 @@
+import React from 'react';
+
+import { Button } from 'components/ui/form';
+import RejectionLink from 'components/auth/RejectionLink';
+import AuthTitle from 'components/auth/AuthTitle';
+
+/**
+ * @param {object} options
+ * @param {string|object} options.title - panel title
+ * @param {ReactElement} options.body
+ * @param {object} options.footer - config for footer Button
+ * @param {array|object|null} options.links - link config or an array of link configs
+ *
+ * @return {object} - structure, required for auth panel to work
+ */
+export default function(options) {
+ return () => ({
+ Title: () => ,
+ Body: options.body,
+ Footer: () => ,
+ Links: () => options.links ? (
+
+ {[].concat(options.links).map((link, index) => (
+ [index ? ' | ' : '', ]
+ ))}
+
+ ) : null
+ });
+}
diff --git a/src/components/auth/forgotPassword/ForgotPassword.jsx b/src/components/auth/forgotPassword/ForgotPassword.jsx
index 94a379a..f3433b5 100644
--- a/src/components/auth/forgotPassword/ForgotPassword.jsx
+++ b/src/components/auth/forgotPassword/ForgotPassword.jsx
@@ -1,17 +1,17 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import messages from './ForgotPassword.intl.json';
import Body from './ForgotPasswordBody';
-export default function ForgotPassword() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.title,
+ body: Body,
+ footer: {
+ color: 'lightViolet',
+ autoFocus: true,
+ label: messages.sendMail
+ },
+ links: {
+ label: messages.alreadyHaveCode
+ }
+});
diff --git a/src/components/auth/login/Login.jsx b/src/components/auth/login/Login.jsx
index 93964cf..81e1509 100644
--- a/src/components/auth/login/Login.jsx
+++ b/src/components/auth/login/Login.jsx
@@ -1,17 +1,14 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import Body from './LoginBody';
import messages from './Login.intl.json';
-export default function Login() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () => null
- };
-}
+export default factory({
+ title: messages.loginTitle,
+ body: Body,
+ footer: {
+ color: 'green',
+ label: messages.next
+ }
+});
diff --git a/src/components/auth/password/Password.jsx b/src/components/auth/password/Password.jsx
index 0bc2c89..df71f6a 100644
--- a/src/components/auth/password/Password.jsx
+++ b/src/components/auth/password/Password.jsx
@@ -1,17 +1,16 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import Body from './PasswordBody';
import messages from './Password.intl.json';
-export default function Password() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.passwordTitle,
+ body: Body,
+ footer: {
+ color: 'green',
+ label: messages.signInButton
+ },
+ links: {
+ label: messages.forgotPassword
+ }
+});
diff --git a/src/components/auth/permissions/Permissions.jsx b/src/components/auth/permissions/Permissions.jsx
index 054c4f5..8fb5c78 100644
--- a/src/components/auth/permissions/Permissions.jsx
+++ b/src/components/auth/permissions/Permissions.jsx
@@ -1,17 +1,17 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
-
+import factory from 'components/auth/factory';
import messages from './Permissions.intl.json';
import Body from './PermissionsBody';
-export default function Permissions() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.permissionsTitle,
+ body: Body,
+ footer: {
+ color: 'orange',
+ autoFocus: true,
+ label: messages.approve
+ },
+ links: {
+ label: messages.decline
+ }
+});
+
diff --git a/src/components/auth/recoverPassword/RecoverPassword.jsx b/src/components/auth/recoverPassword/RecoverPassword.jsx
index b8205e2..3faf1e0 100644
--- a/src/components/auth/recoverPassword/RecoverPassword.jsx
+++ b/src/components/auth/recoverPassword/RecoverPassword.jsx
@@ -1,18 +1,17 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import changePassword from 'components/auth/changePassword/ChangePassword.intl.json';
import messages from './RecoverPassword.intl.json';
import Body from './RecoverPasswordBody';
-export default function RecoverPassword() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.title,
+ body: Body,
+ footer: {
+ color: 'lightViolet',
+ label: changePassword.change
+ },
+ links: {
+ label: messages.contactSupport
+ }
+});
diff --git a/src/components/auth/register/Register.jsx b/src/components/auth/register/Register.jsx
index 3b60352..68a7c84 100644
--- a/src/components/auth/register/Register.jsx
+++ b/src/components/auth/register/Register.jsx
@@ -1,25 +1,24 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import RejectionLink from 'components/auth/RejectionLink';
-import AuthTitle from 'components/auth/AuthTitle';
+import factory from 'components/auth/factory';
import activationMessages from 'components/auth/activation/Activation.intl.json';
import forgotPasswordMessages from 'components/auth/forgotPassword/ForgotPassword.intl.json';
import messages from './Register.intl.json';
import Body from './RegisterBody';
-export default function Register() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () => (
-
-
- {' | '}
-
-
- )
- };
-}
+export default factory({
+ title: messages.registerTitle,
+ body: Body,
+ footer: {
+ color: 'blue',
+ label: messages.signUpButton
+ },
+ links: [
+ {
+ label: activationMessages.didNotReceivedEmail,
+ payload: {requestEmail: true}
+ },
+ {
+ label: forgotPasswordMessages.alreadyHaveCode
+ }
+ ]
+});
diff --git a/src/components/auth/resendActivation/ResendActivation.jsx b/src/components/auth/resendActivation/ResendActivation.jsx
index 28b177a..20d222d 100644
--- a/src/components/auth/resendActivation/ResendActivation.jsx
+++ b/src/components/auth/resendActivation/ResendActivation.jsx
@@ -1,18 +1,17 @@
-import React from 'react';
-
-import { Button } from 'components/ui/form';
-import AuthTitle from 'components/auth/AuthTitle';
-import RejectionLink from 'components/auth/RejectionLink';
+import factory from 'components/auth/factory';
import forgotPasswordMessages from 'components/auth/forgotPassword/ForgotPassword.intl.json';
import messages from './ResendActivation.intl.json';
import Body from './ResendActivationBody';
-export default function ResendActivation() {
- return {
- Title: () => ,
- Body,
- Footer: () => ,
- Links: () =>
- };
-}
+export default factory({
+ title: messages.title,
+ body: Body,
+ footer: {
+ color: 'blue',
+ label: messages.sendNewEmail
+ },
+ links: {
+ label: forgotPasswordMessages.alreadyHaveCode
+ }
+});