Files
fet2020/fet2020/templates/rental/create.html
2025-02-22 15:24:13 +01:00

113 lines
4.8 KiB
HTML

{% extends 'base.html' %}
{% block title %}Verleih Anfrage{% endblock %}
{% block content %}
<!-- Main Content -->
<main class="container mx-auto w-full px-4 my-8 flex-1">
<h1 class="page-title">Verleih Anfrage</h1>
<form action="" enctype="multipart/form-data" method="POST" class="multiSectionForm max-w-2xl">
{% csrf_token %}
{% include "baseform/non_field_errors.html" %}
<section>
<h2>Persönliche Daten</h2>
<small>Bitte geben Sie Ihre persönlichen Daten ein.</small>
<div class="grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-6">
<div class="sm:col-span-3">
{% include "baseform/text.html" with field=form.firstname %}
</div>
<div class="sm:col-span-3">
{% include "baseform/text.html" with field=form.surname %}
</div>
<div class="sm:col-span-3">
{% include "baseform/text.html" with field=form.organization %}
</div>
<div class="sm:col-span-3">
{% include "baseform/text.html" with field=form.matriculation_number %}
</div>
<div class="sm:col-span-3">
{% include "baseform/email.html" with field=form.email %}
</div>
<div class="sm:col-span-3">
{% include "baseform/text.html" with field=form.phone %}
</div>
</div>
</section>
<section>
<h2>Verleihgegenstände</h2>
<small>Wählen Sie die gewünschten Verleihgegenstände aus.</small>
<div class="grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-6 pb-6 col-span-full">
{% if form.rentalitems.errors %}
<div class="col-span-full alert alert-danger">
<div class="alert-body">{{ form.rentalitems.errors }}</div>
</div>
{% endif %}
<div id="{{ form.rentalitems.auto_id }}" class="col-span-full">
{% for elem in form.rentalitems %}
<div class="col-span-2 mb-2">
<label for="{{ elem.id_for_label }}">
<input
type="checkbox"
id="{{ elem.id_for_label }}"
name="{{ form.rentalitems.html_name }}"
value="{{ elem.data.value }}"
class="rounded border-gray-300 dark:border-none text-proprietary shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 dark:focus:ring-sky-700 focus:ring-opacity-50"
>
<span>{{ elem.choice_label }}</span>
</label>
{% for item in rentalitems_addinfo %}
{% if item.name == elem.choice_label and item.description %}
<p class="text-xs text-gray-700 dark:text-gray-200">{{ item.description }}</p>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
<div class="grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-6">
<div class="sm:col-span-3">
{% include "baseform/date.html" with field=form.date_start %}
</div>
<div class="sm:col-span-3">
{% include "baseform/date.html" with field=form.date_end %}
</div>
<div class="col-span-full">
{% include "baseform/textarea.html" with field=form.reason %}
</div>
</div>
</section>
<section>
<h2>Zusätzliche Informationen</h2>
<small>Hier können Sie zusätzliche Informationen, Anliegen und Sonstiges angeben.</small>
<div class="grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-6">
<div class="col-span-full">
{% include "baseform/textarea.html" with field=form.comment %}
</div>
</div>
</section>
<section>
<div class="grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-6">
<div class="col-span-full">
{% include "baseform/checkbox.html" with field=form.conformation %}
</div>
</div>
</section>
<section class="flex justify-end">
<button type="submit" class="btn btn-primary w-full sm:w-auto" value="Einreichen">Anfrage abschicken</button>
</section>
</form>
</main>
{% endblock content %}