Files
myep-team/templates/administrative/questionnaire/test.html.twig
T

60 lines
2.4 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}{{ definition.title }} (Testmodus){% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-4">
{{ definition.title }}
</h1>
{% include '_partials/_alert.html.twig' with {
'type': 'warning',
'message': 'Testmodus: Der Fragebogen verhält sich wie für Teamer:innen, es wird aber nichts gespeichert.'
} %}
{% if not assignment.hasBusEscort %}
{% include '_partials/_alert.html.twig' with {
'type': 'info',
'message': 'Dieser Einsatz hat keine Busbegleitung. Teamer:innen bekommen den Fragebogen hier nicht.'
} %}
{% endif %}
<div class="grid lg:grid-cols-3 gap-8 items-start">
<div class="lg:col-span-2">
{% if submitted is not null %}
{% include '_partials/_alert.html.twig' with {
'type': 'success',
'message': 'So würde der abgeschickte Fragebogen gespeichert. Ausgeblendete Fragen fallen dabei weg.'
} %}
{% include 'questionnaire/_answers.html.twig' with { 'answers': submitted } %}
<div class="pt-8">
<a href="{{ path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'r': app.request.query.get('r') }) }}" class="btn btn--secondary">
Erneut testen
</a>
</div>
{% else %}
{% if definition.description %}
<p class="pb-8 text-gray-700">
{{ definition.description|nl2br }}
</p>
{% endif %}
{% if draft %}
{% include '_partials/_alert.html.twig' with {
'type': 'success',
'message': 'Der Entwurf wäre jetzt gespeichert. Im Testmodus bleiben die Angaben nur im Formular.'
} %}
{% endif %}
{% include 'questionnaire/_form.html.twig' %}
{% endif %}
</div>
<div>
<h2 class="text-lg font-bold pb-4">
Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' %}
<div class="pt-8">
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div>
</div>
{% endblock %}