diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-12 12:06:13 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-14 14:35:17 +0100 |
commit | 71b40f365512cf429e679c3ec7912b0374a894ce (patch) | |
tree | caf8e07cec9865b26f4397dcd83bef9cdbb42f5e /engagements/templates | |
parent | dcfe6d87098bbe064d2db268f0972865c3d412bf (diff) |
Moved Edit Engagement form to a template include
Diffstat (limited to 'engagements/templates')
-rw-r--r-- | engagements/templates/engagements/engagement_form.html | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/engagements/templates/engagements/engagement_form.html b/engagements/templates/engagements/engagement_form.html index 89f6b0e..0b5cd8b 100644 --- a/engagements/templates/engagements/engagement_form.html +++ b/engagements/templates/engagements/engagement_form.html @@ -30,67 +30,10 @@ </div> </div> - <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 %} - <div> - {{ form.external_party.label_tag }} - <div class="my-2"> - {% render_field form.external_party 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 form.external_party.errors %} - <p class="text-red-500 text-sm">{{ error }}</p> - {% endfor %} - </div> - </div> + <!--Include the standard form here--> + {% include "engagements/snippets/standard_form.html" with form=form %} - <div> - {{ form.proposed_start_date.label_tag }} - <div class="my-2"> - {% render_field form.proposed_start_date 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" %} - </div> - </div> - <div> - {{ form.proposed_end_date.label_tag }} - <div class="my-2"> - {% render_field form.proposed_end_date 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" %} - </div> - {% for error in form.proposed_end_date.errors %} - <p class="text-red-500 text-sm">{{ error }}</p> - {% endfor %} - </div> - - <div> - {{ form.engagement_type.label_tag }} - <div class="my-2"> - {% render_field form.engagement_type 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 form.engagement_type.errors %} - <p class="text-red-500 text-sm">{{ error }}</p> - {% endfor %} - </div> - </div> - - <div> - {{ form.officers.label_tag }} - <div class="my-2"> - {% render_field form.officers 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 form.officers.errors %} - <p class="text-red-500 text-sm">{{ error }}</p> - {% endfor %} - </div> - </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"> - Save - </button> - </div> - </form> - </div> - </div> </div> </div> </div> |