From 4a84a4a9079bedc37a818df1645730fce1749ecb Mon Sep 17 00:00:00 2001 From: Renard Date: Mon, 16 Sep 2019 19:14:19 -0300 Subject: TODO: Archivos adjuntos --- src/ReplyForm.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/ReplyForm.js') diff --git a/src/ReplyForm.js b/src/ReplyForm.js index 1dab761..a9f461d 100644 --- a/src/ReplyForm.js +++ b/src/ReplyForm.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Form, Segment, Button, Message } from "semantic-ui-react"; +import { Form, Segment, Button, Message, Icon } from "semantic-ui-react"; import { quotes } from "./Quotes"; class ReplyForm extends Component { @@ -9,6 +9,7 @@ class ReplyForm extends Component { name: "", email: "", message: "", + attachment: "", submittedName: "", submittedEmail: "", submittedMessage: "", @@ -65,8 +66,14 @@ class ReplyForm extends Component { ); } + handleClick(e) { + e.preventDefault(); + document.getElementById("hiddenInput").click(); + } + render() { - const { name, email, message, replyRes } = this.state; + const { name, email, message, replyRes, attachment } = this.state; + const { currentBoard } = this.props; if (this.props.locked === 1) { return ( @@ -112,6 +119,22 @@ class ReplyForm extends Component { value={email} onChange={this.handleChange} /> + {/* TODO: Archivos adjuntos */} + {currentBoard.board_type === 0 && + currentBoard.allow_image_replies === 1 ? ( + + + + + Adjuntar archivo + + + ) : null}