diff options
Diffstat (limited to 'web/templates/partials/task-detail.html')
| -rw-r--r-- | web/templates/partials/task-detail.html | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/web/templates/partials/task-detail.html b/web/templates/partials/task-detail.html index 135c38f..abcc5b9 100644 --- a/web/templates/partials/task-detail.html +++ b/web/templates/partials/task-detail.html @@ -1,15 +1,28 @@ {{define "task-detail"}} <div class="p-4"> - <h3 class="font-semibold text-white 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-white/70 mb-1">Title</label> + <input type="text" name="title" value="{{.Title}}" required + class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm font-semibold text-white placeholder-white/50 mb-3"> <label class="block text-sm font-medium text-white/70 mb-1">Description</label> <textarea name="description" class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-white/50 mb-3 h-32">{{.Description}}</textarea> <button type="submit" class="w-full bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg text-sm font-medium">Save</button> </form> {{if .IsDoot}} + <button type="button" + class="w-full mt-3 bg-red-500/10 hover:bg-red-500/20 text-red-300 px-4 py-2 rounded-lg text-sm font-medium" + hx-delete="/tasks/{{.ID}}?source={{.Source}}" + hx-confirm="Delete this task? This can't be undone." + hx-swap="none" + hx-on::after-request="if(event.detail.successful) { closeTaskModal(); htmx.trigger(document.body, 'refresh-tasks'); }"> + Delete Task + </button> + {{end}} + + {{if .IsDoot}} <div class="mt-4 pt-4 border-t border-white/10"> <h4 class="text-sm font-medium text-white/70 mb-2">Recurrence</h4> {{if .RecurrenceFreq}} |
