<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* activity/edit.html.twig */
class __TwigTemplate_41a3a7ae4a375c35f7cb99b065a177e1038d045af64e11b2e21f2200a7959069 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_actions' => [$this, 'block_page_actions'],
            'main' => [$this, 'block_main'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return $this->loadTemplate(((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 1), "xmlHttpRequest", [], "any", false, false, false, 1)) ? ("form.html.twig") : ("base.html.twig")), "activity/edit.html.twig", 1);
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("activity/actions.html.twig", "activity/edit.html.twig", 2)->unwrap();
        // line 1
        $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
    }

    // line 4
    public function block_page_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin_activity.title"), "html", null, true);
    }

    // line 5
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_activity", [($context["activity"] ?? null), "edit"], 5, $context, $this->getSourceContext());
    }

    // line 7
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 8
        echo "    ";
        $context["formEditTemplate"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 8), "xmlHttpRequest", [], "any", false, false, false, 8)) ? ("default/_form_modal.html.twig") : ("default/_form.html.twig"));
        // line 9
        echo "    ";
        $context["formOptions"] = ["title" => ((twig_get_attribute($this->env, $this->source,         // line 10
($context["activity"] ?? null), "name", [], "any", true, true, false, 10)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["activity"] ?? null), "name", [], "any", false, false, false, 10), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("create-activity", [], "actions"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("create-activity", [], "actions"))), "form" =>         // line 11
($context["form"] ?? null), "back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity")];
        // line 14
        echo "    ";
        $this->loadTemplate("activity/edit.html.twig", "activity/edit.html.twig", 14, "1963078221")->display(twig_array_merge($context, ($context["formOptions"] ?? null)));
    }

    public function getTemplateName()
    {
        return "activity/edit.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  76 => 14,  74 => 11,  73 => 10,  71 => 9,  68 => 8,  64 => 7,  57 => 5,  50 => 4,  46 => 1,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "activity/edit.html.twig", "/var/www/html/kimai2/templates/activity/edit.html.twig");
    }
}


/* activity/edit.html.twig */
class __TwigTemplate_41a3a7ae4a375c35f7cb99b065a177e1038d045af64e11b2e21f2200a7959069___1963078221 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'form_body' => [$this, 'block_form_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        return $this->loadTemplate(($context["formEditTemplate"] ?? null), "activity/edit.html.twig", 14);
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
    }

    // line 15
    public function block_form_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 16
        echo "            <div class=\"row\">
                <div class=\"col-md-10\">
                    ";
        // line 18
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "name", [], "any", false, false, false, 18), 'row');
        echo "
                </div>
                <div class=\"col-md-2\">
                    ";
        // line 21
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "color", [], "any", false, false, false, 21), 'row');
        echo "
                </div>
            </div>
            ";
        // line 24
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "comment", [], "any", false, false, false, 24), 'row');
        echo "
            ";
        // line 25
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "customer", [], "any", false, false, false, 25), 'row');
        echo "
            ";
        // line 26
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "project", [], "any", false, false, false, 26), 'row');
        echo "
            ";
        // line 27
        if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "budget", [], "any", true, true, false, 27)) {
            // line 28
            echo "            <div class=\"row\">
                <div class=\"col-md-6\">
                    ";
            // line 30
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "budget", [], "any", false, false, false, 30), 'row');
            echo "
                </div>
                <div class=\"col-md-6\">
                    ";
            // line 33
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "timeBudget", [], "any", false, false, false, 33), 'row');
            echo "
                </div>
            </div>
            ";
        }
        // line 37
        echo "            ";
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "visible", [], "any", false, false, false, 37), 'row');
        echo "
            ";
        // line 38
        if ((twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "metaFields", [], "any", true, true, false, 38) &&  !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "metaFields", [], "any", false, false, false, 38)))) {
            // line 39
            echo "                ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_sort_filter(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "metaFields", [], "any", false, false, false, 39), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["a"] ?? null), "vars", [], "any", false, false, false, 39), "data", [], "any", false, false, false, 39), "order", [], "any", false, false, false, 39) <=> twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["b"] ?? null), "vars", [], "any", false, false, false, 39), "data", [], "any", false, false, false, 39), "order", [], "any", false, false, false, 39)); }));
            foreach ($context['_seq'] as $context["_key"] => $context["meta"]) {
                // line 40
                echo "                    ";
                echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($context["meta"], 'row');
                echo "
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['meta'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 42
            echo "            ";
        }
        // line 43
        echo "            ";
        if ((twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "create_more", [], "any", true, true, false, 43) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 43), "xmlHttpRequest", [], "any", false, false, false, 43))) {
            // line 44
            echo "                <div class=\"hidden\">
                ";
            // line 45
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "create_more", [], "any", false, false, false, 45), 'row');
            echo "
                </div>
            ";
        }
        // line 48
        echo "            ";
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
        echo "
        ";
    }

    public function getTemplateName()
    {
        return "activity/edit.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  218 => 48,  212 => 45,  209 => 44,  206 => 43,  203 => 42,  194 => 40,  189 => 39,  187 => 38,  182 => 37,  175 => 33,  169 => 30,  165 => 28,  163 => 27,  159 => 26,  155 => 25,  151 => 24,  145 => 21,  139 => 18,  135 => 16,  131 => 15,  76 => 14,  74 => 11,  73 => 10,  71 => 9,  68 => 8,  64 => 7,  57 => 5,  50 => 4,  46 => 1,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "activity/edit.html.twig", "/var/www/html/kimai2/templates/activity/edit.html.twig");
    }
}
