From 111e83a1e67ac5012db33bef1dfe437f3b93026a Mon Sep 17 00:00:00 2001 From: gaba Date: Tue, 3 Jan 2017 08:40:10 -0300 Subject: [PATCH] Removes plugin csrf --- .../src/components/BanUserDialog.js | 67 ++++++++++--------- .../modules/notification/Notification.js | 1 + client/coral-plugin-csrf/FormCSRFField.js | 7 -- .../coral-sign-in/components/ForgotContent.js | 6 +- 4 files changed, 36 insertions(+), 45 deletions(-) delete mode 100644 client/coral-plugin-csrf/FormCSRFField.js diff --git a/client/coral-admin/src/components/BanUserDialog.js b/client/coral-admin/src/components/BanUserDialog.js index 1b4af6eb1..b151d3020 100644 --- a/client/coral-admin/src/components/BanUserDialog.js +++ b/client/coral-admin/src/components/BanUserDialog.js @@ -1,45 +1,46 @@ import React from 'react'; - import {Dialog} from 'coral-ui'; -import Button from 'coral-ui/components/Button'; - import styles from './BanUserDialog.css'; +import Button from 'coral-ui/components/Button'; + import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations'; const lang = new I18n(translations); -const BanUserDialog = ({open, handleClose, onClickBanUser, user = {}}) => { - const {userName = '', userId = '', commentId = ''} = user; - - return ( - handleClose()} onCancel={() => handleClose()} title={lang.t('bandialog.ban_user')}> - handleClose()}>× -
-
-

- {lang.t('bandialog.ban_user')} -

-
-
-

- {lang.t('bandialog.are_you_sure', userName)} -

- - {lang.t('bandialog.note')} - -
-
- - -
+const BanUserDialog = ({open, handleClose, onClickBanUser, user = {}}) => ( + handleClose()} + onCancel={() => handleClose()} + title={lang.t('bandialog.ban_user')}> + × +
+
+

+ {lang.t('bandialog.ban_user')} +

+
+

+ {lang.t('bandialog.are_you_sure', user.userName)} +

+ + {lang.t('bandialog.note')} + +
+
+ + +
+
- ); -}; +); export default BanUserDialog; diff --git a/client/coral-framework/modules/notification/Notification.js b/client/coral-framework/modules/notification/Notification.js index 2a5e1d693..ea0409010 100644 --- a/client/coral-framework/modules/notification/Notification.js +++ b/client/coral-framework/modules/notification/Notification.js @@ -1,6 +1,7 @@ import React from 'react'; const Notification = (props) => { + console.log('ACA EL PROBLEMA notification'); if (props.notification.text) { setTimeout(() => { props.clearNotification(); diff --git a/client/coral-plugin-csrf/FormCSRFField.js b/client/coral-plugin-csrf/FormCSRFField.js deleted file mode 100644 index 253291dab..000000000 --- a/client/coral-plugin-csrf/FormCSRFField.js +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react'; - -const FormCSRFField = ({...props}) => ( - -); - -export default FormCSRFField; diff --git a/client/coral-sign-in/components/ForgotContent.js b/client/coral-sign-in/components/ForgotContent.js index fe373e957..f76ebe45d 100644 --- a/client/coral-sign-in/components/ForgotContent.js +++ b/client/coral-sign-in/components/ForgotContent.js @@ -1,7 +1,6 @@ import React from 'react'; import styles from './styles.css'; import Button from 'coral-ui/components/Button'; -import FormCSRFField from 'coral-plugin-csrf/FormCSRFField'; import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations'; const lang = new I18n(translations); @@ -18,7 +17,7 @@ class ForgotContent extends React.Component { } render () { - const {changeView, auth, _csrf} = this.props; + const {changeView, auth} = this.props; const {passwordRequestSuccess, passwordRequestFailure} = auth; return ( @@ -27,9 +26,6 @@ class ForgotContent extends React.Component {

{lang.t('signIn.recoverPassword')}

-