summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-12 12:07:23 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-14 14:35:17 +0100
commit5a0e7e87814c395328d335f20a43600ae133dc96 (patch)
tree7451f3174152e0a679def27763d5041decde098a
parent71b40f365512cf429e679c3ec7912b0374a894ce (diff)
Adds the snippet file missing from the last commit
-rw-r--r--engagements/templates/engagements/snippets/standard_form.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/engagements/templates/engagements/snippets/standard_form.html b/engagements/templates/engagements/snippets/standard_form.html
new file mode 100644
index 0000000..fb419c2
--- /dev/null
+++ b/engagements/templates/engagements/snippets/standard_form.html
@@ -0,0 +1,25 @@
+{% load widget_tweaks %}
+
+<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">
+ {% csrf_token %}
+ {% for field in form %}
+ <div>
+ {{ field.label_tag }}&nbsp;{% if field.field.required %}<span class="text-red-500">*</span>{% endif %}
+ <div class="my-2">
+ {% 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 %}
+ <p class="text-red-500 text-sm">{{ error }}</p>
+ {% endfor %}
+ </div>
+ {% if field.help_text %}
+ <div>
+ <p class="text-xs px-1">{{ field.help_text }}</p>
+ </div>
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+</div>