diff options
author | Julian Jørgensen <julian@jtle.dk> | 2024-05-25 11:53:43 +0200 |
---|---|---|
committer | Julian Jørgensen <julian@jtle.dk> | 2024-05-25 11:53:43 +0200 |
commit | 2610f9b67e4a915859c029da9b17e9d262b6564e (patch) | |
tree | 4504bf2d995703f583fff199b1ae7e54eef4e432 /templates/parts/task.html | |
parent | 6cdd02af0684500b5376d4d4a08feb796fdaf889 (diff) |
Add task ui and editingold
Diffstat (limited to 'templates/parts/task.html')
-rw-r--r-- | templates/parts/task.html | 18 |
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> |