summaryrefslogtreecommitdiff
path: root/templates/parts/task.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/parts/task.html')
-rw-r--r--templates/parts/task.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/parts/task.html b/templates/parts/task.html
new file mode 100644
index 0000000..a366dcf
--- /dev/null
+++ b/templates/parts/task.html
@@ -0,0 +1,18 @@
+<form id="taskForm" autocomplete="off">
+ {{if gt .Task.Id -1}}
+ <label for="taskIdInput">Opgave: </label>
+ <input name="id" class="short" type="text" readonly value="{{.Task.Id}}" />
+ <button hx-get="/task/empty" hx-trigger="click" hx-target="#taskForm" hx-swap="outerHTML">X</button><br>
+ {{end}}
+ <div class="flex dir-column">
+ <input type="text" name="text" value="{{.Task.Text}}" />
+ <div class="flex just-space-between">
+ <div>
+ <label for="taskGroupInput">Gruppe: </label>
+ <input name="group" id="taskGroupInput" {{if .Task.Group}}value="{{.Task.Group}}"{{end}} type="text" />
+ </div>
+ <input class="short" name="ident" type="text" {{if .Task.Ident}}value="{{.Task.Ident}}"{{end}} />
+ </div>
+ </div>
+ <button hx-post="/task/save" hx-trigger="click" hx-target="#taskForm" hx-swap="outerHTML">Save</button>
+</form>