var/cache/dev/twig/89/89cb173e85e83c94e902a3096fe03666.php line 74

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* jobOffer/content.html.twig */
  14. class __TwigTemplate_84e091c681ced0b6306b797ee40f0f12 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'js' => [$this'block_js'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 11
  30.         return $this->loadTemplate((isset($context["base"]) || array_key_exists("base"$context) ? $context["base"] : (function () { throw new RuntimeError('Variable "base" does not exist.'11$this->source); })()), "jobOffer/content.html.twig"11);
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""jobOffer/content.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""jobOffer/content.html.twig"));
  39.         // line 1
  40.         if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") == true)) {
  41.             $context["base"] = "base.html.twig";
  42.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ENTREPRISE") == true)) {
  43.             // line 2
  44.             $context["base"] = "base_company.html.twig";
  45.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DIPLOME") == true)) {
  46.             // line 3
  47.             $context["base"] = "base_degree.html.twig";
  48.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ETABLISSEMENT") == true)) {
  49.             // line 4
  50.             $context["base"] = "base_school.html.twig";
  51.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_PRINCIPAL") == true)) {
  52.             // line 5
  53.             $context["base"] = "base_principal.html.twig";
  54.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_LEGISLATEUR") == true)) {
  55.             // line 6
  56.             $context["base"] = "base_legislator.html.twig";
  57.         } elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DIRECTEUR") == true)) {
  58.             // line 7
  59.             $context["base"] = "base_legislator.html.twig";
  60.         } else {
  61.             // line 8
  62.             $context["base"] = "base.html.twig";
  63.         }
  64.         // line 11
  65.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  66.         
  67.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68.         
  69.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70.     }
  71.     // line 12
  72.     public function block_title($context, array $blocks = [])
  73.     {
  74.         $macros $this->macros;
  75.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  79.         // line 13
  80.         echo "  ";
  81.         $this->displayParentBlock("title"$context$blocks);
  82.         echo "  ";
  83.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.country"), "html"nulltrue);
  84.         echo "
  85. ";
  86.         
  87.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  88.         
  89.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  90.     }
  91.     // line 21
  92.     public function block_js($context, array $blocks = [])
  93.     {
  94.         $macros $this->macros;
  95.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  96.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""js"));
  97.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  98.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""js"));
  99.         // line 22
  100.         echo "   <script>
  101.       // \$(document).ready(function () {
  102.       //    let translations = [];
  103.       //    getTranslation().then (function (translation) {
  104.       //       translations = translation;
  105.       //       // \$(\"#appbundle_joboffer_country\").prepend(\"<option value='' selected='selected'>\" + translations['js.select'] + \"</option>\");
  106.       //    });
  107.       // });
  108.    </script>
  109.   <script>
  110.      // Event
  111.      // \$(document).on('change', '#appbundle_joboffer_country, #appbundle_joboffer_region', function () {
  112.      //    // alert(\"test\")
  113.      //    let \$field = \$(this)
  114.      //    let \$regionField = \$('#appbundle_joboffer_country')
  115.      //    let \$form = \$field.closest('form')
  116.      //    let target = '#' + \$field.attr('id').replace('region', 'city').replace('country', 'region')
  117.      //    // Les données à envoyer en Ajax
  118.      //    let data = {}
  119.      //    data[\$regionField.attr('name')] = \$regionField.val()
  120.      //    data[\$field.attr('name')] = \$field.val()
  121.      //    // On soumet les données
  122.      //    \$.post(\$form.attr('action'), data).then(function (data) {
  123.      //       // On récupère le nouvmeeau <select>
  124.      //       let \$input = \$(data).find(target)
  125.      //       // On remplace notre <select> actuel
  126.      //       \$(target).replaceWith(\$input)
  127.      //    })
  128.      // });
  129.      // Event
  130.      // Country -> Region -> City
  131.      // if(\$('#appbundle_joboffer_prefecture').length) {
  132.      //    listenChangeCountryRegion('#appbundle_joboffer_country', '#appbundle_joboffer_region', 'country', 'region', 'addressCity');
  133.      // }
  134.      // // Event
  135.      // // Region -> Prefecture -> City
  136.      // else {
  137.         listenChangeRegionPrefecture('#appbundle_joboffer_country', '#appbundle_joboffer_region', '#appbundle_joboffer_prefecture', '#appbundle_joboffer_city');
  138.      // }
  139.      if(\$('#countryId').val) {
  140.         let countryId = \$('#countryId').val();
  141.         if(!\$('#appbundle_joboffer_country').val()) {
  142.            \$('#appbundle_joboffer_country option[value=' + countryId + ']').prop('selected', true);
  143.            \$('#appbundle_joboffer_country').trigger('change');
  144.         }
  145.      }
  146.      \$(document).on('change', '#appbundle_joboffer_sectorArea', function () {
  147.         let \$field = \$(this)
  148.         let \$sectorAreaField = \$('#appbundle_joboffer_sectorArea')
  149.         let \$form = \$field.closest('form')
  150.         let target = '#' + \$field.attr('id').replace('sectorArea', 'activity')
  151.         // Les données à envoyer en Ajax
  152.         let data = {}
  153.         data[\$sectorAreaField.attr('name')] = \$sectorAreaField.val()
  154.         // On soumet les données
  155.         \$.post(\$form.attr('action'), data).then(function (data) {
  156.            // On récupère le nouvmeeau <select>
  157.            let \$input = \$(data).find(target)
  158.            // On remplace notre <select> actuel
  159.            \$(target).replaceWith(\$input)
  160.         })
  161.      })
  162.   </script>
  163. ";
  164.         
  165.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  166.         
  167.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  168.     }
  169.     public function getTemplateName()
  170.     {
  171.         return "jobOffer/content.html.twig";
  172.     }
  173.     public function isTraitable()
  174.     {
  175.         return false;
  176.     }
  177.     public function getDebugInfo()
  178.     {
  179.         return array (  119 => 22,  109 => 21,  94 => 13,  84 => 12,  74 => 11,  71 => 8,  68 => 7,  65 => 6,  62 => 5,  59 => 4,  56 => 3,  53 => 2,  49 => 1,  36 => 11,);
  180.     }
  181.     public function getSourceContext()
  182.     {
  183.         return new Source("{% if is_granted('ROLE_ADMIN') == true %} {% set base = 'base.html.twig' %}
  184. {% elseif is_granted('ROLE_ENTREPRISE') == true %} {% set base = 'base_company.html.twig' %}
  185. {% elseif is_granted('ROLE_DIPLOME') == true %} {% set base = 'base_degree.html.twig' %}
  186. {% elseif is_granted('ROLE_ETABLISSEMENT') == true %} {% set base = 'base_school.html.twig' %}
  187. {% elseif is_granted('ROLE_PRINCIPAL') == true %} {% set base = 'base_principal.html.twig' %}
  188. {% elseif is_granted('ROLE_LEGISLATEUR') == true %} {% set base = 'base_legislator.html.twig' %}
  189. {% elseif is_granted('ROLE_DIRECTEUR') == true %} {% set base = 'base_legislator.html.twig' %}
  190. {% else %} {% set base = 'base.html.twig' %}
  191. {% endif %}
  192. {% extends base %}
  193. {% block title %}
  194.   {{ parent() }}  {{ 'menu.country' | trans }}
  195. {% endblock %}
  196. {#{% block navigation %}#}
  197.     {#<li class=\"breadcrumb-item\"><span>Pays</span></li>#}
  198. {#{% endblock %}#}
  199. {% block js %}
  200.    <script>
  201.       // \$(document).ready(function () {
  202.       //    let translations = [];
  203.       //    getTranslation().then (function (translation) {
  204.       //       translations = translation;
  205.       //       // \$(\"#appbundle_joboffer_country\").prepend(\"<option value='' selected='selected'>\" + translations['js.select'] + \"</option>\");
  206.       //    });
  207.       // });
  208.    </script>
  209.   <script>
  210.      // Event
  211.      // \$(document).on('change', '#appbundle_joboffer_country, #appbundle_joboffer_region', function () {
  212.      //    // alert(\"test\")
  213.      //    let \$field = \$(this)
  214.      //    let \$regionField = \$('#appbundle_joboffer_country')
  215.      //    let \$form = \$field.closest('form')
  216.      //    let target = '#' + \$field.attr('id').replace('region', 'city').replace('country', 'region')
  217.      //    // Les données à envoyer en Ajax
  218.      //    let data = {}
  219.      //    data[\$regionField.attr('name')] = \$regionField.val()
  220.      //    data[\$field.attr('name')] = \$field.val()
  221.      //    // On soumet les données
  222.      //    \$.post(\$form.attr('action'), data).then(function (data) {
  223.      //       // On récupère le nouvmeeau <select>
  224.      //       let \$input = \$(data).find(target)
  225.      //       // On remplace notre <select> actuel
  226.      //       \$(target).replaceWith(\$input)
  227.      //    })
  228.      // });
  229.      // Event
  230.      // Country -> Region -> City
  231.      // if(\$('#appbundle_joboffer_prefecture').length) {
  232.      //    listenChangeCountryRegion('#appbundle_joboffer_country', '#appbundle_joboffer_region', 'country', 'region', 'addressCity');
  233.      // }
  234.      // // Event
  235.      // // Region -> Prefecture -> City
  236.      // else {
  237.         listenChangeRegionPrefecture('#appbundle_joboffer_country', '#appbundle_joboffer_region', '#appbundle_joboffer_prefecture', '#appbundle_joboffer_city');
  238.      // }
  239.      if(\$('#countryId').val) {
  240.         let countryId = \$('#countryId').val();
  241.         if(!\$('#appbundle_joboffer_country').val()) {
  242.            \$('#appbundle_joboffer_country option[value=' + countryId + ']').prop('selected', true);
  243.            \$('#appbundle_joboffer_country').trigger('change');
  244.         }
  245.      }
  246.      \$(document).on('change', '#appbundle_joboffer_sectorArea', function () {
  247.         let \$field = \$(this)
  248.         let \$sectorAreaField = \$('#appbundle_joboffer_sectorArea')
  249.         let \$form = \$field.closest('form')
  250.         let target = '#' + \$field.attr('id').replace('sectorArea', 'activity')
  251.         // Les données à envoyer en Ajax
  252.         let data = {}
  253.         data[\$sectorAreaField.attr('name')] = \$sectorAreaField.val()
  254.         // On soumet les données
  255.         \$.post(\$form.attr('action'), data).then(function (data) {
  256.            // On récupère le nouvmeeau <select>
  257.            let \$input = \$(data).find(target)
  258.            // On remplace notre <select> actuel
  259.            \$(target).replaceWith(\$input)
  260.         })
  261.      })
  262.   </script>
  263. {% endblock %}
  264. ""jobOffer/content.html.twig""/home/dbtechaf/public_html/DBTA/templates/jobOffer/content.html.twig");
  265.     }
  266. }