From 89eed2aaa438ca0c0db8d11692dee22e1825d493 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 5 Sep 2024 11:26:32 +0100 Subject: wip: Improved form for adding engagement components - travel, planning, regulation and reporting forms look a bit nicer --- .../engagements/engagement_effort_create.html | 86 ++++++++++++++++------ 1 file changed, 62 insertions(+), 24 deletions(-) (limited to 'engagements') diff --git a/engagements/templates/engagements/engagement_effort_create.html b/engagements/templates/engagements/engagement_effort_create.html index b776fd8..86deb2c 100644 --- a/engagements/templates/engagements/engagement_effort_create.html +++ b/engagements/templates/engagements/engagement_effort_create.html @@ -1,34 +1,72 @@ {% extends "core/base.html" %} +{% load widget_tweaks %} {% block title %}Add {{ etype }} effort to Engagement{% endblock title %} {% block content %} -
-
-

Register your {{ etype|lower }} effort for the {{ engagement.engagement_type.name|title }} event

-

{{ engagement.external_party }} on {{ engagement.proposed_start_date }}

- -
- {% csrf_token %} - {% for field in form %} -
- - {{ field }} - {% if field.help_text %} -

{{ field.help_text }}

- {% endif %} -
- {% endfor %} -
- +
+
+ + +
+
+

Register your {{ etype|lower }} effort for + the {{ engagement.engagement_type.name|title }} event

+
+ + + + +

{{ engagement.external_party }}

- + +
+ + + +

+ {% if engagement.proposed_start_date == engagement.proposed_end_date %} + {{ engagement.proposed_start_date|date:"j M Y" }} + {% else %} + {{ engagement.proposed_start_date|date:"j M Y" }} - {{ engagement.proposed_end_date|date:"j M Y" }} + {% endif %} +

+
+ +
+ {% csrf_token %} + {% for field in form %} +
+
+ +
+
+ {% render_field field class+="block w-full rounded-md border-0 p-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %} + {% for error in field.errors %} + {{ field }} + {% endfor %} +
+ {% if field.help_text %} +

{{ field.help_text }}

+ {% endif %} +
+ {% endfor %} +
+ +
+
+
-
{% endblock content %} -- cgit v1.2.3