<?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;

/* additions/contact-form */
class __TwigTemplate_775fee2112252a75661954c77b2d7bf9 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
        $macros["_self"] = $this->macros["_self"] = $this;
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "layouts/_main.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        craft\helpers\Template::beginProfile("template", "additions/contact-form");
        $this->parent = $this->loadTemplate("layouts/_main.twig", "additions/contact-form", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        craft\helpers\Template::endProfile("template", "additions/contact-form");
    }

    // line 3
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        craft\helpers\Template::beginProfile("block", "content");
        // line 4
        echo "
";
        // line 5
        ob_start();
        // line 6
        echo "  input.form-control, textarea {
    margin-bottom: 10px;
  }
";
        craft\helpers\Template::css(ob_get_clean());
        // line 10
        echo "

 <div class=\"container\" style='margin-top:120px;'>
    ";
        // line 13
        echo twig_escape_filter($this->env, $this->extensions['craft\web\twig\Extension']->dateFilter($this->env, "now", "H:i m/d/Y", "Asia/Singapore"), "html", null, true);
        echo "

<div class=\"row\">
    <div class=\"col-8 py-3 px-4\">

    <h1>Contact Us</h1>
    <h4>Advanced Contact Form</h4>

    ";
        // line 26
        echo "

    ";
        // line 28
        if (craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 28, $this->source); })()), "app", []), "session", []), "hasFlash", [0 => "notice"], "method")) {
            // line 29
            echo "
        <div class=\"alert alert-success\" role=\"alert\">
            ";
            // line 31
            echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 31, $this->source); })()), "app", []), "session", []), "getFlash", [0 => "notice"], "method"), "html", null, true);
            echo "
        </div>
    ";
        } elseif (craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source,         // line 33
(isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 33, $this->source); })()), "app", []), "session", []), "hasFlash", [0 => "error"], "method")) {
            // line 34
            echo "        <p class=\"message error\">";
            echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 34, $this->source); })()), "app", []), "session", []), "getFlash", [0 => "error"], "method"), "html", null, true);
            echo "</p>
    ";
        }
        // line 36
        echo "

    ";
        // line 38
        $context["submission"] = (($context["submission"]) ?? (null));
        // line 39
        echo "
     <form method=\"post\" action=\"\" accept-charset=\"UTF-8\">
        ";
        // line 41
        echo craft\helpers\Html::csrfInput();
        echo "
        ";
        // line 42
        echo craft\helpers\Html::actionInput("contact-form/send");
        echo "
        ";
        // line 44
        echo "
        <label class='form-label' for=\"from-name\">Your Name</label>
        ";
        // line 46
        echo craft\helpers\Html::input("text", "fromName", (((craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromName", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromName", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromName", [])) : ("Mr.test")), ["id" => "from-name", "autocomplete" => "name", "class" => "form-control"]);
        // line 52
        echo "
        ";
        // line 53
        echo (((isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 53, $this->source); })())) ? (twig_call_macro($macros["_self"], "macro_errorList", [craft\helpers\Template::attribute($this->env, $this->source, (isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 53, $this->source); })()), "getErrors", [0 => "fromName"], "method")], 53, $context, $this->getSourceContext())) : (""));
        echo "

        <label class='control-label' for=\"from-email\">Your Email</label>
        ";
        // line 56
        echo craft\helpers\Html::input("email", "fromEmail", (((craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromEmail", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromEmail", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "fromEmail", [])) : ("lionel@wesvault.com")), ["id" => "from-email", "autocomplete" => "email", "class" => "form-control"]);
        // line 60
        echo "

        ";
        // line 62
        echo (((isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 62, $this->source); })())) ? (twig_call_macro($macros["_self"], "macro_errorList", [craft\helpers\Template::attribute($this->env, $this->source, (isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 62, $this->source); })()), "getErrors", [0 => "fromEmail"], "method")], 62, $context, $this->getSourceContext())) : (""));
        echo "

        <label class='control-label' for=\"subject\">Subject</label>
        ";
        // line 65
        echo craft\helpers\Html::input("text", "subject", (((craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "subject", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "subject", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "subject", [])) : ("")), ["id" => "subject", "class" => "form-control"]);
        // line 69
        echo "
        ";
        // line 70
        echo (((isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 70, $this->source); })())) ? (twig_call_macro($macros["_self"], "macro_errorList", [craft\helpers\Template::attribute($this->env, $this->source, (isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 70, $this->source); })()), "getErrors", [0 => "subject"], "method")], 70, $context, $this->getSourceContext())) : (""));
        echo "

        <label class='control-label' for=\"message\">Message</label>
        ";
        // line 73
        echo $this->extensions['craft\web\twig\Extension']->tagFunction("textarea", ["text" => (((craft\helpers\Template::attribute($this->env, $this->source,         // line 74
($context["submission"] ?? null), "message", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "message", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["submission"] ?? null), "message", [])) : ("")), "id" => "message", "name" => "message[body]", "rows" => 5, "cols" => 40, "class" => "form-control"]);
        // line 80
        echo "
        ";
        // line 81
        echo (((isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 81, $this->source); })())) ? (twig_call_macro($macros["_self"], "macro_errorList", [craft\helpers\Template::attribute($this->env, $this->source, (isset($context["submission"]) || array_key_exists("submission", $context) ? $context["submission"] : (function () { throw new RuntimeError('Variable "submission" does not exist.', 81, $this->source); })()), "getErrors", [0 => "message"], "method")], 81, $context, $this->getSourceContext())) : (""));
        echo "




        <label  class='control-label' for=\"phone\">Your phone number</label>
        <input id=\"phone\" class='form-control' type=\"text\" name=\"message[Phone]\" value=\"\">

        
        
        <div class=\"row my-4\">
            <label class=\"control-label\">When </label>
            <div class=\"col-6\">
                <input type=\"date\" class='form-control' name=\"message[date from]\"> 
            </div>
            <div class=\"col-6\">
               <input type=\"date\" class='form-control' name=\"message[date to]\"> 
            </div>
        </div>
        
        


        What services are you interested in?
        <p>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Design\"> Design</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Development\"> Development</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Strategy\"> Strategy</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Marketing\"> Marketing</label>            
        </p>



        <div class=\"mt-5\">
        <button type=\"submit\" class='btn btn-primary'>Send</button>    
        </div>
        
    </form>
    </div>       

    </div>
</div>
";
        craft\helpers\Template::endProfile("block", "content");
    }

    // line 21
    public function macro_errorList($__errors__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "errors" => $__errors__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start();
        try {
            craft\helpers\Template::beginProfile("macro", "errorList");
            // line 22
            echo "        ";
            if ((isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 22, $this->source); })())) {
                // line 23
                echo "            ";
                echo craft\helpers\Html::ul((isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 23, $this->source); })()), ["class" => "errors"]);
                echo "
        ";
            }
            // line 25
            echo "    ";
            craft\helpers\Template::endProfile("macro", "errorList");

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    public function getTemplateName()
    {
        return "additions/contact-form";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  237 => 25,  231 => 23,  228 => 22,  214 => 21,  166 => 81,  163 => 80,  161 => 74,  160 => 73,  154 => 70,  151 => 69,  149 => 65,  143 => 62,  139 => 60,  137 => 56,  131 => 53,  128 => 52,  126 => 46,  122 => 44,  118 => 42,  114 => 41,  110 => 39,  108 => 38,  104 => 36,  98 => 34,  96 => 33,  91 => 31,  87 => 29,  85 => 28,  81 => 26,  70 => 13,  65 => 10,  59 => 6,  57 => 5,  54 => 4,  49 => 3,  36 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends \"layouts/_main.twig\" %}

{% block content %}

{% css %}
  input.form-control, textarea {
    margin-bottom: 10px;
  }
{% endcss %}


 <div class=\"container\" style='margin-top:120px;'>
    {{ \"now\"|date(\"H:i m/d/Y\",'Asia/Singapore')}}

<div class=\"row\">
    <div class=\"col-8 py-3 px-4\">

    <h1>Contact Us</h1>
    <h4>Advanced Contact Form</h4>

    {% macro errorList(errors) %}
        {% if errors %}
            {{ ul(errors, {class: 'errors'}) }}
        {% endif %}
    {% endmacro %}


    {% if craft.app.session.hasFlash('notice') %}

        <div class=\"alert alert-success\" role=\"alert\">
            {{ craft.app.session.getFlash('notice') }}
        </div>
    {% elseif craft.app.session.hasFlash('error') %}
        <p class=\"message error\">{{ craft.app.session.getFlash('error') }}</p>
    {% endif %}


    {% set submission = submission ?? null %}

     <form method=\"post\" action=\"\" accept-charset=\"UTF-8\">
        {{ csrfInput() }}
        {{ actionInput('contact-form/send') }}
        {# redirectInput('contact/thanks') #}

        <label class='form-label' for=\"from-name\">Your Name</label>
        {{ input('text', 'fromName', submission.fromName ?? 'Mr.test', {
            id: 'from-name',
            autocomplete: 'name',
            class : 'form-control'
        },
        
        ) }}
        {{ submission ? _self.errorList(submission.getErrors('fromName')) }}

        <label class='control-label' for=\"from-email\">Your Email</label>
        {{ input('email', 'fromEmail', submission.fromEmail ?? 'lionel@wesvault.com', {
            id: 'from-email',
            autocomplete: 'email',
            class : 'form-control'
        }) }}

        {{ submission ? _self.errorList(submission.getErrors('fromEmail')) }}

        <label class='control-label' for=\"subject\">Subject</label>
        {{ input('text', 'subject', submission.subject ?? '', {
            id: 'subject',

            class : 'form-control'
        }) }}
        {{ submission ? _self.errorList(submission.getErrors('subject')) }}

        <label class='control-label' for=\"message\">Message</label>
        {{ tag('textarea', {
            text: submission.message ?? '',
            id: 'message',
            name: 'message[body]',
            rows: 5,
            cols: 40,
            class : 'form-control'
        }) }}
        {{ submission ? _self.errorList(submission.getErrors('message')) }}




        <label  class='control-label' for=\"phone\">Your phone number</label>
        <input id=\"phone\" class='form-control' type=\"text\" name=\"message[Phone]\" value=\"\">

        
        
        <div class=\"row my-4\">
            <label class=\"control-label\">When </label>
            <div class=\"col-6\">
                <input type=\"date\" class='form-control' name=\"message[date from]\"> 
            </div>
            <div class=\"col-6\">
               <input type=\"date\" class='form-control' name=\"message[date to]\"> 
            </div>
        </div>
        
        


        What services are you interested in?
        <p>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Design\"> Design</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Development\"> Development</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Strategy\"> Strategy</label>
        <label><input type=\"checkbox\" name=\"message[Services][]\" value=\"Marketing\"> Marketing</label>            
        </p>



        <div class=\"mt-5\">
        <button type=\"submit\" class='btn btn-primary'>Send</button>    
        </div>
        
    </form>
    </div>       

    </div>
</div>
{% endblock %}", "additions/contact-form", "/home/addons/atweb.space/sub/craft-demo/cms/templates/additions/contact-form.html");
    }
}
