<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\MacroNamespace;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* step3.html.twig */
class __TwigTemplate_792dc538baddc3e4e4ab1a17c6569428 extends Template
{
private Source $source;
/**
* @var array<string, MacroNamespace>
*/
private array $macros = [];
private \Twig\Runtime\EscaperRuntime $escaper;
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "step3.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "step3.html.twig"));
// line 1
$macros["͜macros"] = $this->macros["͜macros"] = $this->load("macros.html.twig", 1)->unwrap()->getMacroNamespace();
// line 2
yield "
<div class=\"bs5-col-lg-12 notification-form__border--bottom notification-form__expanded\" data-view-variants-disabled=\"3\" style=\"display: none;\">
<div class=\"notification-form__item bs5-w-100\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon group notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Świadkowie zdarzenia (w przypadku szkody z winy innego uczestnika ruchu - szkoda z OC sprawcy)</h6>
</div>
<div class=\"witnesses-container\" data-prototype=\"";
// line 10
yield (string) $this->escaper->escape(($macros["͜macros"] ?? $this->throwUninitializedMacroNamespace(10))->call("witness", ["__name__", (isset($context["areaCodes"]) || array_key_exists("areaCodes", $context) ? $context["areaCodes"] : (function () { throw new RuntimeError('Variable "areaCodes" does not exist.', 10, $this->source); })())], $context, 10, $this->source));
yield "\">
";
// line 11
if ((array_key_exists("caseData", $context) && CoreExtension::inFilter("witnesses", Twig\Extension\CoreExtension::keys((isset($context["caseData"]) || array_key_exists("caseData", $context) ? $context["caseData"] : (function () { throw new RuntimeError('Variable "caseData" does not exist.', 11, $this->source); })()))))) {
// line 12
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["caseData"]) || array_key_exists("caseData", $context) ? $context["caseData"] : (function () { throw new RuntimeError('Variable "caseData" does not exist.', 12, $this->source); })()), "witnesses", [], "array", false, false, false, 12));
foreach ($context['_seq'] as $context["key"] => $context["witness"]) {
// line 13
yield " ";
$context["fkey"] = ("witness_" . $context["key"]);
// line 14
yield " ";
yield (string) ($macros["͜macros"] ?? $this->throwUninitializedMacroNamespace(14))->call("witness", [$context["key"], (isset($context["areaCodes"]) || array_key_exists("areaCodes", $context) ? $context["areaCodes"] : (function () { throw new RuntimeError('Variable "areaCodes" does not exist.', 14, $this->source); })()), $context["witness"], !CoreExtension::getAttribute($this->env, $this->source, ($context["fields"] ?? null), (isset($context["fkey"]) || array_key_exists("fkey", $context) ? $context["fkey"] : (function () { throw new RuntimeError('Variable "fkey" does not exist.', 14, $this->source); })()), [], "array", true, true, false, 14)], $context, 14, $this->source);
yield "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['key'], $context['witness'], $context['_parent']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 16
yield " ";
} elseif (((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 16, $this->source); })()) == "create")) {
// line 17
yield " ";
yield (string) ($macros["͜macros"] ?? $this->throwUninitializedMacroNamespace(17))->call("witness", [0, (isset($context["areaCodes"]) || array_key_exists("areaCodes", $context) ? $context["areaCodes"] : (function () { throw new RuntimeError('Variable "areaCodes" does not exist.', 17, $this->source); })())], $context, 17, $this->source);
yield "
";
} else {
// line 19
yield " <div class=\"bs5-row\">
<div class=\"bs5-col-12 bs5-col-lg-8 bs5-form-group form__group--space-small\">
<div class=\"data-ready\">Brak informacji o świadkach zdarzenia.</div>
</div>
</div>
";
}
// line 25
yield " </div>
";
// line 26
if ((((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 26, $this->source); })()) == "create") || (($tmp = (isset($context["addWitness"]) || array_key_exists("addWitness", $context) ? $context["addWitness"] : (function () { throw new RuntimeError('Variable "addWitness" does not exist.', 26, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp))) {
// line 27
yield " <div class=\"bs5-col-12 bs5-form-group form__group bs5-mb-0\">
<div class=\"form__btn notification-form__btn-add\">
<div class=\"bs5-d-flex bs5-align-items-center bs5-justify-content-between\" onclick=\"addWitness();\">
<i class=\"glyphicon plus\"></i>
<span>Dodaj świadka zdarzenia</span>
</div>
</div>
</div>
";
}
// line 36
yield " </div>
</div>
</div>
";
// line 40
if ((((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 40, $this->source); })()) == "create") || CoreExtension::getAttribute($this->env, $this->source, ($context["fields"] ?? null), "attachments", [], "array", true, true, false, 40))) {
// line 41
yield " <div class=\"bs5-col-lg-12 notification-form__border--bottom notification-form__expanded\" data-view-variants-disabled=\"1,2,3\" style=\"display: none;\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon paperclip notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Załączniki</h6>
</div>
<div class=\"bs5-row attachments-container\">
";
// line 48
yield from $this->load("attachments.html.twig", 48)->unwrap()->yield($context);
// line 49
yield " </div>
</div>
</div>
";
}
// line 53
if (((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 53, $this->source); })()) == "update")) {
// line 54
yield " <div class=\"bs5-col-lg-12 notification-form__border--bottom\">
<div class=\"notification-form__item bs5-w-100\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon cars notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Komentarz dla operatora</h6>
</div>
<div class=\"bs5-row bs5-mb-2 bs5-pb-2\">
<div class=\"bs5-col-12 bs5-form-group form__group--space-small\">
<textarea name=\"form[empty_data_comment]\" class=\"bs5-form-control form__control form__control--medium-size form__control--border-dark\" rows=\"5\" placeholder=\"Wpisz komentarz dla operatora\"></textarea>
</div>
</div>
</div>
</div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield;
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "step3.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDefaultEscapeStrategy(): string|false
{
return "html";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 149 => 54, 147 => 53, 141 => 49, 139 => 48, 130 => 41, 128 => 40, 122 => 36, 111 => 27, 109 => 26, 106 => 25, 98 => 19, 92 => 17, 89 => 16, 79 => 14, 76 => 13, 71 => 12, 69 => 11, 65 => 10, 55 => 2, 53 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% import \"macros.html.twig\" as macros %}
<div class=\"bs5-col-lg-12 notification-form__border--bottom notification-form__expanded\" data-view-variants-disabled=\"3\" style=\"display: none;\">
<div class=\"notification-form__item bs5-w-100\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon group notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Świadkowie zdarzenia (w przypadku szkody z winy innego uczestnika ruchu - szkoda z OC sprawcy)</h6>
</div>
<div class=\"witnesses-container\" data-prototype=\"{{ macros.witness(\x27__name__\x27, areaCodes)|e }}\">
{% if caseData is defined and \x27witnesses\x27 in caseData|keys %}
{% for key, witness in caseData[\x27witnesses\x27] %}
{% set fkey = \x27witness_\x27 ~ key %}
{{ macros.witness(key, areaCodes, witness, fields[fkey] is not defined) }}
{% endfor %}
{% elseif mode == \x27create\x27 %}
{{ macros.witness(0, areaCodes) }}
{% else %}
<div class=\"bs5-row\">
<div class=\"bs5-col-12 bs5-col-lg-8 bs5-form-group form__group--space-small\">
<div class=\"data-ready\">Brak informacji o świadkach zdarzenia.</div>
</div>
</div>
{% endif %}
</div>
{% if mode == \x27create\x27 or addWitness %}
<div class=\"bs5-col-12 bs5-form-group form__group bs5-mb-0\">
<div class=\"form__btn notification-form__btn-add\">
<div class=\"bs5-d-flex bs5-align-items-center bs5-justify-content-between\" onclick=\"addWitness();\">
<i class=\"glyphicon plus\"></i>
<span>Dodaj świadka zdarzenia</span>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% if mode == \x27create\x27 or fields[\x27attachments\x27] is defined %}
<div class=\"bs5-col-lg-12 notification-form__border--bottom notification-form__expanded\" data-view-variants-disabled=\"1,2,3\" style=\"display: none;\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon paperclip notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Załączniki</h6>
</div>
<div class=\"bs5-row attachments-container\">
{% include \x27attachments.html.twig\x27 %}
</div>
</div>
</div>
{% endif %}
{% if mode == \x27update\x27 %}
<div class=\"bs5-col-lg-12 notification-form__border--bottom\">
<div class=\"notification-form__item bs5-w-100\">
<div class=\"notification-form__space\">
<div class=\"bs5-d-flex bs5-align-items bs5-mb-4\">
<i class=\"glyphicon cars notification-form__icon\"></i>
<h6 class=\"notification-form__subtitle\">Komentarz dla operatora</h6>
</div>
<div class=\"bs5-row bs5-mb-2 bs5-pb-2\">
<div class=\"bs5-col-12 bs5-form-group form__group--space-small\">
<textarea name=\"form[empty_data_comment]\" class=\"bs5-form-control form__control form__control--medium-size form__control--border-dark\" rows=\"5\" placeholder=\"Wpisz komentarz dla operatora\"></textarea>
</div>
</div>
</div>
</div>
</div>
{% endif %}", "step3.html.twig", "/www/inglease.serviceflow.pl/templates/step3.html.twig");
}
}