<?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;
/* jobOffer/content.html.twig */
class __TwigTemplate_84e091c681ced0b6306b797ee40f0f12 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'js' => [$this, 'block_js'],
];
}
protected function doGetParent(array $context)
{
// line 11
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);
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "jobOffer/content.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "jobOffer/content.html.twig"));
// line 1
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN") == true)) {
$context["base"] = "base.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ENTREPRISE") == true)) {
// line 2
$context["base"] = "base_company.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DIPLOME") == true)) {
// line 3
$context["base"] = "base_degree.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ETABLISSEMENT") == true)) {
// line 4
$context["base"] = "base_school.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_PRINCIPAL") == true)) {
// line 5
$context["base"] = "base_principal.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_LEGISLATEUR") == true)) {
// line 6
$context["base"] = "base_legislator.html.twig";
} elseif (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DIRECTEUR") == true)) {
// line 7
$context["base"] = "base_legislator.html.twig";
} else {
// line 8
$context["base"] = "base.html.twig";
}
// line 11
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 12
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 13
echo " ";
$this->displayParentBlock("title", $context, $blocks);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.country"), "html", null, true);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 21
public function block_js($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
// line 22
echo " <script>
// \$(document).ready(function () {
// let translations = [];
// getTranslation().then (function (translation) {
// translations = translation;
// // \$(\"#appbundle_joboffer_country\").prepend(\"<option value='' selected='selected'>\" + translations['js.select'] + \"</option>\");
// });
// });
</script>
<script>
// Event
// \$(document).on('change', '#appbundle_joboffer_country, #appbundle_joboffer_region', function () {
// // alert(\"test\")
// let \$field = \$(this)
// let \$regionField = \$('#appbundle_joboffer_country')
// let \$form = \$field.closest('form')
// let target = '#' + \$field.attr('id').replace('region', 'city').replace('country', 'region')
// // Les données à envoyer en Ajax
// let data = {}
// data[\$regionField.attr('name')] = \$regionField.val()
// data[\$field.attr('name')] = \$field.val()
// // On soumet les données
// \$.post(\$form.attr('action'), data).then(function (data) {
// // On récupère le nouvmeeau <select>
// let \$input = \$(data).find(target)
// // On remplace notre <select> actuel
// \$(target).replaceWith(\$input)
// })
// });
// Event
// Country -> Region -> City
// if(\$('#appbundle_joboffer_prefecture').length) {
// listenChangeCountryRegion('#appbundle_joboffer_country', '#appbundle_joboffer_region', 'country', 'region', 'addressCity');
// }
// // Event
// // Region -> Prefecture -> City
// else {
listenChangeRegionPrefecture('#appbundle_joboffer_country', '#appbundle_joboffer_region', '#appbundle_joboffer_prefecture', '#appbundle_joboffer_city');
// }
if(\$('#countryId').val) {
let countryId = \$('#countryId').val();
if(!\$('#appbundle_joboffer_country').val()) {
\$('#appbundle_joboffer_country option[value=' + countryId + ']').prop('selected', true);
\$('#appbundle_joboffer_country').trigger('change');
}
}
\$(document).on('change', '#appbundle_joboffer_sectorArea', function () {
let \$field = \$(this)
let \$sectorAreaField = \$('#appbundle_joboffer_sectorArea')
let \$form = \$field.closest('form')
let target = '#' + \$field.attr('id').replace('sectorArea', 'activity')
// Les données à envoyer en Ajax
let data = {}
data[\$sectorAreaField.attr('name')] = \$sectorAreaField.val()
// On soumet les données
\$.post(\$form.attr('action'), data).then(function (data) {
// On récupère le nouvmeeau <select>
let \$input = \$(data).find(target)
// On remplace notre <select> actuel
\$(target).replaceWith(\$input)
})
})
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "jobOffer/content.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% if is_granted('ROLE_ADMIN') == true %} {% set base = 'base.html.twig' %}
{% elseif is_granted('ROLE_ENTREPRISE') == true %} {% set base = 'base_company.html.twig' %}
{% elseif is_granted('ROLE_DIPLOME') == true %} {% set base = 'base_degree.html.twig' %}
{% elseif is_granted('ROLE_ETABLISSEMENT') == true %} {% set base = 'base_school.html.twig' %}
{% elseif is_granted('ROLE_PRINCIPAL') == true %} {% set base = 'base_principal.html.twig' %}
{% elseif is_granted('ROLE_LEGISLATEUR') == true %} {% set base = 'base_legislator.html.twig' %}
{% elseif is_granted('ROLE_DIRECTEUR') == true %} {% set base = 'base_legislator.html.twig' %}
{% else %} {% set base = 'base.html.twig' %}
{% endif %}
{% extends base %}
{% block title %}
{{ parent() }} {{ 'menu.country' | trans }}
{% endblock %}
{#{% block navigation %}#}
{#<li class=\"breadcrumb-item\"><span>Pays</span></li>#}
{#{% endblock %}#}
{% block js %}
<script>
// \$(document).ready(function () {
// let translations = [];
// getTranslation().then (function (translation) {
// translations = translation;
// // \$(\"#appbundle_joboffer_country\").prepend(\"<option value='' selected='selected'>\" + translations['js.select'] + \"</option>\");
// });
// });
</script>
<script>
// Event
// \$(document).on('change', '#appbundle_joboffer_country, #appbundle_joboffer_region', function () {
// // alert(\"test\")
// let \$field = \$(this)
// let \$regionField = \$('#appbundle_joboffer_country')
// let \$form = \$field.closest('form')
// let target = '#' + \$field.attr('id').replace('region', 'city').replace('country', 'region')
// // Les données à envoyer en Ajax
// let data = {}
// data[\$regionField.attr('name')] = \$regionField.val()
// data[\$field.attr('name')] = \$field.val()
// // On soumet les données
// \$.post(\$form.attr('action'), data).then(function (data) {
// // On récupère le nouvmeeau <select>
// let \$input = \$(data).find(target)
// // On remplace notre <select> actuel
// \$(target).replaceWith(\$input)
// })
// });
// Event
// Country -> Region -> City
// if(\$('#appbundle_joboffer_prefecture').length) {
// listenChangeCountryRegion('#appbundle_joboffer_country', '#appbundle_joboffer_region', 'country', 'region', 'addressCity');
// }
// // Event
// // Region -> Prefecture -> City
// else {
listenChangeRegionPrefecture('#appbundle_joboffer_country', '#appbundle_joboffer_region', '#appbundle_joboffer_prefecture', '#appbundle_joboffer_city');
// }
if(\$('#countryId').val) {
let countryId = \$('#countryId').val();
if(!\$('#appbundle_joboffer_country').val()) {
\$('#appbundle_joboffer_country option[value=' + countryId + ']').prop('selected', true);
\$('#appbundle_joboffer_country').trigger('change');
}
}
\$(document).on('change', '#appbundle_joboffer_sectorArea', function () {
let \$field = \$(this)
let \$sectorAreaField = \$('#appbundle_joboffer_sectorArea')
let \$form = \$field.closest('form')
let target = '#' + \$field.attr('id').replace('sectorArea', 'activity')
// Les données à envoyer en Ajax
let data = {}
data[\$sectorAreaField.attr('name')] = \$sectorAreaField.val()
// On soumet les données
\$.post(\$form.attr('action'), data).then(function (data) {
// On récupère le nouvmeeau <select>
let \$input = \$(data).find(target)
// On remplace notre <select> actuel
\$(target).replaceWith(\$input)
})
})
</script>
{% endblock %}
", "jobOffer/content.html.twig", "/home/dbtechaf/public_html/DBTA/templates/jobOffer/content.html.twig");
}
}