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 &&
+ );
+}
+
+export default TicketCommentForm;
\ No newline at end of file
diff --git a/src/components/page/ticket/Comments.jsx b/src/components/page/ticket/Comments.jsx
index 1ed28ff..54f6dc2 100644
--- a/src/components/page/ticket/Comments.jsx
+++ b/src/components/page/ticket/Comments.jsx
@@ -2,7 +2,7 @@ import IconLoader from "../../IconLoader"
import FieldData from "../../../functions/FieldData"
import { useEffect, useState } from "react"
import { apiFetch } from "../../../hooks/apiFetch"
-import TicketComment from "./Comment"
+import TicketCommentForm from "./Comment"
@@ -290,17 +290,19 @@ const TicketComments = ({
))}
-
+
}
-
-
);
}
diff --git a/src/index.css b/src/index.css
index 0b7e196..46d0ab4 100644
--- a/src/index.css
+++ b/src/index.css
@@ -507,7 +507,40 @@ div.ticket .contents {
border-style: solid;
}
-.ticket .comment hr {
+
+.ticket .comment-form {
+ background-color: var(--background-colour-active);
+ border-style: solid;
+ border-width: 1px;
+ display: block;
+ padding: 0px;
+}
+
+.ticket .comment-form form fieldset span.help-text {
+ font-size:xx-small;
+}
+
+.ticket .comment-form form fieldset {
+ border: none;
+ display: inline-block;
+ margin: auto;
+ width: auto;
+}
+
+
+.ticket .comment-form form fieldset.fieldset-tester {
+ display: flex;
+ padding: 1px;
+}
+
+
+.ticket .comment-form form textarea {
+ height: 200px;
+ margin: 5px;
+ width: 100%;
+}
+
+.ticket hr {
border: none;
border-bottom: 1px solid var(--border-colour-form-field);
margin: 0px 5px;
@@ -531,6 +564,7 @@ div.ticket .contents {
width: 20px;
}
+
.ticket .comment-type-default {
border-color: var(--background-colour-ticket-comment-default);
}
@@ -606,6 +640,7 @@ div.ticket .contents {
width: 200px;
}
+.ticket .comment-form fieldset,
.ticket .comment fieldset {
border: none;
color: var(--text-colour);
@@ -615,12 +650,14 @@ div.ticket .contents {
font-size: 10pt;
}
+.ticket .comment-form fieldset label,
.ticket .comment fieldset label {
display: block;
+ font-size: inherit;
font-weight: bold;
line-height: inherit;
}
-
+.ticket .comment-form fieldset span
.ticket .comment fieldset span {
display: block;
line-height: inherit;
@@ -1161,11 +1198,11 @@ p.table-pagination span.table-pagination-button {
cursor: pointer;
}
-.content form {
+form {
display: flexbox;
}
-.content form fieldset {
+form fieldset {
border: none;
display: flexbox;
margin: auto;
@@ -1173,19 +1210,19 @@ p.table-pagination span.table-pagination-button {
width: fit-content;
}
-.content form fieldset label.name {
+form fieldset label.name {
display: block;
font-size: 11pt;
padding-bottom: 5px;
}
-.content form fieldset span.error-text {
+form fieldset span.error-text {
display: block;
color: var(--text-colour-error);
font-size: 10pt;
}
-.content form fieldset span.help-text {
+form fieldset span.help-text {
display: block;
color: var(--text-colour-help);
font-size: 10pt;
@@ -1211,17 +1248,17 @@ input.common-field {
}
-.content form fieldset textarea {
+form fieldset textarea {
border-color: var(--border-colour-form-field);
}
-.content form fieldset input:invalid,
-.content form fieldset select:invalid,
-.content form fieldset textarea:invalid {
+form fieldset input:invalid,
+form fieldset select:invalid,
+form fieldset textarea:invalid {
border: 1px solid var(--border-colour-error);
}
-.content form fieldset select {
+form fieldset select {
border-color: var(--border-colour-form-field);
height: 30px;
}
@@ -1236,7 +1273,7 @@ button.form {
padding: 0px 20px;
}
-.content form button.inverse {
+form button.inverse {
background-color: var(--background-colour-active);
color: var(--contrasting-colour);
}
diff --git a/src/layout/Ticket.jsx b/src/layout/Ticket.jsx
index c7cbbc6..59f5c63 100644
--- a/src/layout/Ticket.jsx
+++ b/src/layout/Ticket.jsx
@@ -7,6 +7,7 @@ import Badge from "../components/Badge";
import { ResponseException } from "../classes/Exceptions";
import TicketComments from "../components/page/ticket/Comments";
import { apiFetch } from "../hooks/apiFetch";
+import TicketCommentForm from "../components/page/ticket/Comment";
@@ -110,6 +111,12 @@ const Ticket = () => {
)
})}
+
+
+