Restoring message for suspend

This commit is contained in:
Belen Curcio
2017-11-23 08:17:40 -03:00
parent 903973ce4b
commit 5793ba45c3
2 changed files with 5 additions and 4 deletions
@@ -97,6 +97,7 @@ class SuspendUserDialog extends React.Component {
}
renderStep1() {
const {message} = this.state;
const {onCancel, username} = this.props;
return (
<section>
@@ -106,14 +107,14 @@ class SuspendUserDialog extends React.Component {
<p className={styles.description}>
{t('suspenduser.description_notify', username)}
</p>
{/* <fieldset>
<fieldset>
<legend className={styles.legend}>{t('suspenduser.write_message')}</legend>
<textarea
rows={5}
className={styles.messageInput}
value={message}
onChange={this.handleMessageChange} />
</fieldset> */}
</fieldset>
<div className={styles.buttons}>
<Button cStyle="white" className={styles.cancel} onClick={onCancel} raised>
{t('suspenduser.cancel')}
@@ -14,11 +14,11 @@ import {notify} from 'coral-framework/actions/notification';
class SuspendUserDialogContainer extends Component {
suspendUser = async ({until}) => {
suspendUser = async ({message, until}) => {
const {userId, username, commentStatus, commentId, hideSuspendUserDialog, setCommentStatus, suspendUser, notify} = this.props;
hideSuspendUserDialog();
try {
await suspendUser({id: userId, until});
await suspendUser({id: userId, message, until});
notify(
'success',
t('suspenduser.notify_suspend_until', username, timeago(until)),