diff --git a/src/components/form/Textfield.jsx b/src/components/form/Textfield.jsx index 80ba000..a8ae764 100644 --- a/src/components/form/Textfield.jsx +++ b/src/components/form/Textfield.jsx @@ -7,6 +7,7 @@ const TextField = ({ id = null, label = null, required = false, + type = 'text', value = '', onChange = null }) => { @@ -23,10 +24,27 @@ const TextField = ({ onChange={onChange} placeholder={helptext} required={required} - type="text" + type={type} value={value} /> ) + if( type === 'datetime-local') { + + field = ( + + ) + + } if( fieldset == true ) { diff --git a/src/components/page/ticket/Comment.jsx b/src/components/page/ticket/Comment.jsx new file mode 100644 index 0000000..6e098c2 --- /dev/null +++ b/src/components/page/ticket/Comment.jsx @@ -0,0 +1,207 @@ +import FieldData from "../../../functions/FieldData" +import TextArea from "../../form/Textarea" +import { Form } from "react-router-dom" +import Select from "../../form/Select" +import TextField from "../../form/Textfield" + + + +const TicketCommentForm = ({ + discussion = false, + comment_data = {}, + metadata = null, + post_url = null, + task_comment = false +}) => { + + console.log(post_url) + let comment_class = 'comment-type-default comment-form' + + let action_keyword = 'POST' + + if( 'PUT' in metadata.actions ) { + + action_keyword = 'PUT' + + } + + return ( + metadata &&
+
+ +
{ + e.preventDefault(); + } + } + > + +
+
+ + + +
} + {task_comment &&
+ + + +
} + { true &&
+ +