67 lines
2.9 KiB
Twig
67 lines
2.9 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Fragebogen testen{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="max-w-3xl">
|
|
<h1 class="text-2xl font-bold pb-2">
|
|
Fragebogen testen
|
|
</h1>
|
|
{% include 'questionnaire/_assignment_summary.html.twig' %}
|
|
{% 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.'
|
|
} %}
|
|
{% set otherVariant = path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'bus_escort': busEscort ? 0 : 1, 'r': app.request.query.get('r') }) %}
|
|
{% embed '_partials/_alert.html.twig' with { 'type': 'info' } %}
|
|
{% block message %}
|
|
{% if busEscort %}
|
|
Mit dem Bus-Feedback, wie bei einer Busbegleitung.
|
|
{% else %}
|
|
Ohne das Bus-Feedback, wie bei einem Einsatz ohne Busbegleitung.
|
|
{% endif %}
|
|
{% if busEscort != assignment.hasBusEscort %}
|
|
Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung.
|
|
{% endif %}
|
|
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback testen</a>
|
|
{% endblock %}
|
|
{% endembed %}
|
|
|
|
{% 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.'
|
|
} %}
|
|
<div class="flex flex-col gap-y-12">
|
|
{% for item in submitted %}
|
|
<section>
|
|
<h2 class="text-2xl font-bold pb-4">
|
|
{{ item.definition.title }}
|
|
</h2>
|
|
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %}
|
|
</section>
|
|
{% endfor %}
|
|
</div>
|
|
<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 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 class="pt-8">
|
|
<a href="{{ returnUrl }}" class="underline">
|
|
zurück
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|