summaryrefslogtreecommitdiff
path: root/web/templates/partials/task-detail.html
blob: ace604f00e301694f8a7cbe6be2b58c7ee78d42f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{define "task-detail"}}
<div class="p-4">
    <h3 class="font-semibold text-gray-900 mb-3">{{.Title}}</h3>
    <form hx-post="/tasks/update" hx-swap="none" hx-on::after-request="if(event.detail.successful) { closeTaskModal(); htmx.trigger(document.body, 'refresh-tasks'); }">
        <input type="hidden" name="id" value="{{.ID}}">
        <input type="hidden" name="source" value="{{.Source}}">
        <label class="block text-sm font-medium text-gray-700 mb-1">Description</label>
        <textarea name="description" class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm mb-3 h-32">{{.Description}}</textarea>
        <button type="submit" class="w-full bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg text-sm font-medium">Save</button>
    </form>
</div>
{{end}}