diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-16 17:23:14 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-16 17:23:14 +0100 |
commit | 1c7d45e92f83263a202d2f72c9daac61d34619cd (patch) | |
tree | ad62f6f4bda17055d29e6bd36ace9c511f7fa29c /engagements/templates | |
parent | 8946e0f171379078c5a2230f38cf47f245e9b841 (diff) |
wip: create assessment form
Diffstat (limited to 'engagements/templates')
-rw-r--r-- | engagements/templates/engagements/eng_forms/assessment_create.html | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/engagements/templates/engagements/eng_forms/assessment_create.html b/engagements/templates/engagements/eng_forms/assessment_create.html new file mode 100644 index 0000000..1b87711 --- /dev/null +++ b/engagements/templates/engagements/eng_forms/assessment_create.html @@ -0,0 +1,104 @@ +{% extends "core/base.html" %} +{% load widget_tweaks %} + +{% block title %}Create new Assessment{% endblock title %} + +{% block content %} + +<div class="container mx-auto max-w-2xl mt-8"> + <div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 relative"> + <a href="{{ request.META.HTTP_REFERER }}" class="absolute top-2 right-2 p-1 rounded-full hover:bg-gray-200 transition-colors duration-200"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" + stroke="currentColor" class="w-6 h-6"> + <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/> + </svg> + </a> + <h2 class="text-2xl font-bold mb-6">Create new Assessment</h2> + <div class="bg-blue-50 border border-blue-200 rounded-md p-4 mb-6"> + <p class="text-sm text-blue-800"> + Please fill out the form below to create a new Assessment in the Engagement Plan. + </p> + </div> + <div class="flex items-end justify-end"> + <p><a class="text-sm font-semibold underline text-blue-800" href="#">Help</a></p> + </div> + + <form method="post" class="space-y-6"> + {% csrf_token %} + {% for field in form %} + <div class="my-2"> + <div> + <label for="{{ field.id_for_label }}" class="block text-sm font-bold text-gray-700 mb-2"> + {{ field.label }} + </label> + </div> + <div> + {% 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 %} + </div> + {% if field.help_text %} + <div class="flex items-end mb-2"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" + stroke-width="1.0" stroke="currentColor" class="size-4 text-gray-500 mr-2"> + <path stroke-linecap="round" stroke-linejoin="round" + d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"/> + </svg> + <p class="mt-2 text-xs text-gray-500">{{ field.help_text }}</p> + </div> + {% endif %} + </div> + {% endfor %} + <div class="mt-6"> + <button type="submit" + class="w-full py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> + Submit + </button> + </div> + </form> + + </div> +</div> + + + + + +<!-- <div class="container mx-auto px-4 py-8"> --> +<!-- <div class="bg-white shadow-md rounded-lg overflow-hidden"> --> +<!-- <header class="bg-blue-100 p-4"> --> +<!-- <h2 class="text-3xl font-bold text-center">{{ title }}</h2> --> +<!-- </header> --> +<!-- <div class="p-6"> --> +<!-- <div class="mt-8"> --> +<!-- <h4 class="text-xl font-semibold mb-4">Enter main details:</h4> --> +<!-- <form method="post" class="space-y-6"> --> +<!-- {% csrf_token %} --> +<!-- {% for field in form %} --> +<!-- <div> --> +<!-- <label for="{{ field.id_for_label }}" class="block text-sm font-medium text-gray-700"> --> +<!-- {{ field.label }} --> +<!-- </label> --> +<!-- <div class="mt-1"> --> +<!-- {{ field }} --> +<!-- </div> --> +<!-- {% if field.help_text %} --> +<!-- <p class="mt-2 text-sm text-gray-500">{{ field.help_text|safe }}</p> --> +<!-- {% endif %} --> +<!-- {% for error in field.errors %} --> +<!-- <p class="mt-2 text-sm text-red-600">{{ error }}</p> --> +<!-- {% endfor %} --> +<!-- </div> --> +<!-- {% endfor %} --> +<!-- <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> --> +{% endblock content %} |