diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-12 12:07:23 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-12 12:07:23 +0100 |
commit | 7fa97be1538e3278fc46d5279907a0e062a80e9a (patch) | |
tree | 7451f3174152e0a679def27763d5041decde098a | |
parent | f1c3af915dcf2746dcd65082bf36a55fda6ee773 (diff) |
Adds the snippet file missing from the last commit
-rw-r--r-- | engagements/templates/engagements/snippets/standard_form.html | 25 |
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 }} {% 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> |