From a8d72787b2d19d02247f5a81be637220b0c55f66 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Fri, 5 Aug 2016 08:43:46 +0300 Subject: [PATCH] #14: add captcha for register page --- src/components/auth/actions.js | 4 +++- src/components/auth/register/RegisterBody.jsx | 4 +++- src/services/api/signup.js | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/auth/actions.js b/src/components/auth/actions.js index a6433cd..d6f2ef4 100644 --- a/src/components/auth/actions.js +++ b/src/components/auth/actions.js @@ -71,13 +71,15 @@ export function register({ username = '', password = '', rePassword = '', + captcha = '', rulesAgreement = false }) { return wrapInLoader((dispatch, getState) => signup.register({ email, username, password, rePassword, - rulesAgreement, lang: getState().user.lang + rulesAgreement, lang: getState().user.lang, + captcha }) .then(() => { dispatch(updateUser({ diff --git a/src/components/auth/register/RegisterBody.jsx b/src/components/auth/register/RegisterBody.jsx index b6ca2c8..4c5a251 100644 --- a/src/components/auth/register/RegisterBody.jsx +++ b/src/components/auth/register/RegisterBody.jsx @@ -3,7 +3,7 @@ import React from 'react'; import { FormattedMessage as Message } from 'react-intl'; import { Link } from 'react-router'; -import { Input, Checkbox } from 'components/ui/form'; +import { Input, Checkbox, Captcha } from 'components/ui/form'; import BaseAuthBody from 'components/auth/BaseAuthBody'; import passwordMessages from 'components/auth/password/Password.intl.json'; @@ -54,6 +54,8 @@ export default class RegisterBody extends BaseAuthBody { placeholder={messages.repeatPassword} /> + +