<?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;
/* studio/list.html.twig */
class __TwigTemplate_97f85580bbabdce1edf7507af8e5a9314c94b335ed0bd811d579cb241133af3e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
'inlinescripts' => [$this, 'block_inlinescripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "studio/list.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "studio/list.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "studio/list.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "\t<!-- #main -->
\t<main id=\"main\" role=\"main\">
\t\t";
// line 7
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "areablock", "top-content");
echo "
\t\t<section id=\"sutdios\">
\t\t\t<div class=\"apk-studios exk_booking_studio_list\">
\t\t\t\t<div class=\"uk-container apk-container-1400\">
\t\t\t\t\t";
// line 27
echo "\t\t\t\t\t";
$context["orderLink"] = (((("<a href=\"" . $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("account_orders")) . "\">") . $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cliquez ici")) . "</a>");
// line 28
echo "\t\t\t\t\t";
if ((twig_length_filter($this->env, (isset($context["orders"]) || array_key_exists("orders", $context) ? $context["orders"] : (function () { throw new RuntimeError('Variable "orders" does not exist.', 28, $this->source); })())) == 1)) {
// line 29
echo "\t\t\t\t\t\t<div class=\"apk-alert-orange apk-f-24\" uk-alert>\t
\t\t\t\t\t\t\t<p>";
// line 30
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vous avez une réservation en cours. Pour consulter votre réservation"), "html", null, true);
echo " ";
echo (isset($context["orderLink"]) || array_key_exists("orderLink", $context) ? $context["orderLink"] : (function () { throw new RuntimeError('Variable "orderLink" does not exist.', 30, $this->source); })());
echo ".</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
} elseif ((twig_length_filter($this->env, // line 32
(isset($context["orders"]) || array_key_exists("orders", $context) ? $context["orders"] : (function () { throw new RuntimeError('Variable "orders" does not exist.', 32, $this->source); })())) > 1)) {
// line 33
echo "\t\t\t\t\t\t<div class=\"apk-alert-orange apk-f-24\" uk-alert>
\t\t\t\t\t\t\t<p>";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vous avez des réservations en cours. Pour consulter vos réservations"), "html", null, true);
echo " ";
echo (isset($context["orderLink"]) || array_key_exists("orderLink", $context) ? $context["orderLink"] : (function () { throw new RuntimeError('Variable "orderLink" does not exist.', 34, $this->source); })());
echo ".</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
}
// line 37
echo "
\t\t\t\t\t<div class=\"apk-studios-filters\">
\t\t\t\t\t\t<div class=\"uk-grid-medium uk-grid\" uk-grid uk-height-match=\"target: .apk-label-input-style , .apk-studios-filters-type\">
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t<div class=\"uk-width-2-3@m apk-studios-filters-inputs\">
\t\t\t\t\t\t\t\t<span class=\"apk-studios-filters--title uk-visible@s\">";
// line 43
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Session"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t<div class=\"uk-child-width-1-4@s uk-grid-collapse uk-grid apk-studios-filters-inputs-upper\" uk-grid>";
// line 46
if (twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 46, $this->source); })()), "property", [0 => "defaultSearchPlace"], "method", false, false, false, 46)) {
// line 47
echo "\t\t\t\t\t\t\t\t\t\t<span id=\"defaultSearchPlaceId\" hidden apk-data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 47, $this->source); })()), "property", [0 => "defaultSearchPlace"], "method", false, false, false, 47), "id", [], "any", false, false, false, 47), "html", null, true);
echo "\"></span>
\t\t\t\t\t\t\t\t\t";
}
// line 49
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 49, $this->source); })()), "property", [0 => "defaultSearchPlace"], "method", false, false, false, 49)) {
// line 50
echo " <span id=\"defaultHoursSelected\" hidden apk-data-id=\"";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("minimum_hours_selected", 1), "html", null, true);
echo "\"></span>
";
}
// line 52
echo "\t\t\t\t\t\t\t\t\t<span id=\"pageLanguage\" hidden apk-data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 52, $this->source); })()), "request", [], "any", false, false, false, 52), "locale", [], "any", false, false, false, 52), "html", null, true);
echo "\"></span>
\t\t\t\t\t\t\t\t\t";
// line 54
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["locations"]) || array_key_exists("locations", $context) ? $context["locations"] : (function () { throw new RuntimeError('Variable "locations" does not exist.', 54, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["l"]) {
// line 55
echo "\t\t\t\t\t\t\t\t\t<div class=\"uk-width-auto@s uk-width-1-3@s uk-width-1-2 apk-width-75-2\">
\t\t\t\t\t\t\t\t\t\t<label for=\"";
// line 56
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["l"], "id", [], "any", false, false, false, 56), "html", null, true);
echo "\" class=\"apk-label-input-style is-radio-type\">
\t\t\t\t\t\t\t\t\t\t\t<input value=\"";
// line 57
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["l"], "id", [], "any", false, false, false, 57), "html", null, true);
echo "\" class=\"uk-checkbox\" type=\"radio\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["l"], "id", [], "any", false, false, false, 57), "html", null, true);
echo "\" data-studiodefault=\"";
if (twig_get_attribute($this->env, $this->source, $context["l"], "defaultCategory", [], "any", false, false, false, 57)) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["l"], "defaultCategory", [], "any", false, false, false, 57), "id", [], "any", false, false, false, 57), "html", null, true);
}
echo "\" required v-model=\"sLocation\" @change=\"searchStudios()\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"apk-label\">";
// line 58
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["l"], "name", [], "any", false, false, false, 58), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['l'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
echo "\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"uk-child-width-1-4@s uk-grid-collapse uk-grid\" uk-grid>
\t\t\t\t\t\t\t\t\t";
// line 66
echo "\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-width-2-5\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\" style=\"position:relative;\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDate\" class=\"uk-visible@s\">";
// line 68
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Date"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t\t\t\t<!-- Date Desktop text -->
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"!isMobile\" class=\"bookDateDesktop\" :class=\"{ 'exk-form-input-danger' : sDateNotValid }\" type=\"text\" name=\"bookDate\" id=\"bookDate\" :data-value=\"sDate\" v-model=\"sDateDesktop\" required style=\"position:absolute; bottom:0; z-index: -1;\">
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"!isMobile\" class=\"uk-input apk-input-date hide-browser-calendar bookDateDesktopText\" type=\"text\" :data-value=\"sDate\" v-model=\"sDateDesktopText\" required readonly=\"readonly\">
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" class=\"uk-input apk-input-date hide-browser-calendar bookDateMobile\" :class=\"{ 'exk-form-input-danger' : sDateNotValid }\" type=\"text\" name=\"bookDate\" id=\"bookDate\" required :value=\"sDateMobile\" :data-value=\"sDate\" readonly=\"readonly\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-visible@s\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDate\" class=\"uk-visible@s\">";
// line 79
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Hour"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t\t\t\t<select v-if=\"!isMobile\" class=\"hide-browser-calendar uk-select apk-input-hour\" :class=\"{ 'exk-form-input-danger' : sHourNotValid }\" name=\"bookHour\" id=\"bookHour\" v-model=\"sHour\" @change=\"searchStudios()\" required>
\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select an hour"), "html", null, true);
echo "</option>
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 83
$context["ii"] = [0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23];
// line 84
echo "
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 85
if (($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur") && $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur"))) {
echo "\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 88
$context["hourSeparator"] = null;
// line 89
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["ii"]) || array_key_exists("ii", $context) ? $context["ii"] : (function () { throw new RuntimeError('Variable "ii" does not exist.', 89, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 90
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
if (($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur") < $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur"))) {
// line 91
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
if ((($context["i"] >= $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur")) && ($context["i"] < $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur")))) {
// line 92
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\" v-if=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo " >= minHourAllowed\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 94
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 95
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
if ((($context["i"] < $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur")) || ($context["i"] >= $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur")))) {
// line 96
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\" v-if=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo " >= minHourAllowed\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 98
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
if ( !(isset($context["hourSeparator"]) || array_key_exists("hourSeparator", $context) ? $context["hourSeparator"] : (function () { throw new RuntimeError('Variable "hourSeparator" does not exist.', 98, $this->source); })())) {
// line 99
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\" v-if=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo " >= minHourAllowed\" disabled>---------------</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 101
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context["hourSeparator"] = true;
// line 102
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 103
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 104
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 105
echo "
\t\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 107
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 108
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["ii"]) || array_key_exists("ii", $context) ? $context["ii"] : (function () { throw new RuntimeError('Variable "ii" does not exist.', 108, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 109
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\" v-if=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo " >= minHourAllowed\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 111
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 112
echo "\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t\t";
// line 115
echo "\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-select apk-input-hour bookHourMobile uk-visible@s\" :class=\"{ 'exk-form-input-danger' : sHourNotValid }\" name=\"bookHour\" id=\"bookHour\" @focus=\"searchStudios()\" placeholder=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select an hour"), "html", null, true);
echo "\" required :data-value=\"sHour\" v-model=\"sHourMobile\" uk-toggle=\"target: #modal-hours\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-width-3-5\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDuration\" class=\"uk-visible@s\">";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Duration"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t\t\t\t<select v-if=\"!isMobile\" class=\"uk-select apk-duration\" :class=\"{ 'exk-form-input-danger' : sDurationNotValid }\" name=\"bookDuration\" id=\"bookDuration\" v-model=\"sDuration\" @change=\"searchStudios()\" required>
\t\t\t\t\t\t\t\t\t\t\t\t<!-- DEBUT OPTIONS A DYNAMISER -->
\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">";
// line 123
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select a duration"), "html", null, true);
echo "</option>
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 124
$context["hh"] = [0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10, 10 => 11, 11 => 12];
// line 125
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["hh"]) || array_key_exists("hh", $context) ? $context["hh"] : (function () { throw new RuntimeError('Variable "hh" does not exist.', 125, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["h"]) {
// line 126
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, $context["h"], "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 127
echo twig_escape_filter($this->env, $context["h"], "html", null, true);
echo "h00
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 133
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t</option>
\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['h'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 135
echo "\t\t\t\t\t\t\t\t\t\t\t\t<!-- FIN OPTIONS A DYNAMISER -->
\t\t\t\t\t\t\t\t\t\t\t</select>
\t
\t\t\t\t\t\t\t\t\t\t\t";
// line 139
echo "\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-select apk-duration bookDurationMobile uk-visible@s\" :class=\"{ 'exk-form-input-danger' : sDurationNotValid }\" name=\"bookDuration\" id=\"bookDuration\" placeholder=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select a duration"), "html", null, true);
echo "\" required :data-value=\"sDuration\" readonly=\"readonly\" v-model=\"sDurationMobile\" uk-toggle=\"target: #modal-hours\">
\t
\t\t\t\t\t\t\t\t\t\t\t";
// line 142
echo "\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-input bookHourDuration uk-hidden@s apk-duration\" readonly=\"readonly\" uk-toggle=\"target: #modal-hours\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t";
// line 159
echo "\t\t\t\t\t\t\t\t\t<div class=\"uk-position-relative\">
\t\t\t\t\t\t\t\t\t\t<button id=\"submit\" @focus=\"searchStudios()\" style=\"width:1px; height:1px; position: absolute; top: 0; left: 0; z-index: -1;\">
\t\t\t\t\t\t\t\t\t\t\t";
// line 161
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Recherche"), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"uk-width-1-3@m uk-flex-first@m apk-margin-small-mobile\">
\t\t\t\t\t\t\t\t<span class=\"apk-studios-filters--title uk-visible@s\">";
// line 169
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Studio type"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t";
// line 170
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 170), "get", [0 => "studioTypeId"], "method", true, true, false, 170)) {
// line 171
echo "\t\t\t\t\t\t\t\t\t<span id=\"predefinedStudio\" predefinedStudio=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 171, $this->source); })()), "request", [], "any", false, false, false, 171), "get", [0 => "studioTypeId"], "method", false, false, false, 171), "html", null, true);
echo "\" hidden></span>
\t\t\t\t\t\t\t\t";
}
// line 173
echo "
\t\t\t\t\t\t\t\t";
// line 174
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("maxHourSearch"))) {
// line 175
echo "\t\t\t\t\t\t\t\t\t";
$context["maxHourSearch"] = $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("maxHourSearch");
// line 176
echo "\t\t\t\t\t\t\t\t";
} else {
// line 177
echo "\t\t\t\t\t\t\t\t\t";
$context["maxHourSearch"] = "20:15";
// line 178
echo "\t\t\t\t\t\t\t\t";
}
// line 179
echo "\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"maxHourSearch\" value=\"";
echo twig_escape_filter($this->env, (isset($context["maxHourSearch"]) || array_key_exists("maxHourSearch", $context) ? $context["maxHourSearch"] : (function () { throw new RuntimeError('Variable "maxHourSearch" does not exist.', 179, $this->source); })()), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
// line 181
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur"))) {
// line 182
echo "\t\t\t\t\t\t\t\t\t<input id=\"openingOurs\" value=\"";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur"), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
}
// line 184
echo "\t\t\t\t\t\t\t\t";
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur"))) {
// line 185
echo "\t\t\t\t\t\t\t\t\t<input id=\"closingOurs\" value=\"";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur"), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
}
// line 187
echo "\t\t\t\t\t\t\t\t";
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("durationBeforeNextHour"))) {
// line 188
echo "\t\t\t\t\t\t\t\t\t<input id=\"durationBeforeNextHour\" value=\"";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("durationBeforeNextHour"), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
}
// line 190
echo "\t\t\t\t\t\t\t\t";
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("defaultSearchStudio"))) {
// line 191
echo "\t\t\t\t\t\t\t\t\t<input id=\"defaultSearchStudio\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("defaultSearchStudio"), "id", [], "any", false, false, false, 191), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
}
// line 193
echo "\t\t\t\t\t\t\t\t";
if ( !(null === $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("defaultSearchStudioSubCat"))) {
// line 194
echo "\t\t\t\t\t\t\t\t\t<input id=\"defaultSearchStudioSubCat\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("defaultSearchStudioSubCat"), "id", [], "any", false, false, false, 194), "html", null, true);
echo "\" hidden/>
\t\t\t\t\t\t\t\t";
}
// line 196
echo "\t\t\t\t\t\t\t\t<div hidden ";
echo ">
\t\t\t\t\t\t\t\t\t<span>";
// line 197
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Chose your type of studio"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"apk-studios-filters-content\" ";
// line 199
echo ">
\t\t\t\t\t\t\t\t\t<div class=\"uk-grid-small uk-grid\" uk-grid uk-height-match=\"target: .apk-studios-filters-type\">
\t\t\t\t\t\t\t\t\t\t";
// line 201
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["studioCategories"]) || array_key_exists("studioCategories", $context) ? $context["studioCategories"] : (function () { throw new RuntimeError('Variable "studioCategories" does not exist.', 201, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["studCat"]) {
// line 202
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-2\" ";
if (twig_get_attribute($this->env, $this->source, $context["studCat"], "place", [], "any", false, false, false, 202)) {
echo "v-if=\"sLocation == ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["studCat"], "place", [], "any", false, false, false, 202), "id", [], "any", false, false, false, 202), "html", null, true);
echo "\"";
}
echo ">
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 204
echo "\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"uk-dark uk-checkbox\" name=\"studioCat\" id=\"studioCat_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "id", [], "any", false, false, false, 204), "html", null, true);
echo "\" data-place=\"";
if (twig_get_attribute($this->env, $this->source, $context["studCat"], "place", [], "any", false, false, false, 204)) {
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["studCat"], "place", [], "any", false, false, false, 204), "id", [], "any", false, false, false, 204), "html", null, true);
}
echo "\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "id", [], "any", false, false, false, 204), "html", null, true);
echo "\" @change=\"searchStudios()\" v-model=\"studioCats\">
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 206
echo "\t\t\t\t\t\t\t\t\t\t\t\t<label class=\"apk-studios-filters-type uk-text-center\" for=\"studioCat_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "id", [], "any", false, false, false, 206), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-filters-media\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 208
if (twig_get_attribute($this->env, $this->source, $context["studCat"], "image", [], "any", false, false, false, 208)) {
// line 209
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img uk-svg width=\"26\" height=\"26\" src=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "image", [], "any", false, false, false, 209), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "title", [], "any", false, false, false, 209), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 211
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span>";
// line 212
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studCat"], "title", [], "any", false, false, false, 212), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['studCat'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 216
echo "\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div style=\"min-height:821px;\">
\t\t\t\t\t\t<div id=\"subcateg\" vue-loading v-if=\"showSubCats\">
\t\t\t\t\t\t\t<div class=\"apk-studios-filters-subtype uk-flex uk-flex-left@s uk-flex-center uk-text-center uk-width-expand@s uk-child-width-auto uk-grid-collapse uk-width-1-1 uk-grid\"
\t\t\t\t\t\t\t\tuk-grid :class=\"{'apk-display-grid' : (studioSCats.length > 2 && isMobile)}\">
\t\t\t\t\t\t\t\t<div v-for=\"souscateg in studioSCats\"
\t\t\t\t\t\t\t\t:class=\"{'apk-subcategs-inline' : (studioSCats.length > 2 && isMobile)}\">
\t\t\t\t\t\t\t\t\t<input class=\"scateg-checkbox-selector uk-checkbox\" type=\"checkbox\" :name=\"'studioSCat_'+[[souscateg.id]]\" :id=\"'studioSCat_'+[[souscateg.id]]\" :true-value=\"souscateg.id\"
:false-value=\"0\" @change=\"searchStudios()\" v-model=\"studioSCatsSelected\"/>
\t\t\t\t\t\t\t\t\t<label :for=\"'studioSCat_'+[[souscateg.id]]\">
\t\t\t\t\t\t\t\t\t\t<span>[[souscateg.title]]</span>
\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t
\t\t\t\t\t\t<div id=\"availability\" class=\"apk-studios-filters-results\" :class=\"studioAvailable == 1 ? 'available' : 'unavailable'\" vue-loading>
\t\t\t\t\t\t\t";
// line 244
echo "\t\t\t\t\t\t\t<span v-if=\"studioAvailable == 0\">
\t\t\t\t\t\t\t\t";
// line 245
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pas de studio libre à la date/heure sélectionnée ci-dessus"), "html", null, true);
echo "
\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t
\t\t\t\t\t\t<div class=\"apk-studios-list\" vue-loading>
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t";
// line 262
echo "\t\t\t\t\t\t\t<div class=\"uk-grid\" uk-grid uk-height-match=\"target: .apk-studios-box-bottom\">
\t
\t\t\t\t\t\t\t\t<div class=\"uk-width-1-3@m uk-width-1-2@s\" v-for=\"studio in studioList\">
\t\t\t\t\t\t\t\t\t<!-- FORM avec action vers le checkout -->
\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box uk-dark\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box-top\">
\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-title\">
\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span v-if=\"studio.titleTranslated\" class=\"uk-h3\" :class=\"studio.cssFontSizeTitle\" style=\"white-space: pre-wrap;\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t[[ studio.titleTranslated ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span v-else class=\"uk-h3\" :class=\"studio.cssFontSizeTitle\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t[[ studio.title ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-media uk-cover-container\" ";
// line 278
echo ">
\t\t\t\t\t\t\t\t\t\t\t\t<div ";
// line 279
echo " v-html=\"studio.image\"></div>
\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-audience uk-text-center\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img uk-svg width=\"20\" height=\"15\" src=\"/static/img/pictos/audience.svg\" alt=\"\">
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>[[ studio.maxPersons ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 286
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("max"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t
\t\t\t\t\t\t\t\t\t\t\t<!---------------->
\t\t\t\t\t\t\t\t\t\t\t<div v-if=\"studio.shortInfos\" class=\"apk-short-description\" v-html=\"studio.shortInfos\">
\t
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t<hr class=\"uk-margin-small-top uk-margin-small-bottom\" v-if=\"studio.shortInfos\"/>
\t\t\t\t\t\t\t\t\t\t\t";
// line 311
echo "\t
\t\t\t\t\t\t\t\t\t\t\t<!---------------->
\t
\t\t\t\t\t\t\t\t\t\t\t<ul v-if=\"studio.infos\" class=\"apk-infos uk-margin-small-top uk-margin-small-bottom\" uk-accordion>
\t\t\t\t\t\t\t\t\t\t\t\t<li>
\t\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"uk-accordion-title apk-infos--title\" href=\"#\">";
// line 316
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("More info about this studio ?"), "html", null, true);
echo "</a>
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uk-accordion-content\">
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-infos--text uk-margin-small-bottom\" v-html=\"studio.infos\"></div>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr class=\"uk-margin-remove\"/>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"uk-margin-small-top apk-infos--text\" v-html=\"studio.gear\"></p>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t\t\t\t\t</ul>
\t\t\t\t\t\t\t\t\t\t\t<span v-if=\"!studio.infos\" class=\"uk-display-block uk-margin-small-top apk-infos--title\">";
// line 328
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No infos"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box-bottom\">
\t\t\t\t\t\t\t\t\t\t\t<hr/>
\t\t\t\t\t\t\t\t\t\t\t<span :id=\"'exk_vue_booking_'+studio.id\" class=\"exk_vue_booking\" :data-lockText=\"studio.lockText\" :data-placeLock=\"studio.placeLock\" :data-studio=\"studio.id\" :data-searchdate=\"sDate\" :data-searchhour=\"sHour\" :data-searchduration=\"sDuration\" :data-defaultprice=\"studio.defaultPrice\" :data-availability=\"studio.availability\" :data-displaycalendar=\"";
// line 332
echo twig_escape_filter($this->env, (isset($context["displayCalendar"]) || array_key_exists("displayCalendar", $context) ? $context["displayCalendar"] : (function () { throw new RuntimeError('Variable "displayCalendar" does not exist.', 332, $this->source); })()), "html", null, true);
echo "\" :data-detailstudio=\"";
echo twig_escape_filter($this->env, (isset($context["detailstudio"]) || array_key_exists("detailstudio", $context) ? $context["detailstudio"] : (function () { throw new RuntimeError('Variable "detailstudio" does not exist.', 332, $this->source); })()), "html", null, true);
echo "\" data-language=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 332, $this->source); })()), "request", [], "any", false, false, false, 332), "locale", [], "any", false, false, false, 332), "html", null, true);
echo "\"></span>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>\t
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div id=\"modal-hours\" class=\"uk-flex-top uk-modal\" uk-modal=\"bg-close: false\">
\t\t\t\t\t<div class=\"uk-modal-dialog uk-modal-body uk-margin-auto-vertical\">
\t\t\t\t\t\t<div class=\"apk-modal-promotions uk-dark\">
\t\t\t\t\t\t\t";
// line 345
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["studioCategories"]) || array_key_exists("studioCategories", $context) ? $context["studioCategories"] : (function () { throw new RuntimeError('Variable "studioCategories" does not exist.', 345, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["studCat"]) {
// line 346
echo "\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["studCat"], "categories", [], "any", false, false, false, 346));
foreach ($context['_seq'] as $context["_key"] => $context["studSubCat"]) {
// line 347
echo "\t\t\t\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["studSubCat"], "pricingGrid", [], "any", false, false, false, 347), "mobilePromo", [], "any", false, false, false, 347)) {
// line 348
echo "\t\t\t\t\t\t\t\t\t\t<div class=\"apk-modal-promotions-inner\" v-if=\"studioSCatsSelectedPromo == ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studSubCat"], "id", [], "any", false, false, false, 348), "html", null, true);
echo "\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["studSubCat"], "id", [], "any", false, false, false, 348), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t";
// line 349
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["studSubCat"], "pricingGrid", [], "any", false, false, false, 349), "mobilePromo", [], "any", false, false, false, 349), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t";
}
// line 352
echo "\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['studSubCat'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 353
echo "\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['studCat'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 354
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uk-flex\">
\t\t\t\t\t\t\t<div id=\"hourContainer\"></div>
\t\t\t\t\t\t\t<div id=\"durationContainer\"></div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uk-text-center uk-margin-top\">
\t\t\t\t\t\t\t<button class=\"uk-button uk-button-black uk-width-1-1 uk-modal-close\" type=\"button\">";
// line 360
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Done"), "html", null, true);
echo "</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</section>
\t\t";
// line 368
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "areablock", "bottom-content");
echo "
\t</main>
\t<!-- end #main -->
\t";
// line 374
$this->loadTemplate("studio/booking-studio.html.twig", "studio/list.html.twig", 374)->display($context);
// line 375
echo "
\t";
// line 377
echo "\t";
if ($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("minify-css-js")) {
// line 378
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/minified/booking/picker.min.js"], "method", false, false, false, 378);
// line 379
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/minified/booking/core.min.js"], "method", false, false, false, 379);
// line 380
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/minified/booking/list.min.js"], "method", false, false, false, 380);
// line 381
echo "\t";
} else {
// line 382
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/static/js/booking/picker.js")], "method", false, false, false, 382);
// line 383
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/booking/core.js"], "method", false, false, false, 383);
// line 384
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/booking/list.js"], "method", false, false, false, 384);
// line 385
echo "\t";
}
// line 386
echo "
\t";
// line 387
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/jquery-ui/jquery-ui.1.13.2.min.js"], "method", false, false, false, 387);
// line 388
echo "\t";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 388, $this->source); })()), "request", [], "any", false, false, false, 388), "locale", [], "any", false, false, false, 388) == "fr")) {
// line 389
echo "\t\t";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", [0 => "/static/js/jquery-ui/locale-fr.min.js"], "method", false, false, false, 389);
echo "\t
\t";
}
// line 391
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 394
public function block_inlinescripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "inlinescripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "inlinescripts"));
// line 395
echo "\t<script>
\t\t/* \tPicker de d'heures
\t\t\tDocumentation : https://github.com/fengyuanchen/pickerjs/blob/master/README.md */
\t\tjQuery(function (\$) {
\t\t\tif(\$(document).ready(function(){
\t\t\t\t
\t\t\t\tfunction padTo2Digits(num) {
\t\t\t\t\treturn num.toString().padStart(2, '0');
\t\t\t\t};
\t\t
\t\t\t\tfunction formatDate(date) {
\t\t\t\t\treturn [
\t\t\t\t\t\tpadTo2Digits(date.getDate()),
\t\t\t\t\t\tpadTo2Digits(date.getMonth() + 1),
\t\t\t\t\t\tdate.getFullYear(),
\t\t\t\t\t].join('/');
\t\t\t\t};
\t\t\t\tfunction FormatedTextDate (dateSubmited, language) {
\t\t\t\t\tlet languageLocale = \"fr-BE\";
\t\t\t\t\tif(language == \"fr\") {
\t\t\t\t\t\tlanguageLocale = \"fr-BE\";
\t\t\t\t\t} else if(language == \"nl\") {
\t\t\t\t\t\tlanguageLocale = \"nl-BE\";
\t\t\t\t\t} else if(language == \"en\") {
\t\t\t\t\t\tlanguageLocale = \"en-US\";
\t\t\t\t\t}
\t\t\t\t\tlet date = new Date(dateSubmited);
\t\t\t\t\tlet year = date.getFullYear();
\t\t\t\t\tlet dayNumber = date.getDate();
\t\t\t\t\tlet dayText = date.toLocaleDateString(languageLocale, { weekday: \"short\" });
\t\t\t\t\tlet month = date.toLocaleDateString(languageLocale, { month: \"short\" });
\t\t
\t\t\t\t\tlet string = `\${capitalizeFirstLetter(dayText)} \${dayNumber} \${capitalizeFirstLetter(month)}, \${year}`;
\t\t\t\t\treturn string;
\t\t\t\t};
\t\t\t\tfunction capitalizeFirstLetter(string) {
\t\t\t\t\tstring = string.split('.').join(\"\");
\t\t\t\t\treturn string.charAt(0).toUpperCase() + string.slice(1);
\t\t\t\t}
\t\t\t\t
\t\t\t\tfunction focusSubmit() {
\t\t\t\t\t\$('#submit').focus();
\t\t\t\t\tconsole.log(\$('#submit'));
\t\t\t\t}
\t\t
\t\t\t\t\$( \"#bookDate\" ).datepicker({
\t\t\t\t\tminDate: 0,
\t\t\t\t\tshowButtonPanel: true,
\t\t\t\t\tdateFormat: 'dd/mm/yy',
\t\t\t\t\tregional: \"";
// line 448
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 448, $this->source); })()), "request", [], "any", false, false, false, 448), "locale", [], "any", false, false, false, 448), "html", null, true);
echo "\",
\t\t\t\t});
\t\t\t\t\$( \"#bookDate\" ).on('change', function(){
\t\t\t\t\tvar date = \$(this).datepicker( \"getDate\", {dateFormat: 'yy-mm-dd'} );
\t\t\t\t\t/* handle timezone */
\t\t\t\t\tconst offset = date.getTimezoneOffset();
\t\t\t\t\tdate = new Date(date.getTime() - (offset*60*1000));
\t\t\t\t\tvar datePicked = date.toISOString().split('T')[0];
\t\t\t\t\t\$(this).attr('data-value', datePicked);
\t\t\t\t\tvar desktopDate = \$(\".bookDateDesktopText\");
\t\t\t\t\tdesktopDate.val(FormatedTextDate(datePicked, '";
// line 460
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 460, $this->source); })()), "request", [], "any", false, false, false, 460), "locale", [], "any", false, false, false, 460), "html", null, true);
echo "'));
\t\t\t\t\tfocusSubmit();
\t\t\t\t\t
\t\t\t\t});
\t\t\t\t\$(\".bookDateDesktopText\").on('click', function(){
\t\t\t\t\t\$(\"#bookDate\").datepicker(\"show\");
\t\t\t\t});
\t\t\t\t\$('.apk-studios-filters button#submit').on('click', function(){
\t\t\t\t\t/* console.log('click'); */
\t\t\t\t\tlet headerHeight = \$('header').height();
\t\t\t\t\t\$(window).resize(function(){
\t\t\t\t\t\theaderHeight = \$('header').height();
\t\t\t\t\t});
\t\t\t\t\t\$([document.documentElement, document.body]).animate({
\t\t\t\t\t\tscrollTop: \$(\".apk-studios-list\").offset().top - headerHeight
\t\t\t\t\t}, 1000);
\t\t\t\t});
\t\t\t\tfunction submitClick(noScroll = null) {
\t\t\t\t\t\$('#submit').click();
\t\t\t\t\tif(noScroll) {
\t\t\t\t\t\t\$([document.documentElement, document.body]).animate().stop();
\t\t\t\t\t}
\t\t\t\t};
\t\t\t\tvar bookDate = document.getElementsByClassName('bookDateMobile');
\t\t\t\tvar bookHour = document.getElementsByClassName('bookHourMobile');
\t\t\t\tvar bookDuration = document.getElementsByClassName('bookDurationMobile');
\t\t\t\tvar bookHourDuration = \$('.bookHourDuration');
\t\t\t\tif (bookDate.length && bookDuration.length) {
\t\t\t\t\tbookDate = bookDate[0];
\t\t\t\t\tbookDuration = bookDuration[0];
\t\t\t\t\tbookHour = bookHour[0];
\t\t\t\t\t/* Date d'aujuord'hui + 1h */
\t\t\t\t\tvar nowPlusOne = new Date();
\t\t\t\t\tnowPlusOne.setHours(bookHour.getAttribute('data-value'));
\t\t\t\t\t/* nowPlusOne.setHours(nowPlusOne.getHours() + 1) */
\t\t\t\t\tvar pickerBookHour = new Picker(bookHour, {
\t\t\t\t\t\tdate: nowPlusOne,
\t\t\t\t\t\tcontainer: document.getElementById('hourContainer'),
\t\t\t\t\t\tinline: true,
\t\t\t\t\t\tformat: 'H',
\t\t\t\t\t\t";
// line 511
if ($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur")) {
// line 512
echo "\t\t\t\t\t\tminHour: parseInt(";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("OpeningStudiosOur"), "html", null, true);
echo "),
\t\t\t\t\t\t";
}
// line 514
echo "\t\t\t\t\t\t";
if ($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur")) {
// line 515
echo "\t\t\t\t\t\tmaxHour: parseInt(";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("ClosingStudiosOur"), "html", null, true);
echo "),
\t\t\t\t\t\t";
}
// line 517
echo "\t\t\t\t\t\tcontrols: true,
\t\t\t\t\t\theaders: true,
\t\t\t\t\t\tlanguage: \"";
// line 519
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 519, $this->source); })()), "request", [], "any", false, false, false, 519), "locale", [], "any", false, false, false, 519), "html", null, true);
echo "\",
\t\t\t\t\t\ttext: {
\t\t\t\t\t\t\ttitle: false, /*title: '";
// line 521
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select an hour to begin"), "html", null, true);
echo "', */
\t\t\t\t\t\t\tcancel: '";
// line 522
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html", null, true);
echo "',
\t\t\t\t\t\t\tconfirm: '";
// line 523
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("OK"), "html", null, true);
echo "',
\t\t\t\t\t\t\tyear: '";
// line 524
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Year"), "html", null, true);
echo "',
\t\t\t\t\t\t\tmonth: '";
// line 525
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Month"), "html", null, true);
echo "',
\t\t\t\t\t\t\tday: '";
// line 526
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Day"), "html", null, true);
echo "',
\t\t\t\t\t\t\thour: '";
// line 527
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Hout to begin"), "html", null, true);
echo "',
\t\t\t\t\t\t\tminute: '";
// line 528
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Minute"), "html", null, true);
echo "',
\t\t\t\t\t\t\tsecond: '";
// line 529
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Second"), "html", null, true);
echo "',
\t\t\t\t\t\t\tmillisecond: '";
// line 530
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Millisecond"), "html", null, true);
echo "'
\t\t\t\t\t\t},
\t\t\t\t\t});
\t\t\t\t\t
\t\t\t\t\tvar now = new Date();
\t\t\t\t\tvar oneHourDefault = new Date();
\t\t\t\t\tvar defaultHour = 3;
\t\t\t\t\tif(document.getElementById(\"bookDuration\").getAttribute('data-value')) {
\t\t\t\t\t\tdefaultHour = document.getElementById(\"bookDuration\").getAttribute('data-value');
\t\t\t\t\t}
\t\t\t\t\toneHourDefault.setHours(defaultHour);
\t\t\t\t\t
\t\t\t\t\tvar pickerBookDuration = new Picker(bookDuration, {
\t\t\t\t\t\tdate: oneHourDefault,
\t\t\t\t\t\tcontainer: document.getElementById('durationContainer'),
\t\t\t\t\t\tinline: true,
\t\t\t\t\t\tformat: 'H',
\t\t\t\t\t\tminDuration: 1,
\t\t\t\t\t\tmaxDuration: 12,
\t\t\t\t\t\tcontrols: true,
\t\t\t\t\t\theaders: true,
\t\t\t\t\t\tlanguage: \"";
// line 551
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 551, $this->source); })()), "request", [], "any", false, false, false, 551), "locale", [], "any", false, false, false, 551), "html", null, true);
echo "\",
\t\t\t\t\t\ttext: {
\t\t\t\t\t\t\ttitle: '";
// line 553
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select a duration"), "html", null, true);
echo "',
\t\t\t\t\t\t\tcancel: '";
// line 554
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html", null, true);
echo "',
\t\t\t\t\t\t\tconfirm: '";
// line 555
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("OK"), "html", null, true);
echo "',
\t\t\t\t\t\t\tyear: '";
// line 556
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Year"), "html", null, true);
echo "',
\t\t\t\t\t\t\tmonth: '";
// line 557
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Month"), "html", null, true);
echo "',
\t\t\t\t\t\t\tday: '";
// line 558
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Day"), "html", null, true);
echo "',
\t\t\t\t\t\t\thour: '";
// line 559
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Duration"), "html", null, true);
echo "',
\t\t\t\t\t\t\tminute: '";
// line 560
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Minute"), "html", null, true);
echo "',
\t\t\t\t\t\t\tsecond: '";
// line 561
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Second"), "html", null, true);
echo "',
\t\t\t\t\t\t\tmillisecond: '";
// line 562
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Millisecond"), "html", null, true);
echo "'
\t\t\t\t\t\t},
\t\t\t\t\t});
\t\t\t\t\tfunction updateValue(e) {
\t\t\t\t\t\tbookDate = e.target.value;
\t\t\t\t\t\t/* console.log('done'); */
\t\t\t\t\t};
\t\t\t\t\tfunction updateHourDuration () {
\t\t\t\t\t\tvar bookHourVal = \$('.bookHourMobile').val();
\t\t\t\t\t\tvar bookDurationVal = \$('.bookDurationMobile').attr('data-value');
\t\t\t\t\t\tvar hourType = \"\";
\t\t\t\t\t\tif(bookDurationVal > 1) {
\t\t\t\t\t\t\thourType = \"";
// line 576
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("hours"), "html", null, true);
echo "\";
\t\t\t\t\t\t} else {
\t\t\t\t\t\t\thourType = \"";
// line 578
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("hour"), "html", null, true);
echo "\";
\t\t\t\t\t\t}
\t\t\t\t\t\tvar text = \"";
// line 580
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("duration.before.hour"), "html", null, true);
echo "\" + \" \" + bookHourVal + \" \" + \"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("duration.middle.hour"), "html", null, true);
echo "\" + \" \" + bookDurationVal + \" \" + hourType ;
\t\t\t\t\t\tbookHourDuration.val(text);
\t\t\t\t\t};
\t\t\t\t\tupdateHourDuration ();
\t\t\t\t\tfunction setText() {
\t\t\t\t\t\t/* \$('#durationContainer .picker-item[data-value=\"0\"]').css({'display': 'none'}); */
\t\t\t\t\t\t\$('#durationContainer .picker-item').each(function() {
\t\t\t\t\t\t\tvar txt = \$(this).attr('data-value');
\t\t\t\t\t\t\tif(txt == \"1\" || txt == \"0\") {
\t\t\t\t\t\t\t\t\$(this).text(txt + \" \" + \"";
// line 590
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("hour"), "html", null, true);
echo "\");
\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\$(this).text(txt + \" \" + \"";
// line 592
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("hours"), "html", null, true);
echo "\");
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t\t\$('#hourContainer .picker-item').each(function() {
\t\t\t\t\t\t\tvar txt = \$(this).attr('data-value');
\t\t\t\t\t\t\t\$(this).text(txt + \"";
// line 598
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("h00"), "html", null, true);
echo "\");
\t\t\t\t\t\t})
\t\t\t\t\t};
\t\t\t\t\tsetText();
\t\t\t\t\tfunction updateHoursAfterMidnight(parent) {
\t\t\t\t\t\t\$(parent).find('.picker-list [data-value]').each( function() {
\t\t\t\t\t\t\tif(parseInt(\$(this).attr('data-value')) >= 24) {
\t\t\t\t\t\t\t\t\$(this).text(parseInt(\$(this).attr('data-value')) - 24 + 'h00');
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t};
\t\t\t\t\tpickerBookHour.pick = function () {
\t\t\t\t\t\tvar result = new Date(pickerBookHour.date);
\t\t\t\t\t\tvar now = new Date();
\t\t\t\t\t\tdateMinusOnemin = new Date(\$(\"#bookDate\").datepicker( \"getDate\", {dateFormat: 'yy-mm-dd'} ));
\t\t\t\t\t\tdateMinusOnemin.setHours(result.getHours());
\t\t\t\t\t\tdateMinusOnemin.setMinutes(now.getMinutes() - 1);
\t\t\t\t\t\tdateMinusOnemin.setSeconds(now.getSeconds());
\t\t\t\t\t\t/* console.log(now); */
\t\t\t\t\t\t/* console.log(dateMinusOnemin); */
\t\t\t\t\t\t/*
\t\t\t\t\t\tif(\$('.picker-open .picker-title .uk-alert').length) {
\t\t\t\t\t\t\tdocument.querySelector('.picker-open .picker-title .uk-alert').remove();
\t\t\t\t\t\t}
\t\t\t\t\t\tif (dateMinusOnemin <= now) {
\t\t\t\t\t\t\tvar pickerTitle = document.querySelector('.picker-open .picker-title');
\t\t\t\t\t\t\tvar message = '<div class=\"uk-alert-danger\" uk-alert><a class=\"uk-alert-close\" uk-close></a> ";
// line 627
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("La date ou l'heure sélectionnée est antérieur à la date actuelle."), "html", null, true);
echo "</div>';
\t\t\t\t\t\t\tpickerTitle.insertAdjacentHTML('beforeend', message);
\t\t\t\t\t\t\tsetTimeout(function () {
\t\t\t\t\t\t\t\tvar alert = document.querySelector('.picker-open .picker-title .uk-alert');
\t\t\t\t\t\t\t\t//alert.remove();
\t\t\t\t\t\t\t}, 5000)
\t\t\t\t\t\t\treturn false;
\t\t\t\t\t\t}
\t\t\t\t\t\t*/
\t\t\t\t\t\tvar hourPicked = result.getHours();
\t\t\t\t\t\tif(hourPicked >= 24) {
\t\t\t\t\t\t\thourPicked = hourPicked - 24;
\t\t\t\t\t\t}
\t\t\t\t\t\tbookHour.setAttribute('data-value', hourPicked);
\t\t\t\t\t\tbookHour.value = hourPicked + 'h00';
\t\t\t\t\t\tbookHour.focus();
\t\t\t\t\t\t
\t\t\t\t\t\tpickerBookHour.hide();
\t\t\t\t\t\tupdateHourDuration();
\t\t\t\t\t\tsetText();
\t\t\t\t\t\t\$('#hourContainer .picker-list [data-value]').removeClass('separator');
\t\t\t\t\t\t\$('#hourContainer .picker-list [data-value=\"'+ pickerBookHour.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t\tupdateHoursAfterMidnight('#hourContainer');
\t\t\t\t\t};
\t\t\t\t\t
\t\t\t\t\tupdateHoursAfterMidnight('#hourContainer');
\t\t\t\t\t
\t\t\t\t\tpickerBookDuration.pick = function () {
\t\t\t\t\t\tvar durationPicked = new Date(pickerBookDuration.date).getHours();
\t\t\t\t\t\tbookDuration.setAttribute('data-value', durationPicked);
\t\t\t\t\t\tbookDuration.value = durationPicked + 'h00';
\t\t\t\t\t\tbookDuration.focus();
\t\t\t\t\t\tpickerBookDuration.hide();
\t\t\t\t\t\tupdateHourDuration();
\t\t\t\t\t\tsetText();
\t\t\t\t\t\t\$('#durationContainer .picker-list [data-value]').removeClass('separator');
\t\t\t\t\t\t\$('#durationContainer .picker-list [data-value=\"'+ pickerBookDuration.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t};
\t\t\t\t\t\$('#hourContainer .picker-list [data-value=\"'+ pickerBookHour.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t\$('#durationContainer .picker-list [data-value=\"'+ pickerBookDuration.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t
\t\t\t\t};
\t\t\t\t/* Activate a trigger on the input field on button click */
\t\t\t\tif(\$('#modal-hours').length){
\t\t\t\t\t\$('#modal-hours .uk-button').on('click', function(e){
\t\t\t\t\t\tvar inputHour = \$('#bookHourMobile');
\t\t\t\t\t\t/* \$('#bookDate').focus(); */
\t\t\t\t\t\t/* \$('#bookDate').datepicker('hide'); */
\t\t\t\t\t\tfocusSubmit();
\t\t\t\t\t});
\t\t\t\t};
\t\t\t\t
\t\t\t}));
\t\t});
\t</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "studio/list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1133 => 627, 1101 => 598, 1092 => 592, 1087 => 590, 1072 => 580, 1067 => 578, 1062 => 576, 1045 => 562, 1041 => 561, 1037 => 560, 1033 => 559, 1029 => 558, 1025 => 557, 1021 => 556, 1017 => 555, 1013 => 554, 1009 => 553, 1004 => 551, 980 => 530, 976 => 529, 972 => 528, 968 => 527, 964 => 526, 960 => 525, 956 => 524, 952 => 523, 948 => 522, 944 => 521, 939 => 519, 935 => 517, 929 => 515, 926 => 514, 920 => 512, 918 => 511, 864 => 460, 849 => 448, 794 => 395, 784 => 394, 773 => 391, 767 => 389, 764 => 388, 762 => 387, 759 => 386, 756 => 385, 753 => 384, 750 => 383, 747 => 382, 744 => 381, 741 => 380, 738 => 379, 735 => 378, 732 => 377, 729 => 375, 727 => 374, 718 => 368, 707 => 360, 699 => 354, 693 => 353, 687 => 352, 681 => 349, 674 => 348, 671 => 347, 666 => 346, 662 => 345, 642 => 332, 635 => 328, 620 => 316, 613 => 311, 600 => 286, 591 => 279, 588 => 278, 570 => 262, 561 => 245, 558 => 244, 532 => 216, 522 => 212, 519 => 211, 511 => 209, 509 => 208, 503 => 206, 492 => 204, 483 => 202, 479 => 201, 475 => 199, 470 => 197, 466 => 196, 460 => 194, 457 => 193, 451 => 191, 448 => 190, 442 => 188, 439 => 187, 433 => 185, 430 => 184, 424 => 182, 422 => 181, 416 => 179, 413 => 178, 410 => 177, 407 => 176, 404 => 175, 402 => 174, 399 => 173, 393 => 171, 391 => 170, 387 => 169, 376 => 161, 372 => 159, 367 => 142, 361 => 139, 356 => 135, 349 => 133, 345 => 127, 340 => 126, 335 => 125, 333 => 124, 329 => 123, 323 => 120, 314 => 115, 310 => 112, 307 => 111, 294 => 109, 289 => 108, 287 => 107, 283 => 105, 277 => 104, 274 => 103, 271 => 102, 268 => 101, 262 => 99, 259 => 98, 249 => 96, 246 => 95, 243 => 94, 233 => 92, 230 => 91, 227 => 90, 222 => 89, 220 => 88, 214 => 85, 211 => 84, 209 => 83, 204 => 81, 199 => 79, 185 => 68, 181 => 66, 176 => 62, 166 => 58, 156 => 57, 152 => 56, 149 => 55, 145 => 54, 139 => 52, 133 => 50, 130 => 49, 124 => 47, 122 => 46, 118 => 43, 110 => 37, 102 => 34, 99 => 33, 97 => 32, 90 => 30, 87 => 29, 84 => 28, 81 => 27, 74 => 7, 69 => 4, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"layout.html.twig\" %}
{% block content %}
\t<!-- #main -->
\t<main id=\"main\" role=\"main\">
\t\t{{ pimcore_areablock('top-content') }}
\t\t<section id=\"sutdios\">
\t\t\t<div class=\"apk-studios exk_booking_studio_list\">
\t\t\t\t<div class=\"uk-container apk-container-1400\">
\t\t\t\t\t{#% for order in orders %}
\t\t\t\t\t\t\t{% if order.getPayment() %}
\t\t\t\t\t\t\t\t<div uk-alert class=\"uk-alert-warning\">
\t\t\t\t\t\t\t\t\t<p>{{'Vous avez une commande en cours de '|trans}}
\t\t\t\t\t\t\t\t\t\t{{order.getPayment().getTotalPrice()}}€.
\t\t\t\t\t\t\t\t\t\t{{'Cliquez sur le bouton pour continuer la commande'|trans}}</p>
\t\t\t\t\t\t\t\t\t<a class=\"uk-button\" href=\"{{path('checkout', {order: order.id})}}\">{{'Continuer' | trans}}</a>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<div uk-alert class=\"uk-alert-warning\">
\t\t\t\t\t\t\t\t\t<p>{{'Vous avez une commande en cours'|trans}}.
\t\t\t\t\t\t\t\t\t\t{{'Cliquez sur le bouton pour continuer la commande'|trans}}</p>
\t\t\t\t\t\t\t\t\t<a class=\"uk-button\" href=\"{{path('checkout', {order: order.id})}}\">{{'Continuer' | trans}}</a>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% endfor %#}
\t\t\t\t\t{% set orderLink = '<a href=\"' ~ path(\"account_orders\") ~ '\">' ~ \"cliquez ici\"|trans ~ '</a>' %}
\t\t\t\t\t{% if orders|length == 1 %}
\t\t\t\t\t\t<div class=\"apk-alert-orange apk-f-24\" uk-alert>\t
\t\t\t\t\t\t\t<p>{{ \"Vous avez une réservation en cours. Pour consulter votre réservation\"|trans }} {{ orderLink|raw }}.</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% elseif orders|length > 1 %}
\t\t\t\t\t\t<div class=\"apk-alert-orange apk-f-24\" uk-alert>
\t\t\t\t\t\t\t<p>{{ \"Vous avez des réservations en cours. Pour consulter vos réservations\"|trans }} {{ orderLink|raw }}.</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}
\t\t\t\t\t<div class=\"apk-studios-filters\">
\t\t\t\t\t\t<div class=\"uk-grid-medium uk-grid\" uk-grid uk-height-match=\"target: .apk-label-input-style , .apk-studios-filters-type\">
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t<div class=\"uk-width-2-3@m apk-studios-filters-inputs\">
\t\t\t\t\t\t\t\t<span class=\"apk-studios-filters--title uk-visible@s\">{{ \"Session\"|trans }}</span>
\t\t\t\t\t\t\t\t<div class=\"uk-child-width-1-4@s uk-grid-collapse uk-grid apk-studios-filters-inputs-upper\" uk-grid>
\t\t\t\t\t\t\t\t\t{#-- Ajout de la localisation --#}
\t\t\t\t\t\t\t\t\t{% if document.property('defaultSearchPlace') %}
\t\t\t\t\t\t\t\t\t\t<span id=\"defaultSearchPlaceId\" hidden apk-data-id=\"{{ document.property('defaultSearchPlace').id }}\"></span>
\t\t\t\t\t\t\t\t\t{% endif %}
{% if document.property('defaultSearchPlace') %}
<span id=\"defaultHoursSelected\" hidden apk-data-id=\"{{ pimcore_website_config('minimum_hours_selected', 1) }}\"></span>
{% endif %}
\t\t\t\t\t\t\t\t\t<span id=\"pageLanguage\" hidden apk-data-id=\"{{ app.request.locale }}\"></span>
\t\t\t\t\t\t\t\t\t{% for l in locations %}
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-auto@s uk-width-1-3@s uk-width-1-2 apk-width-75-2\">
\t\t\t\t\t\t\t\t\t\t<label for=\"{{ l.id }}\" class=\"apk-label-input-style is-radio-type\">
\t\t\t\t\t\t\t\t\t\t\t<input value=\"{{ l.id }}\" class=\"uk-checkbox\" type=\"radio\" id=\"{{ l.id }}\" data-studiodefault=\"{% if l.defaultCategory %}{{ l.defaultCategory.id }}{% endif %}\" required v-model=\"sLocation\" @change=\"searchStudios()\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"apk-label\">{{ l.name }}</span>
\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"uk-child-width-1-4@s uk-grid-collapse uk-grid\" uk-grid>
\t\t\t\t\t\t\t\t\t{# ----- #}
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-width-2-5\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\" style=\"position:relative;\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDate\" class=\"uk-visible@s\">{{ \"Date\"|trans }}</label>
\t\t\t\t\t\t\t\t\t\t\t<!-- Date Desktop text -->
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"!isMobile\" class=\"bookDateDesktop\" :class=\"{ 'exk-form-input-danger' : sDateNotValid }\" type=\"text\" name=\"bookDate\" id=\"bookDate\" :data-value=\"sDate\" v-model=\"sDateDesktop\" required style=\"position:absolute; bottom:0; z-index: -1;\">
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"!isMobile\" class=\"uk-input apk-input-date hide-browser-calendar bookDateDesktopText\" type=\"text\" :data-value=\"sDate\" v-model=\"sDateDesktopText\" required readonly=\"readonly\">
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" class=\"uk-input apk-input-date hide-browser-calendar bookDateMobile\" :class=\"{ 'exk-form-input-danger' : sDateNotValid }\" type=\"text\" name=\"bookDate\" id=\"bookDate\" required :value=\"sDateMobile\" :data-value=\"sDate\" readonly=\"readonly\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-visible@s\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDate\" class=\"uk-visible@s\">{{ \"Hour\"|trans }}</label>
\t\t\t\t\t\t\t\t\t\t\t<select v-if=\"!isMobile\" class=\"hide-browser-calendar uk-select apk-input-hour\" :class=\"{ 'exk-form-input-danger' : sHourNotValid }\" name=\"bookHour\" id=\"bookHour\" v-model=\"sHour\" @change=\"searchStudios()\" required>
\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">{{ \"Select an hour\"|trans }}</option>
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t{% set ii = [0 ,1 , 2, 3, 4, 5, 6, 7, 8 ,9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] %}
\t\t\t\t\t\t\t\t\t\t\t\t{% if pimcore_website_config('OpeningStudiosOur') and pimcore_website_config('ClosingStudiosOur') %}\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t{% set hourSeparator = null %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% for i in ii %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if pimcore_website_config('OpeningStudiosOur') < pimcore_website_config('ClosingStudiosOur') %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if i >= pimcore_website_config('OpeningStudiosOur') and i < pimcore_website_config('ClosingStudiosOur') %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{{ i }}\" v-if=\"{{ i }} >= minHourAllowed\">{{i}}h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if i < pimcore_website_config('ClosingStudiosOur') or i >= pimcore_website_config('OpeningStudiosOur') %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{{ i }}\" v-if=\"{{ i }} >= minHourAllowed\">{{i}}h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if not hourSeparator %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\" v-if=\"{{ i }} >= minHourAllowed\" disabled>---------------</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set hourSeparator = true %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{# si pas d'heures de début et de fin #}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% for i in ii %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{{ i }}\" v-if=\"{{ i }} >= minHourAllowed\">{{i}}h00</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t\t{# SELECTION DE L'heure MOBILE #}
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-select apk-input-hour bookHourMobile uk-visible@s\" :class=\"{ 'exk-form-input-danger' : sHourNotValid }\" name=\"bookHour\" id=\"bookHour\" @focus=\"searchStudios()\" placeholder=\"{{ \"Select an hour\"|trans }}\" required :data-value=\"sHour\" v-model=\"sHourMobile\" uk-toggle=\"target: #modal-hours\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-4@m uk-width-1-3@s uk-width-3-5\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-label-input-style\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bookDuration\" class=\"uk-visible@s\">{{ \"Duration\"|trans }}</label>
\t\t\t\t\t\t\t\t\t\t\t<select v-if=\"!isMobile\" class=\"uk-select apk-duration\" :class=\"{ 'exk-form-input-danger' : sDurationNotValid }\" name=\"bookDuration\" id=\"bookDuration\" v-model=\"sDuration\" @change=\"searchStudios()\" required>
\t\t\t\t\t\t\t\t\t\t\t\t<!-- DEBUT OPTIONS A DYNAMISER -->
\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">{{ \"Select a duration\"|trans }}</option>
\t\t\t\t\t\t\t\t\t\t\t\t{% set hh = [1 , 2, 3, 4, 5, 6, 7, 8 ,9, 10, 11, 12] %}
\t\t\t\t\t\t\t\t\t\t\t\t{% for h in hh %}
\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{{ h }}\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{h}}h00
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#% if h > 1 %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{h}} {{\"hours\"|trans}}\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{h}} {{\"hour\"|trans}}\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %#}
\t\t\t\t\t\t\t\t\t\t\t\t\t</option>
\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t<!-- FIN OPTIONS A DYNAMISER -->
\t\t\t\t\t\t\t\t\t\t\t</select>
\t
\t\t\t\t\t\t\t\t\t\t\t{# SELECTION DE LA DUREE MOBILE #}
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-select apk-duration bookDurationMobile uk-visible@s\" :class=\"{ 'exk-form-input-danger' : sDurationNotValid }\" name=\"bookDuration\" id=\"bookDuration\" placeholder=\"{{ \"Select a duration\"|trans }}\" required :data-value=\"sDuration\" readonly=\"readonly\" v-model=\"sDurationMobile\" uk-toggle=\"target: #modal-hours\">
\t
\t\t\t\t\t\t\t\t\t\t\t{# input qui affiche le texte des selections d'heure' et durées #}
\t\t\t\t\t\t\t\t\t\t\t<input v-if=\"isMobile\" type=\"text\" class=\"uk-input bookHourDuration uk-hidden@s apk-duration\" readonly=\"readonly\" uk-toggle=\"target: #modal-hours\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t{#
\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-1@s uk-width-auto\" apk-absolute-mobile>
\t\t\t\t\t\t\t\t\t\t<div class=\"uk-text-right@s uk-text-center\">
\t\t\t\t\t\t\t\t\t\t\t<button class=\"uk-button uk-button-white\" id=\"submit\" @click=\"searchStudios()\">
\t\t\t\t\t\t\t\t\t\t\t\t{{ \"Recherche\"|trans }}
\t\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uk-margin-top uk-visible@s\">
\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"uk-button uk-button-white\" href=\"{{ path(\"studioList\") }}?reset=1\">
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ \"Réinitialiser\"|trans }}
\t\t\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t#}
\t\t\t\t\t\t\t\t\t<div class=\"uk-position-relative\">
\t\t\t\t\t\t\t\t\t\t<button id=\"submit\" @focus=\"searchStudios()\" style=\"width:1px; height:1px; position: absolute; top: 0; left: 0; z-index: -1;\">
\t\t\t\t\t\t\t\t\t\t\t{{ \"Recherche\"|trans }}
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"uk-width-1-3@m uk-flex-first@m apk-margin-small-mobile\">
\t\t\t\t\t\t\t\t<span class=\"apk-studios-filters--title uk-visible@s\">{{ \"Studio type\"|trans }}</span>
\t\t\t\t\t\t\t\t{% if app.request.get('studioTypeId') is defined %}
\t\t\t\t\t\t\t\t\t<span id=\"predefinedStudio\" predefinedStudio=\"{{app.request.get('studioTypeId')}}\" hidden></span>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if pimcore_website_config('maxHourSearch') is not null %}
\t\t\t\t\t\t\t\t\t{% set maxHourSearch = pimcore_website_config('maxHourSearch') %}
\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t{% set maxHourSearch = '20:15' %}
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"maxHourSearch\" value=\"{{maxHourSearch}}\" hidden/>
\t\t\t\t\t\t\t\t{% if pimcore_website_config('OpeningStudiosOur') is not null %}
\t\t\t\t\t\t\t\t\t<input id=\"openingOurs\" value=\"{{pimcore_website_config('OpeningStudiosOur')}}\" hidden/>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if pimcore_website_config('ClosingStudiosOur') is not null %}
\t\t\t\t\t\t\t\t\t<input id=\"closingOurs\" value=\"{{pimcore_website_config('ClosingStudiosOur')}}\" hidden/>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if pimcore_website_config('durationBeforeNextHour') is not null %}
\t\t\t\t\t\t\t\t\t<input id=\"durationBeforeNextHour\" value=\"{{pimcore_website_config('durationBeforeNextHour')}}\" hidden/>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if pimcore_website_config('defaultSearchStudio') is not null %}
\t\t\t\t\t\t\t\t\t<input id=\"defaultSearchStudio\" value=\"{{pimcore_website_config('defaultSearchStudio').id}}\" hidden/>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if pimcore_website_config('defaultSearchStudioSubCat') is not null %}
\t\t\t\t\t\t\t\t\t<input id=\"defaultSearchStudioSubCat\" value=\"{{pimcore_website_config('defaultSearchStudioSubCat').id}}\" hidden/>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t<div hidden {#apk-mobile-show#}>
\t\t\t\t\t\t\t\t\t<span>{{ \"Chose your type of studio\"|trans }}</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"apk-studios-filters-content\" {#apk-mobile-dropdown#}>
\t\t\t\t\t\t\t\t\t<div class=\"uk-grid-small uk-grid\" uk-grid uk-height-match=\"target: .apk-studios-filters-type\">
\t\t\t\t\t\t\t\t\t\t{% for studCat in studioCategories %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uk-width-1-2\" {% if studCat.place %}v-if=\"sLocation == {{ studCat.place.id }}\"{% endif %}>
\t\t\t\t\t\t\t\t\t\t\t\t{# --Checkbox lié à la catégorie (à laisser au dessus et au même niveau que le label pour le style)-- #}
\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"uk-dark uk-checkbox\" name=\"studioCat\" id=\"studioCat_{{ studCat.id }}\" data-place=\"{% if studCat.place %}{{ studCat.place.id }}{% endif %}\" value=\"{{ studCat.id }}\" @change=\"searchStudios()\" v-model=\"studioCats\">
\t\t\t\t\t\t\t\t\t\t\t\t{# ---- #}
\t\t\t\t\t\t\t\t\t\t\t\t<label class=\"apk-studios-filters-type uk-text-center\" for=\"studioCat_{{ studCat.id }}\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-filters-media\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if studCat.image %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img uk-svg width=\"26\" height=\"26\" src=\"{{ studCat.image }}\" alt=\"{{ studCat.title }}\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{{ studCat.title }}</span>
\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div style=\"min-height:821px;\">
\t\t\t\t\t\t<div id=\"subcateg\" vue-loading v-if=\"showSubCats\">
\t\t\t\t\t\t\t<div class=\"apk-studios-filters-subtype uk-flex uk-flex-left@s uk-flex-center uk-text-center uk-width-expand@s uk-child-width-auto uk-grid-collapse uk-width-1-1 uk-grid\"
\t\t\t\t\t\t\t\tuk-grid :class=\"{'apk-display-grid' : (studioSCats.length > 2 && isMobile)}\">
\t\t\t\t\t\t\t\t<div v-for=\"souscateg in studioSCats\"
\t\t\t\t\t\t\t\t:class=\"{'apk-subcategs-inline' : (studioSCats.length > 2 && isMobile)}\">
\t\t\t\t\t\t\t\t\t<input class=\"scateg-checkbox-selector uk-checkbox\" type=\"checkbox\" :name=\"'studioSCat_'+[[souscateg.id]]\" :id=\"'studioSCat_'+[[souscateg.id]]\" :true-value=\"souscateg.id\"
:false-value=\"0\" @change=\"searchStudios()\" v-model=\"studioSCatsSelected\"/>
\t\t\t\t\t\t\t\t\t<label :for=\"'studioSCat_'+[[souscateg.id]]\">
\t\t\t\t\t\t\t\t\t\t<span>[[souscateg.title]]</span>
\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t
\t\t\t\t\t\t<div id=\"availability\" class=\"apk-studios-filters-results\" :class=\"studioAvailable == 1 ? 'available' : 'unavailable'\" vue-loading>
\t\t\t\t\t\t\t{# <span v-if=\"studioAvailable == 1\">
\t\t\t\t\t\t\t\t[[ studioList.length ]] {{ \"studio(s) libres(s) à l'heure/date choisie\"|trans }}
\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t #}
\t\t\t\t\t\t\t<span v-if=\"studioAvailable == 0\">
\t\t\t\t\t\t\t\t{{ \"Pas de studio libre à la date/heure sélectionnée ci-dessus\"|trans }}
\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t
\t\t\t\t\t\t<div class=\"apk-studios-list\" vue-loading>
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t{#<div v-if=\"studioAvailable == true\" class=\"apk-result\">
\t\t\t\t\t\t\t\t<small v-if=\"studioList.length\">[[ studioList.length ]]
\t\t\t\t\t\t\t\t\t{{ \"studios found\"|trans }}</small>
\t\t\t\t\t\t\t\t<small v-else>{{ \"No studios found\"|trans }}</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div v-else class=\"apk-result\">
\t\t\t\t\t\t\t\t<small v-if=\"studioList.length\">
\t\t\t\t\t\t\t\t\t{{ \"No available studios found\"|trans }}</small>
\t\t\t\t\t\t\t\t<small v-else>{{ \"No studios found\"|trans }}</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t#}
\t\t\t\t\t\t\t<div class=\"uk-grid\" uk-grid uk-height-match=\"target: .apk-studios-box-bottom\">
\t
\t\t\t\t\t\t\t\t<div class=\"uk-width-1-3@m uk-width-1-2@s\" v-for=\"studio in studioList\">
\t\t\t\t\t\t\t\t\t<!-- FORM avec action vers le checkout -->
\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box uk-dark\">
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box-top\">
\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-title\">
\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span v-if=\"studio.titleTranslated\" class=\"uk-h3\" :class=\"studio.cssFontSizeTitle\" style=\"white-space: pre-wrap;\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t[[ studio.titleTranslated ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t<span v-else class=\"uk-h3\" :class=\"studio.cssFontSizeTitle\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t[[ studio.title ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-media uk-cover-container\" {#apk-show-more#}>
\t\t\t\t\t\t\t\t\t\t\t\t<div {#}:href=\"studio.detailURL\"#} v-html=\"studio.image\"></div>
\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-audience uk-text-center\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img uk-svg width=\"20\" height=\"15\" src=\"/static/img/pictos/audience.svg\" alt=\"\">
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>[[ studio.maxPersons ]]
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ \"max\"|trans }}</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t
\t\t\t\t\t\t\t\t\t\t\t<!---------------->
\t\t\t\t\t\t\t\t\t\t\t<div v-if=\"studio.shortInfos\" class=\"apk-short-description\" v-html=\"studio.shortInfos\">
\t
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t<hr class=\"uk-margin-small-top uk-margin-small-bottom\" v-if=\"studio.shortInfos\"/>
\t\t\t\t\t\t\t\t\t\t\t{#
\t\t\t\t\t\t\t\t\t\t\t<ul class=\"apk-promo-inline\">
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t<li>
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ \"Jacks specials\"|trans|raw }}
\t\t\t\t\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t<li v-if=\"studio.promoLeft\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<span :class=\"studio.promoLeftSize\">[[ studio.promoLeft ]]</span>
\t\t\t\t\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t\t\t\t\t\t<li v-if=\"studio.promoRight\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<span :class=\"studio.promoRightSize\">[[ studio.promoRight ]]</span>
\t\t\t\t\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t\t\t\t\t</ul>
\t\t\t\t\t\t\t\t\t\t\t#}
\t
\t\t\t\t\t\t\t\t\t\t\t<!---------------->
\t
\t\t\t\t\t\t\t\t\t\t\t<ul v-if=\"studio.infos\" class=\"apk-infos uk-margin-small-top uk-margin-small-bottom\" uk-accordion>
\t\t\t\t\t\t\t\t\t\t\t\t<li>
\t\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"uk-accordion-title apk-infos--title\" href=\"#\">{{ \"More info about this studio ?\"|trans }}</a>
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uk-accordion-content\">
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"apk-infos--text uk-margin-small-bottom\" v-html=\"studio.infos\"></div>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr class=\"uk-margin-remove\"/>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"uk-margin-small-top apk-infos--text\" v-html=\"studio.gear\"></p>
\t
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t\t\t\t\t</ul>
\t\t\t\t\t\t\t\t\t\t\t<span v-if=\"!studio.infos\" class=\"uk-display-block uk-margin-small-top apk-infos--title\">{{ \"No infos\"|trans }}</span>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-studios-box-bottom\">
\t\t\t\t\t\t\t\t\t\t\t<hr/>
\t\t\t\t\t\t\t\t\t\t\t<span :id=\"'exk_vue_booking_'+studio.id\" class=\"exk_vue_booking\" :data-lockText=\"studio.lockText\" :data-placeLock=\"studio.placeLock\" :data-studio=\"studio.id\" :data-searchdate=\"sDate\" :data-searchhour=\"sHour\" :data-searchduration=\"sDuration\" :data-defaultprice=\"studio.defaultPrice\" :data-availability=\"studio.availability\" :data-displaycalendar=\"{{ displayCalendar }}\" :data-detailstudio=\"{{ detailstudio }}\" data-language=\"{{ app.request.locale }}\"></span>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>\t
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div id=\"modal-hours\" class=\"uk-flex-top uk-modal\" uk-modal=\"bg-close: false\">
\t\t\t\t\t<div class=\"uk-modal-dialog uk-modal-body uk-margin-auto-vertical\">
\t\t\t\t\t\t<div class=\"apk-modal-promotions uk-dark\">
\t\t\t\t\t\t\t{% for studCat in studioCategories %}
\t\t\t\t\t\t\t\t{% for studSubCat in studCat.categories %}
\t\t\t\t\t\t\t\t\t{% if studSubCat.pricingGrid.mobilePromo %}
\t\t\t\t\t\t\t\t\t\t<div class=\"apk-modal-promotions-inner\" v-if=\"studioSCatsSelectedPromo == {{studSubCat.id}}\" id=\"{{studSubCat.id}}\">
\t\t\t\t\t\t\t\t\t\t\t{{studSubCat.pricingGrid.mobilePromo}}
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uk-flex\">
\t\t\t\t\t\t\t<div id=\"hourContainer\"></div>
\t\t\t\t\t\t\t<div id=\"durationContainer\"></div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"uk-text-center uk-margin-top\">
\t\t\t\t\t\t\t<button class=\"uk-button uk-button-black uk-width-1-1 uk-modal-close\" type=\"button\">{{ \"Done\"|trans }}</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</section>
\t\t{{ pimcore_areablock('bottom-content') }}
\t</main>
\t<!-- end #main -->
\t{% include \"studio/booking-studio.html.twig\" %}
\t{# condition pour le dev et prod #}
\t{% if pimcore_website_config('minify-css-js') %}
\t\t{% do pimcore_head_script().appendFile('/static/js/minified/booking/picker.min.js') %}
\t\t{% do pimcore_head_script().appendFile('/static/js/minified/booking/core.min.js') %}
\t\t{% do pimcore_head_script().appendFile('/static/js/minified/booking/list.min.js') %}
\t{% else %}
\t\t{% do pimcore_head_script().appendFile(asset('/static/js/booking/picker.js')) %}
\t\t{% do pimcore_head_script().appendFile('/static/js/booking/core.js') %}
\t\t{% do pimcore_head_script().appendFile('/static/js/booking/list.js') %}
\t{% endif %}
\t{% do pimcore_head_script().appendFile('/static/js/jquery-ui/jquery-ui.1.13.2.min.js') %}
\t{% if app.request.locale == \"fr\" %}
\t\t{% do pimcore_head_script().appendFile('/static/js/jquery-ui/locale-fr.min.js') %}\t
\t{% endif %}
{% endblock %}
{% block inlinescripts %}
\t<script>
\t\t/* \tPicker de d'heures
\t\t\tDocumentation : https://github.com/fengyuanchen/pickerjs/blob/master/README.md */
\t\tjQuery(function (\$) {
\t\t\tif(\$(document).ready(function(){
\t\t\t\t
\t\t\t\tfunction padTo2Digits(num) {
\t\t\t\t\treturn num.toString().padStart(2, '0');
\t\t\t\t};
\t\t
\t\t\t\tfunction formatDate(date) {
\t\t\t\t\treturn [
\t\t\t\t\t\tpadTo2Digits(date.getDate()),
\t\t\t\t\t\tpadTo2Digits(date.getMonth() + 1),
\t\t\t\t\t\tdate.getFullYear(),
\t\t\t\t\t].join('/');
\t\t\t\t};
\t\t\t\tfunction FormatedTextDate (dateSubmited, language) {
\t\t\t\t\tlet languageLocale = \"fr-BE\";
\t\t\t\t\tif(language == \"fr\") {
\t\t\t\t\t\tlanguageLocale = \"fr-BE\";
\t\t\t\t\t} else if(language == \"nl\") {
\t\t\t\t\t\tlanguageLocale = \"nl-BE\";
\t\t\t\t\t} else if(language == \"en\") {
\t\t\t\t\t\tlanguageLocale = \"en-US\";
\t\t\t\t\t}
\t\t\t\t\tlet date = new Date(dateSubmited);
\t\t\t\t\tlet year = date.getFullYear();
\t\t\t\t\tlet dayNumber = date.getDate();
\t\t\t\t\tlet dayText = date.toLocaleDateString(languageLocale, { weekday: \"short\" });
\t\t\t\t\tlet month = date.toLocaleDateString(languageLocale, { month: \"short\" });
\t\t
\t\t\t\t\tlet string = `\${capitalizeFirstLetter(dayText)} \${dayNumber} \${capitalizeFirstLetter(month)}, \${year}`;
\t\t\t\t\treturn string;
\t\t\t\t};
\t\t\t\tfunction capitalizeFirstLetter(string) {
\t\t\t\t\tstring = string.split('.').join(\"\");
\t\t\t\t\treturn string.charAt(0).toUpperCase() + string.slice(1);
\t\t\t\t}
\t\t\t\t
\t\t\t\tfunction focusSubmit() {
\t\t\t\t\t\$('#submit').focus();
\t\t\t\t\tconsole.log(\$('#submit'));
\t\t\t\t}
\t\t
\t\t\t\t\$( \"#bookDate\" ).datepicker({
\t\t\t\t\tminDate: 0,
\t\t\t\t\tshowButtonPanel: true,
\t\t\t\t\tdateFormat: 'dd/mm/yy',
\t\t\t\t\tregional: \"{{ app.request.locale }}\",
\t\t\t\t});
\t\t\t\t\$( \"#bookDate\" ).on('change', function(){
\t\t\t\t\tvar date = \$(this).datepicker( \"getDate\", {dateFormat: 'yy-mm-dd'} );
\t\t\t\t\t/* handle timezone */
\t\t\t\t\tconst offset = date.getTimezoneOffset();
\t\t\t\t\tdate = new Date(date.getTime() - (offset*60*1000));
\t\t\t\t\tvar datePicked = date.toISOString().split('T')[0];
\t\t\t\t\t\$(this).attr('data-value', datePicked);
\t\t\t\t\tvar desktopDate = \$(\".bookDateDesktopText\");
\t\t\t\t\tdesktopDate.val(FormatedTextDate(datePicked, '{{app.request.locale}}'));
\t\t\t\t\tfocusSubmit();
\t\t\t\t\t
\t\t\t\t});
\t\t\t\t\$(\".bookDateDesktopText\").on('click', function(){
\t\t\t\t\t\$(\"#bookDate\").datepicker(\"show\");
\t\t\t\t});
\t\t\t\t\$('.apk-studios-filters button#submit').on('click', function(){
\t\t\t\t\t/* console.log('click'); */
\t\t\t\t\tlet headerHeight = \$('header').height();
\t\t\t\t\t\$(window).resize(function(){
\t\t\t\t\t\theaderHeight = \$('header').height();
\t\t\t\t\t});
\t\t\t\t\t\$([document.documentElement, document.body]).animate({
\t\t\t\t\t\tscrollTop: \$(\".apk-studios-list\").offset().top - headerHeight
\t\t\t\t\t}, 1000);
\t\t\t\t});
\t\t\t\tfunction submitClick(noScroll = null) {
\t\t\t\t\t\$('#submit').click();
\t\t\t\t\tif(noScroll) {
\t\t\t\t\t\t\$([document.documentElement, document.body]).animate().stop();
\t\t\t\t\t}
\t\t\t\t};
\t\t\t\tvar bookDate = document.getElementsByClassName('bookDateMobile');
\t\t\t\tvar bookHour = document.getElementsByClassName('bookHourMobile');
\t\t\t\tvar bookDuration = document.getElementsByClassName('bookDurationMobile');
\t\t\t\tvar bookHourDuration = \$('.bookHourDuration');
\t\t\t\tif (bookDate.length && bookDuration.length) {
\t\t\t\t\tbookDate = bookDate[0];
\t\t\t\t\tbookDuration = bookDuration[0];
\t\t\t\t\tbookHour = bookHour[0];
\t\t\t\t\t/* Date d'aujuord'hui + 1h */
\t\t\t\t\tvar nowPlusOne = new Date();
\t\t\t\t\tnowPlusOne.setHours(bookHour.getAttribute('data-value'));
\t\t\t\t\t/* nowPlusOne.setHours(nowPlusOne.getHours() + 1) */
\t\t\t\t\tvar pickerBookHour = new Picker(bookHour, {
\t\t\t\t\t\tdate: nowPlusOne,
\t\t\t\t\t\tcontainer: document.getElementById('hourContainer'),
\t\t\t\t\t\tinline: true,
\t\t\t\t\t\tformat: 'H',
\t\t\t\t\t\t{% if pimcore_website_config('OpeningStudiosOur') %}
\t\t\t\t\t\tminHour: parseInt({{pimcore_website_config('OpeningStudiosOur')}}),
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% if pimcore_website_config('ClosingStudiosOur') %}
\t\t\t\t\t\tmaxHour: parseInt({{pimcore_website_config('ClosingStudiosOur')}}),
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\tcontrols: true,
\t\t\t\t\t\theaders: true,
\t\t\t\t\t\tlanguage: \"{{ app.request.locale }}\",
\t\t\t\t\t\ttext: {
\t\t\t\t\t\t\ttitle: false, /*title: '{{ \"Select an hour to begin\"|trans }}', */
\t\t\t\t\t\t\tcancel: '{{ \"Cancel\"|trans }}',
\t\t\t\t\t\t\tconfirm: '{{ \"OK\"|trans }}',
\t\t\t\t\t\t\tyear: '{{ \"Year\"|trans }}',
\t\t\t\t\t\t\tmonth: '{{ \"Month\"|trans }}',
\t\t\t\t\t\t\tday: '{{ \"Day\"|trans }}',
\t\t\t\t\t\t\thour: '{{ \"Hout to begin\"|trans }}',
\t\t\t\t\t\t\tminute: '{{ \"Minute\"|trans }}',
\t\t\t\t\t\t\tsecond: '{{ \"Second\"|trans }}',
\t\t\t\t\t\t\tmillisecond: '{{ \"Millisecond\"|trans }}'
\t\t\t\t\t\t},
\t\t\t\t\t});
\t\t\t\t\t
\t\t\t\t\tvar now = new Date();
\t\t\t\t\tvar oneHourDefault = new Date();
\t\t\t\t\tvar defaultHour = 3;
\t\t\t\t\tif(document.getElementById(\"bookDuration\").getAttribute('data-value')) {
\t\t\t\t\t\tdefaultHour = document.getElementById(\"bookDuration\").getAttribute('data-value');
\t\t\t\t\t}
\t\t\t\t\toneHourDefault.setHours(defaultHour);
\t\t\t\t\t
\t\t\t\t\tvar pickerBookDuration = new Picker(bookDuration, {
\t\t\t\t\t\tdate: oneHourDefault,
\t\t\t\t\t\tcontainer: document.getElementById('durationContainer'),
\t\t\t\t\t\tinline: true,
\t\t\t\t\t\tformat: 'H',
\t\t\t\t\t\tminDuration: 1,
\t\t\t\t\t\tmaxDuration: 12,
\t\t\t\t\t\tcontrols: true,
\t\t\t\t\t\theaders: true,
\t\t\t\t\t\tlanguage: \"{{ app.request.locale }}\",
\t\t\t\t\t\ttext: {
\t\t\t\t\t\t\ttitle: '{{ \"Select a duration\"|trans }}',
\t\t\t\t\t\t\tcancel: '{{ \"Cancel\"|trans }}',
\t\t\t\t\t\t\tconfirm: '{{ \"OK\"|trans }}',
\t\t\t\t\t\t\tyear: '{{ \"Year\"|trans }}',
\t\t\t\t\t\t\tmonth: '{{ \"Month\"|trans }}',
\t\t\t\t\t\t\tday: '{{ \"Day\"|trans }}',
\t\t\t\t\t\t\thour: '{{ \"Duration\"|trans }}',
\t\t\t\t\t\t\tminute: '{{ \"Minute\"|trans }}',
\t\t\t\t\t\t\tsecond: '{{ \"Second\"|trans }}',
\t\t\t\t\t\t\tmillisecond: '{{ \"Millisecond\"|trans }}'
\t\t\t\t\t\t},
\t\t\t\t\t});
\t\t\t\t\tfunction updateValue(e) {
\t\t\t\t\t\tbookDate = e.target.value;
\t\t\t\t\t\t/* console.log('done'); */
\t\t\t\t\t};
\t\t\t\t\tfunction updateHourDuration () {
\t\t\t\t\t\tvar bookHourVal = \$('.bookHourMobile').val();
\t\t\t\t\t\tvar bookDurationVal = \$('.bookDurationMobile').attr('data-value');
\t\t\t\t\t\tvar hourType = \"\";
\t\t\t\t\t\tif(bookDurationVal > 1) {
\t\t\t\t\t\t\thourType = \"{{'hours'|trans}}\";
\t\t\t\t\t\t} else {
\t\t\t\t\t\t\thourType = \"{{'hour'|trans}}\";
\t\t\t\t\t\t}
\t\t\t\t\t\tvar text = \"{{ \"duration.before.hour\"|trans }}\" + \" \" + bookHourVal + \" \" + \"{{ \"duration.middle.hour\"|trans }}\" + \" \" + bookDurationVal + \" \" + hourType ;
\t\t\t\t\t\tbookHourDuration.val(text);
\t\t\t\t\t};
\t\t\t\t\tupdateHourDuration ();
\t\t\t\t\tfunction setText() {
\t\t\t\t\t\t/* \$('#durationContainer .picker-item[data-value=\"0\"]').css({'display': 'none'}); */
\t\t\t\t\t\t\$('#durationContainer .picker-item').each(function() {
\t\t\t\t\t\t\tvar txt = \$(this).attr('data-value');
\t\t\t\t\t\t\tif(txt == \"1\" || txt == \"0\") {
\t\t\t\t\t\t\t\t\$(this).text(txt + \" \" + \"{{\"hour\"|trans}}\");
\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\$(this).text(txt + \" \" + \"{{\"hours\"|trans}}\");
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t\t\$('#hourContainer .picker-item').each(function() {
\t\t\t\t\t\t\tvar txt = \$(this).attr('data-value');
\t\t\t\t\t\t\t\$(this).text(txt + \"{{\"h00\"|trans}}\");
\t\t\t\t\t\t})
\t\t\t\t\t};
\t\t\t\t\tsetText();
\t\t\t\t\tfunction updateHoursAfterMidnight(parent) {
\t\t\t\t\t\t\$(parent).find('.picker-list [data-value]').each( function() {
\t\t\t\t\t\t\tif(parseInt(\$(this).attr('data-value')) >= 24) {
\t\t\t\t\t\t\t\t\$(this).text(parseInt(\$(this).attr('data-value')) - 24 + 'h00');
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t};
\t\t\t\t\tpickerBookHour.pick = function () {
\t\t\t\t\t\tvar result = new Date(pickerBookHour.date);
\t\t\t\t\t\tvar now = new Date();
\t\t\t\t\t\tdateMinusOnemin = new Date(\$(\"#bookDate\").datepicker( \"getDate\", {dateFormat: 'yy-mm-dd'} ));
\t\t\t\t\t\tdateMinusOnemin.setHours(result.getHours());
\t\t\t\t\t\tdateMinusOnemin.setMinutes(now.getMinutes() - 1);
\t\t\t\t\t\tdateMinusOnemin.setSeconds(now.getSeconds());
\t\t\t\t\t\t/* console.log(now); */
\t\t\t\t\t\t/* console.log(dateMinusOnemin); */
\t\t\t\t\t\t/*
\t\t\t\t\t\tif(\$('.picker-open .picker-title .uk-alert').length) {
\t\t\t\t\t\t\tdocument.querySelector('.picker-open .picker-title .uk-alert').remove();
\t\t\t\t\t\t}
\t\t\t\t\t\tif (dateMinusOnemin <= now) {
\t\t\t\t\t\t\tvar pickerTitle = document.querySelector('.picker-open .picker-title');
\t\t\t\t\t\t\tvar message = '<div class=\"uk-alert-danger\" uk-alert><a class=\"uk-alert-close\" uk-close></a> {{ \"La date ou l\\'heure sélectionnée est antérieur à la date actuelle.\"|trans }}</div>';
\t\t\t\t\t\t\tpickerTitle.insertAdjacentHTML('beforeend', message);
\t\t\t\t\t\t\tsetTimeout(function () {
\t\t\t\t\t\t\t\tvar alert = document.querySelector('.picker-open .picker-title .uk-alert');
\t\t\t\t\t\t\t\t//alert.remove();
\t\t\t\t\t\t\t}, 5000)
\t\t\t\t\t\t\treturn false;
\t\t\t\t\t\t}
\t\t\t\t\t\t*/
\t\t\t\t\t\tvar hourPicked = result.getHours();
\t\t\t\t\t\tif(hourPicked >= 24) {
\t\t\t\t\t\t\thourPicked = hourPicked - 24;
\t\t\t\t\t\t}
\t\t\t\t\t\tbookHour.setAttribute('data-value', hourPicked);
\t\t\t\t\t\tbookHour.value = hourPicked + 'h00';
\t\t\t\t\t\tbookHour.focus();
\t\t\t\t\t\t
\t\t\t\t\t\tpickerBookHour.hide();
\t\t\t\t\t\tupdateHourDuration();
\t\t\t\t\t\tsetText();
\t\t\t\t\t\t\$('#hourContainer .picker-list [data-value]').removeClass('separator');
\t\t\t\t\t\t\$('#hourContainer .picker-list [data-value=\"'+ pickerBookHour.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t\tupdateHoursAfterMidnight('#hourContainer');
\t\t\t\t\t};
\t\t\t\t\t
\t\t\t\t\tupdateHoursAfterMidnight('#hourContainer');
\t\t\t\t\t
\t\t\t\t\tpickerBookDuration.pick = function () {
\t\t\t\t\t\tvar durationPicked = new Date(pickerBookDuration.date).getHours();
\t\t\t\t\t\tbookDuration.setAttribute('data-value', durationPicked);
\t\t\t\t\t\tbookDuration.value = durationPicked + 'h00';
\t\t\t\t\t\tbookDuration.focus();
\t\t\t\t\t\tpickerBookDuration.hide();
\t\t\t\t\t\tupdateHourDuration();
\t\t\t\t\t\tsetText();
\t\t\t\t\t\t\$('#durationContainer .picker-list [data-value]').removeClass('separator');
\t\t\t\t\t\t\$('#durationContainer .picker-list [data-value=\"'+ pickerBookDuration.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t};
\t\t\t\t\t\$('#hourContainer .picker-list [data-value=\"'+ pickerBookHour.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t\$('#durationContainer .picker-list [data-value=\"'+ pickerBookDuration.data.hour.min +'\"]').addClass('separator');
\t\t\t\t\t
\t\t\t\t};
\t\t\t\t/* Activate a trigger on the input field on button click */
\t\t\t\tif(\$('#modal-hours').length){
\t\t\t\t\t\$('#modal-hours .uk-button').on('click', function(e){
\t\t\t\t\t\tvar inputHour = \$('#bookHourMobile');
\t\t\t\t\t\t/* \$('#bookDate').focus(); */
\t\t\t\t\t\t/* \$('#bookDate').datepicker('hide'); */
\t\t\t\t\t\tfocusSubmit();
\t\t\t\t\t});
\t\t\t\t};
\t\t\t\t
\t\t\t}));
\t\t});
\t</script>
{% endblock %}
", "studio/list.html.twig", "/data/sites/web/plugthejackcom/subsites/ptj.apik-pp.be/templates/studio/list.html.twig");
}
}