|
1 | 1 | import React from "react"; |
| 2 | +import ListGroup from "react-bootstrap/ListGroup"; |
| 3 | +import Row from "react-bootstrap/Row"; |
| 4 | +import Col from "react-bootstrap/Col"; |
| 5 | +import Card from "react-bootstrap/Card"; |
| 6 | +import Form from "react-bootstrap/Form"; |
| 7 | +import ToggleButton from "react-bootstrap/ToggleButton"; |
2 | 8 |
|
3 | 9 | export class CreateTicketForm extends React.Component { |
4 | 10 |
|
| 11 | + constructor() { |
| 12 | + super(); |
| 13 | + this.state = { |
| 14 | + relateToForm: false, |
| 15 | + relateToFormVersion: false, |
| 16 | + relateToQuestion: false |
| 17 | + } |
| 18 | + } |
| 19 | + |
5 | 20 | render() { |
6 | | - return <div/>; |
| 21 | + |
| 22 | + return <Card> |
| 23 | + <ListGroup variant="flush"> |
| 24 | + <ListGroup.Item> |
| 25 | + <div> |
| 26 | + <Row> |
| 27 | + <Col> |
| 28 | + <div> |
| 29 | + <Form.Group controlId="ticketName"> |
| 30 | + <Form.Label>Name</Form.Label> |
| 31 | + <Form.Control type="text" placeholder="ticket name"/> |
| 32 | + </Form.Group> |
| 33 | + <Form.Group controlId="ticketName"> |
| 34 | + <Form.Label>Description</Form.Label> |
| 35 | + <Form.Control as="textarea" |
| 36 | + placeholder="ticket description" |
| 37 | + name="ticketDescription" rows={3} |
| 38 | + onChange={this.onChangeSetState}/> |
| 39 | + </Form.Group> |
| 40 | + <ToggleButton variant="light" style={{marginBottom: "0"}} type="checkbox" |
| 41 | + checked={this.state.relateToForm} |
| 42 | + value="1" |
| 43 | + onChange={e => this.setState({relateToForm: e.currentTarget.checked})}> |
| 44 | + {' '} Relate to form |
| 45 | + </ToggleButton> |
| 46 | + {' '} |
| 47 | + <ToggleButton variant="light" style={{marginBottom: "0"}} type="checkbox" |
| 48 | + checked={this.state.relateToFormVersion} |
| 49 | + value="1" |
| 50 | + onChange={e => this.setState({relateToFormVersion: e.currentTarget.checked})}> |
| 51 | + {' '} Relate to form version |
| 52 | + </ToggleButton> |
| 53 | + {' '} |
| 54 | + <ToggleButton variant="light" style={{marginBottom: "0"}} type="checkbox" |
| 55 | + checked={this.state.relateToQuestion} |
| 56 | + value="1" |
| 57 | + onChange={e => this.setState({relateToQuestion: e.currentTarget.checked})}> |
| 58 | + {' '} Relate to question (origin path) |
| 59 | + </ToggleButton> |
| 60 | + <br/> |
| 61 | + {/*<Form.Group controlId="questionOrigin">*/} |
| 62 | + {/* <Form.Label>Question-Origin</Form.Label>*/} |
| 63 | + {/* <Form.Control as="text"*/} |
| 64 | + {/* placeholder={"question origin path"}*/} |
| 65 | + {/* name="questionOriginPath" // TODO: DAG select*/} |
| 66 | + {/* onChange={this.onChangeSetState}/>*/} |
| 67 | + {/*</Form.Group>*/} |
| 68 | + </div> |
| 69 | + </Col> |
| 70 | + </Row> |
| 71 | + </div> |
| 72 | + </ListGroup.Item> |
| 73 | + </ListGroup> |
| 74 | + </Card>; |
7 | 75 | } |
8 | 76 |
|
9 | 77 | } |
0 commit comments