Files
myep-team/templates/teamer/questionnaire/edit.html.twig
T

43 lines
1.7 KiB
Twig

{% extends 'teamer/layout.html.twig' %}
{% block title %}{{ definition.title }}{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-4">
{{ definition.title }}
</h1>
{% if definition.description %}
<p class="pb-8 text-gray-700">
{{ definition.description|nl2br }}
</p>
{% endif %}
<div class="grid lg:grid-cols-3 gap-8 items-start">
<div class="lg:col-span-2">
{{ form_start(form, { attr: { 'data-controller': 'questionnaire', 'data-action': 'change->questionnaire#update' } }) }}
{% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %}
{{ form_row(child) }}
{% endfor %}
<div class="flex flex-wrap items-center gap-4 pt-4">
{{ form_widget(form.submit, { attr: { class: 'btn' } }) }}
{{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }}
</div>
<p class="pt-2 text-sm text-gray-500">
Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen.
Abgeschickt ist er endgültig.
</p>
{{ form_end(form) }}
</div>
<div>
<h2 class="text-lg font-bold pb-4">
Dein Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' with { 'assignment': disposition.assignment } %}
{% if response %}
<p class="pt-6 text-sm text-gray-500">
Entwurf zuletzt gespeichert am {{ (response.updatedAt ?? response.createdAt)|date('d.m.Y, H:i') }} Uhr
</p>
{% endif %}
</div>
</div>
{% endblock %}