<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* catalog/snippets/modal.html.twig */
class __TwigTemplate_637843a4dc5886b17812411ed6d152c1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension(SandboxExtension::class);
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "catalog/snippets/modal.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "catalog/snippets/modal.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "catalog/snippets/modal.html.twig"));
// line 1
yield "<!-- Modal -->
<div class=\"modal border-0 fade pr-0 catalog-modal\" id=\"catalogModal-";
// line 3
((array_key_exists("article", $context)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "id", [], "any", false, false, true, 3), "html", null, true)) : (yield ""));
yield "\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-lg modal-dialog-centered\" role=\"document\" style=\"max-width: 680px;\">
<div class=\"modal-content\">
<div class=\"modal-header border-0\">
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" style=\"opacity: 1;\">
<span aria-hidden=\"true\" class=\"text-indigo\">×</span>
</button>
</div>
<div class=\"modal-body px-5 px-lg-5 px-md-5\">
<div class=\"row\">
";
// line 13
if (((array_key_exists("addresses", $context) && (isset($context["addresses"]) || array_key_exists("addresses", $context) ? $context["addresses"] : (function () { throw new RuntimeError('Variable "addresses" does not exist.', 13, $this->source); })())) && !(isset($context["lastCatalog"]) || array_key_exists("lastCatalog", $context) ? $context["lastCatalog"] : (function () { throw new RuntimeError('Variable "lastCatalog" does not exist.', 13, $this->source); })()))) {
// line 14
yield " <div class=\"col-lg-6\">
<h3 class=\"font-weight-bold mb-3 mb-lg-3 mb-md-3\">Order Print Catalog</h3>
<div class=\"order-catalog-text\">
<small class=\"font-weight-bold text-silver\">
DEFAULT SHIPPING ADDRESS
</small>
</div>
";
// line 22
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["addresses"]) || array_key_exists("addresses", $context) ? $context["addresses"] : (function () { throw new RuntimeError('Variable "addresses" does not exist.', 22, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["address"]) {
// line 23
yield " <div class=\"";
yield ((((isset($context["defaultShippingAddress"]) || array_key_exists("defaultShippingAddress", $context) ? $context["defaultShippingAddress"] : (function () { throw new RuntimeError('Variable "defaultShippingAddress" does not exist.', 23, $this->source); })()) != CoreExtension::getAttribute($this->env, $this->source, $context["address"], "id", [], "any", false, false, true, 23))) ? ("d-none") : (""));
yield "\" data-address-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "id", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
yield "\">
<p class=\"mb-0 text-deepGray mt-3 mt-lg-3 mt-md-3\">";
// line 24
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "fullname", [], "any", false, false, true, 24), 24, $this->source), "html", null, true);
yield "</p>
<p class=\"mb-0 text-deepGray\">";
// line 25
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "street_address", [], "any", false, false, true, 25), 25, $this->source), "html", null, true);
yield "</p>
<p class=\"mb-0 text-deepGray\">";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "zip_code", [], "any", false, false, true, 26), 26, $this->source), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "city", [], "any", false, false, true, 26), 26, $this->source), "html", null, true);
yield "</p>
<p class=\"mb-0 text-deepGray\">";
// line 27
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "stateDisplay", [], "any", false, false, true, 27), 27, $this->source), "html", null, true);
yield "</p>
<p class=\"mb-0 text-deepGray\">";
// line 28
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "countryName", [], "any", false, false, true, 28), 28, $this->source), "html", null, true);
yield "</p>
<p class=\"mb-0 text-deepGray\">";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "phone", [], "any", false, false, true, 29), 29, $this->source), "html", null, true);
yield "</p>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['address'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 32
yield " <div class=\"select-ghost\" style=\"margin-left: -27px;\">
<select name=\"catalog_shipping_addresses\" id=\"catalog_shipping_addresses-";
// line 33
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 33, $this->source); })()), "id", [], "any", false, false, true, 33), 33, $this->source), "html", null, true);
yield "\" style=\"max-width: 200px;\">
";
// line 34
if (array_key_exists("addresses", $context)) {
// line 35
yield " <option value=\"\" disabled selected>
SELECT OTHER ADDRESS
</option>
";
// line 38
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["addresses"]) || array_key_exists("addresses", $context) ? $context["addresses"] : (function () { throw new RuntimeError('Variable "addresses" does not exist.', 38, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["address"]) {
// line 39
yield " <option value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "id", [], "any", false, false, true, 39), 39, $this->source), "html", null, true);
yield "\">
";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["address"], "label", [], "any", false, false, true, 40), 40, $this->source), "html", null, true);
yield "
</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['address'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
yield " ";
}
// line 44
yield " <option value=\"new\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add new"), "html", null, true);
yield "</option>
</select>
</div>
</div>
";
} else {
// line 49
yield " <div class=\"col-lg-6\">
<h3 class=\"font-weight-bold mb-3 mb-lg-3 mb-md-3\">Order Print</h3>
<div class=\"order-catalog-text\">
<p>Please complete the form to receive your free product catalog from Stoelting Co.</p>
</div>
</div>
";
}
// line 56
yield " <div class=\"col-lg-6 d-flex justify-content-center\">
";
// line 57
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 57, $this->source); })()), "feature_image", [], "any", false, false, true, 57), "getThumbnail", ["catalog"], "method", false, false, true, 57), "getHtml", [["class" => "mb-2 mb-lg-2 mb-md-2", "alt" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 57, $this->source); })()), "title", [], "any", false, false, true, 57)]], "method", false, false, true, 57), 57, $this->source);
yield "
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
";
// line 62
yield from $this->loadTemplate("catalog/snippets/form.html.twig", "catalog/snippets/modal.html.twig", 62)->unwrap()->yield(CoreExtension::merge($context, CoreExtension::getAttribute($this->env, $this->source, (isset($context["modalForms"]) || array_key_exists("modalForms", $context) ? $context["modalForms"] : (function () { throw new RuntimeError('Variable "modalForms" does not exist.', 62, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 62, $this->source); })()), "id", [], "any", false, false, true, 62), [], "array", false, false, true, 62)));
// line 63
yield " </div>
</div>
</div>
<div class=\"modal-footer border-0 mb-3 mb-lg-3 mb-md-3 px-5 px-lg-5 px-md-5 ";
// line 66
yield ((( !(isset($context["addresses"]) || array_key_exists("addresses", $context) ? $context["addresses"] : (function () { throw new RuntimeError('Variable "addresses" does not exist.', 66, $this->source); })()) || (isset($context["lastCatalog"]) || array_key_exists("lastCatalog", $context) ? $context["lastCatalog"] : (function () { throw new RuntimeError('Variable "lastCatalog" does not exist.', 66, $this->source); })()))) ? ("d-none") : (""));
yield "\">
<!-- <a class=\"btn btn-primary btn-primary--ghost\" data-dismiss=\"modal\">
Anwser no
</a> -->
<form action=\"";
// line 70
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("catalog_email_send", ["division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html", null, true);
yield "\" method=\"POST\" class=\"m-0 d-flex w-100 align-items-end\">
<div class=\"d-flex flex-column mr-auto\">
<div class=\"mb-1 mb-lg-1 mb-md-1 text-deepGray\">
Quantity
</div>
<div class=\"border border-pearl d-flex custom-input-number\" style=\"width: 105px;\">
<button type=\"button\" disabled=\"disabled\" class=\"custom-input-number-button custom-input-number-button--down\"><span class=\"custom-input-number-arrow\"></span></button>
<input type=\"number\" class=\"text-deepGray\" id=\"quantity-";
// line 77
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 77, $this->source); })()), "id", [], "any", false, false, true, 77), 77, $this->source), "html", null, true);
yield "\" name=\"quantity\" required=\"required\" placeholder=\"stoelting.quantity\" min=\"1\" max=\"100\" value=\"1\">
<button type=\"button\" class=\"custom-input-number-button custom-input-number-button--up\"><span class=\"custom-input-number-arrow custom-input-number-arrow--up\"></span></button>
</div>
</div>
<input type=\"text\" name=\"address\" value=\"";
// line 81
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["defaultShippingAddress"]) || array_key_exists("defaultShippingAddress", $context) ? $context["defaultShippingAddress"] : (function () { throw new RuntimeError('Variable "defaultShippingAddress" does not exist.', 81, $this->source); })()), 81, $this->source), "html", null, true);
yield "\" hidden>
<input type=\"text\" name=\"catalog\" value=\"";
// line 82
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 82, $this->source); })()), "id", [], "any", false, false, true, 82), 82, $this->source), "html", null, true);
yield "\" hidden>
<button type=\"submit\" class=\"btn btn-primary ml-4 ml-lg-0 ml-md-0\" >
Submit
</button>
</form>
</div>
</div>
</div>
</div>";
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "catalog/snippets/modal.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 219 => 82, 215 => 81, 208 => 77, 198 => 70, 191 => 66, 186 => 63, 184 => 62, 176 => 57, 173 => 56, 164 => 49, 155 => 44, 152 => 43, 143 => 40, 138 => 39, 134 => 38, 129 => 35, 127 => 34, 123 => 33, 120 => 32, 111 => 29, 107 => 28, 103 => 27, 97 => 26, 93 => 25, 89 => 24, 82 => 23, 78 => 22, 68 => 14, 66 => 13, 53 => 3, 49 => 1,);
}
public function getSourceContext()
{
return new Source("<!-- Modal -->
<div class=\"modal border-0 fade pr-0 catalog-modal\" id=\"catalogModal-{{ article is defined ? article.id }}\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-lg modal-dialog-centered\" role=\"document\" style=\"max-width: 680px;\">
<div class=\"modal-content\">
<div class=\"modal-header border-0\">
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" style=\"opacity: 1;\">
<span aria-hidden=\"true\" class=\"text-indigo\">×</span>
</button>
</div>
<div class=\"modal-body px-5 px-lg-5 px-md-5\">
<div class=\"row\">
{% if addresses is defined and addresses and not lastCatalog %}
<div class=\"col-lg-6\">
<h3 class=\"font-weight-bold mb-3 mb-lg-3 mb-md-3\">Order Print Catalog</h3>
<div class=\"order-catalog-text\">
<small class=\"font-weight-bold text-silver\">
DEFAULT SHIPPING ADDRESS
</small>
</div>
{% for address in addresses %}
<div class=\"{{ defaultShippingAddress != address.id ? 'd-none' }}\" data-address-id=\"{{ address.id }}\">
<p class=\"mb-0 text-deepGray mt-3 mt-lg-3 mt-md-3\">{{ address.fullname }}</p>
<p class=\"mb-0 text-deepGray\">{{ address.street_address }}</p>
<p class=\"mb-0 text-deepGray\">{{ address.zip_code }} {{ address.city }}</p>
<p class=\"mb-0 text-deepGray\">{{ address.stateDisplay }}</p>
<p class=\"mb-0 text-deepGray\">{{ address.countryName }}</p>
<p class=\"mb-0 text-deepGray\">{{ address.phone }}</p>
</div>
{% endfor %}
<div class=\"select-ghost\" style=\"margin-left: -27px;\">
<select name=\"catalog_shipping_addresses\" id=\"catalog_shipping_addresses-{{article.id}}\" style=\"max-width: 200px;\">
{% if addresses is defined %}
<option value=\"\" disabled selected>
SELECT OTHER ADDRESS
</option>
{% for address in addresses %}
<option value=\"{{ address.id }}\">
{{ address.label }}
</option>
{% endfor %}
{% endif %}
<option value=\"new\">{{ 'Add new' | trans }}</option>
</select>
</div>
</div>
{% else %}
<div class=\"col-lg-6\">
<h3 class=\"font-weight-bold mb-3 mb-lg-3 mb-md-3\">Order Print</h3>
<div class=\"order-catalog-text\">
<p>Please complete the form to receive your free product catalog from Stoelting Co.</p>
</div>
</div>
{% endif %}
<div class=\"col-lg-6 d-flex justify-content-center\">
{{ article.feature_image.getThumbnail('catalog').getHtml({class: 'mb-2 mb-lg-2 mb-md-2', alt: article.title}) | raw }}
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
{% include 'catalog/snippets/form.html.twig' with modalForms[article.id] %}
</div>
</div>
</div>
<div class=\"modal-footer border-0 mb-3 mb-lg-3 mb-md-3 px-5 px-lg-5 px-md-5 {{ not addresses or lastCatalog ? 'd-none' }}\">
<!-- <a class=\"btn btn-primary btn-primary--ghost\" data-dismiss=\"modal\">
Anwser no
</a> -->
<form action=\"{{ path('catalog_email_send', {'division': getSiteDivision()}) }}\" method=\"POST\" class=\"m-0 d-flex w-100 align-items-end\">
<div class=\"d-flex flex-column mr-auto\">
<div class=\"mb-1 mb-lg-1 mb-md-1 text-deepGray\">
Quantity
</div>
<div class=\"border border-pearl d-flex custom-input-number\" style=\"width: 105px;\">
<button type=\"button\" disabled=\"disabled\" class=\"custom-input-number-button custom-input-number-button--down\"><span class=\"custom-input-number-arrow\"></span></button>
<input type=\"number\" class=\"text-deepGray\" id=\"quantity-{{ article.id }}\" name=\"quantity\" required=\"required\" placeholder=\"stoelting.quantity\" min=\"1\" max=\"100\" value=\"1\">
<button type=\"button\" class=\"custom-input-number-button custom-input-number-button--up\"><span class=\"custom-input-number-arrow custom-input-number-arrow--up\"></span></button>
</div>
</div>
<input type=\"text\" name=\"address\" value=\"{{ defaultShippingAddress }}\" hidden>
<input type=\"text\" name=\"catalog\" value=\"{{ article.id }}\" hidden>
<button type=\"submit\" class=\"btn btn-primary ml-4 ml-lg-0 ml-md-0\" >
Submit
</button>
</form>
</div>
</div>
</div>
</div>", "catalog/snippets/modal.html.twig", "/var/www/webovi/stoelting/pimcore/templates/catalog/snippets/modal.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 13, "for" => 22, "include" => 62);
static $filters = array("escape" => 3, "trans" => 44, "raw" => 57);
static $functions = array("path" => 70, "getSiteDivision" => 70);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'include'],
['escape', 'trans', 'raw'],
['path', 'getSiteDivision'],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}