<?php

/* @websiteWidgets/form_elements/templates/checkbox.twig.html */
class __TwigTemplate_d381c4030dc5f38d71c3623a72b0991ba3087f0a9c80f11789e882d6f81e0246 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
            '__internal_9211f69b31dd2d4eec5be38b442afbc2f2bf07111e046b1bb8322d0ec6fb16bf' => [$this, 'block___internal_9211f69b31dd2d4eec5be38b442afbc2f2bf07111e046b1bb8322d0ec6fb16bf'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<div data-widget-id=\"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "\" class=\"moto-widget moto-widget-form_elements-checkbox moto-preset-";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getCurrentPreset", [], "method"), "html", null, true);
        echo " ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getAlignClass", [], "method"), "html", null, true);
        echo " ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getSpacing", [0 => "classes"], "method"), "html", null, true);
        echo "\" data-widget=\"form_elements.checkbox\">
    ";
        // line 2
        if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
            // line 3
            echo "        <div class=\"moto-widget-cover\"></div>
    ";
        }
        // line 5
        echo "    <div class=\"moto-form__element moto-form__element_checkbox\" ng-class=\"{'moto-form__element_invalid' : (\$FORM.\$submitted || \$FORM['";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "'].\$touched) && \$FORM['";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "'].\$invalid}\">
        <div class=\"moto-form__field\">
            <label class=\"moto-form__field-label moto-form__field-label_type-";
        // line 7
        echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "labelType", []), "html", null, true);
        echo "\" for=\"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "__";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "\">
                <input id=\"";
        // line 8
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "__";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "\" class=\"moto-form__field-control moto-form__field-control_checkbox\"
                        type=\"checkbox\"
                        name=\"";
        // line 10
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "\"
                        ng-model=\"message['";
        // line 11
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "']\"
                        ng-change=\"onFieldChanged('";
        // line 12
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "')\"
                        ";
        // line 13
        if ($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "checked", [])) {
            echo " ng-init=\"message['";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
            echo "'] = true\" checked";
        }
        // line 14
        echo "                        ";
        if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "required", [])) {
            echo " required";
        }
        echo ">
                <span class=\"moto-form__field-icon fa fa-fw\" aria-hidden=\"true\"></span>
                <span class=\"moto-form__field-text ";
        // line 16
        if (($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "labelType", []) == "html")) {
            echo "moto-widget-text";
        }
        echo "\">";
        echo call_user_func_array($this->env->getFilter('page_html_content')->getCallable(), [$this->env,         $this->renderBlock("__internal_9211f69b31dd2d4eec5be38b442afbc2f2bf07111e046b1bb8322d0ec6fb16bf", $context, $blocks), (isset($context["item"]) ? $context["item"] : null), "widget:checkbox.label"]);
        echo "</span>
            </label>
        </div>
        ";
        // line 19
        if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
            // line 20
            echo "            <div class=\"moto-form__errors moto-form__errors_only-first\"></div>
        ";
        } else {
            // line 22
            echo "            <div data-moto-form-errors class=\"moto-form__errors moto-form__errors_only-first\" data-field-name=\"";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
            echo "\" data-form=\"\$FORM\"></div>
        ";
        }
        // line 24
        echo "    </div>
</div>";
    }

    // line 16
    public function block___internal_9211f69b31dd2d4eec5be38b442afbc2f2bf07111e046b1bb8322d0ec6fb16bf($context, array $blocks = [])
    {
        $this->loadTemplate(twig_template_from_string($this->env, $this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "label", [])), "@websiteWidgets/form_elements/templates/checkbox.twig.html", 16)->display($context);
    }

    public function getTemplateName()
    {
        return "@websiteWidgets/form_elements/templates/checkbox.twig.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  113 => 16,  108 => 24,  102 => 22,  98 => 20,  96 => 19,  86 => 16,  78 => 14,  72 => 13,  68 => 12,  64 => 11,  60 => 10,  53 => 8,  45 => 7,  37 => 5,  33 => 3,  31 => 2,  20 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("", "@websiteWidgets/form_elements/templates/checkbox.twig.html", "/data05/c3111787/public_html/brcc.me.uk/mt-includes/widgets/form_elements/templates/checkbox.twig.html");
    }
}
