From 09bc22f60b566153b8ac27b08b320fdb44fc780d Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 15 Dec 2020 01:46:23 -0500 Subject: [PATCH] Improve style and responsiveness of event entry in taskDetail --- tasks/templates/tasks/taskDetail.djhtml | 42 ++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/tasks/templates/tasks/taskDetail.djhtml b/tasks/templates/tasks/taskDetail.djhtml index 8509f86..43b2801 100644 --- a/tasks/templates/tasks/taskDetail.djhtml +++ b/tasks/templates/tasks/taskDetail.djhtml @@ -1,5 +1,7 @@ {% extends "base.djhtml" %} +{% load widget_tweaks %} + {% block title %} {{ tool.name }} - {{ task.name }} | RecMaint {% endblock %} {% block content %} @@ -18,11 +20,32 @@ {% endif %} -
- {% csrf_token %} - {{ form }} - -
+ {% if form.errors %} +
+

Error:

+ {{ form.errors }} +
+ {% endif %} + +
+

Log a Maintenance Event

+
+ {% csrf_token %} +
+ {{ form.date.label_tag }} + {% render_field form.date type="date" class="form-control" %} +
+
+ {{ form.user.label_tag }} + {% render_field form.user class="form-control" %} +
+
+ {{ form.notes.label_tag }} + {% render_field form.notes class="form-control form-control-sm" rows="2" %} +
+ +
+

Event Log

@@ -34,6 +57,15 @@ + + + {% csrf_token %} + + + + + + {% for event in events|dictsortreversed:"date" %}
{% render_field form.date type="date" class="form-control" %} {% render_field form.user class="form-control" style="width: initial;" %} {% render_field form.notes class="form-control form-control-sm" rows="2" %}
{{ event.date }}