summaryrefslogtreecommitdiff
path: root/templates/parts/task.html
blob: a366dcf5c4637a152665168525694a29b13841b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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>