summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-10-07 14:36:24 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-07 14:36:24 +0100
commitcdd5e5d9372a63f87827915448cae1cc692db08a (patch)
treeb26d04d1f61cf2fc0f46ee1aac38224582aa2ce8
parentc2b95c681b90a84f3ef8635211af280941d1c034 (diff)
Adds submit button to form and fix date-span in summary box of eng. detail
-rw-r--r--engagements/templates/engagements/engagement_detail.html5
-rw-r--r--engagements/templates/engagements/engagement_form.html3
-rw-r--r--engagements/templates/engagements/snippets/standard_form.html12
3 files changed, 14 insertions, 6 deletions
diff --git a/engagements/templates/engagements/engagement_detail.html b/engagements/templates/engagements/engagement_detail.html
index 3acabf6..fbf6735 100644
--- a/engagements/templates/engagements/engagement_detail.html
+++ b/engagements/templates/engagements/engagement_detail.html
@@ -81,7 +81,10 @@
<path stroke-linecap="round" stroke-linejoin="round"
d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"/>
</svg>
- <span class="text-black">Tuesday - 10 May 2022</span>
+ <span class="text-black">{{ engagement.proposed_start_date|date:'j M Y' }}</span>
+ {% if engagement.proposed_end_date != engagement.proposed_start_date %}
+ - {{ engagement.proposed_end_date|date:'j M Y' }}
+ {% endif %}
</div>
<!-- Site/Operation -->
diff --git a/engagements/templates/engagements/engagement_form.html b/engagements/templates/engagements/engagement_form.html
index 0b5cd8b..4f04f5e 100644
--- a/engagements/templates/engagements/engagement_form.html
+++ b/engagements/templates/engagements/engagement_form.html
@@ -33,8 +33,7 @@
<!--Include the standard form here-->
{% include "engagements/snippets/standard_form.html" with form=form %}
-
</div>
</div>
</div>
-{% endblock content %}
+ {% endblock content %}
diff --git a/engagements/templates/engagements/snippets/standard_form.html b/engagements/templates/engagements/snippets/standard_form.html
index fb419c2..0756242 100644
--- a/engagements/templates/engagements/snippets/standard_form.html
+++ b/engagements/templates/engagements/snippets/standard_form.html
@@ -2,8 +2,8 @@
<div class="mt-8 mx-auto border p-6 bg-white shadow-md rounded-lg">
<h4 class="text-xl font-semibold mb-1">Enter main details:</h4>
- <div class="px-2 pt-1 sm:p-2">
- <form method="post" class="space-y-6">
+ <div class="px-2 pt-1 sm:p-2">
+ <form method="post" class="space-y-6">
{% csrf_token %}
{% for field in form %}
<div>
@@ -21,5 +21,11 @@
{% endif %}
</div>
{% endfor %}
- </div>
+ <div>
+ <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
+ Submit
+ </button>
+ </div>
+ </form>
+ </div>
</div>