src/Aviatur/TwigBundle/Resources/views/buenturismo/Flux/App/base.html.twig line 436

Open in your IDE?
  1. {% set parameters = json_decode(app.session.get(app.request.server.get('HTTP_HOST') ~ '[parameters]'), true) %}
  2. {% set agencyDataInfo = app.session.get('agencyDataInfo') %}
  3. {% if parameters['blob_azure_assets'] is defined %}
  4.     {% set assetsBlobUrl = parameters['blob_azure_assets'] %}
  5. {% else %}
  6.     {% set assetsBlobUrl = "https://aviaturcdndev.z5.web.core.windows.net/" %}
  7. {% endif %}
  8. <!DOCTYPE html>
  9. <html style="scroll-behavior: smooth;">
  10.     <head>
  11.         <meta charset="utf-8">
  12.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  13.         {% block head_viewport %}
  14.             <meta name="viewport" content="width=device-width, initial-scale=1">
  15.         {% endblock head_viewport %}
  16.         <title>
  17.             {% block head_title %}{% endblock head_title %}
  18.         </title>
  19.         <meta name="description" content="{% block head_description_content %}{% endblock head_description_content %}">
  20.         <meta name="title" content="{% block head_meta_title %}{% endblock head_meta_title %}">
  21.         <meta name="keywords" content="{% block head_keywords %}{% endblock head_keywords %}">
  22.         <link rel="icon" type="image/x-icon" href="{{ assetsBlobUrl ~ 'assets/' ~ agency_folder.assetStyle() ~ '/img/header/favicon.png' }}"/>
  23.         <link rel="apple-touch-icon" href="{{ assetsBlobUrl ~ 'assets/' ~ agency_folder.assetStyle() ~ '/img/header/favicon.png' }}"/>
  24.         <link
  25.         rel="android-touch-icon" href="{{ assetsBlobUrl ~ 'assets/' ~ agency_folder.assetStyle() ~ '/img/header/favicon.png' }}"/>
  26.         {# styles #}
  27.         {% block stylesheets %}
  28.             <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  29.             <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Ubuntu:wght@300;400;500;700&display=swap" rel="stylesheet">
  30.             <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0"/>
  31.             <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"/>
  32.             <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet">
  33.             <link type="text/css" rel="stylesheet" href="{{ style('default_assets/css/main.css') }}"/>
  34.             <script src="https://aviaturcdndev.z5.web.core.windows.net/source/tailwind-3.4.17.js"></script>
  35.             <script>
  36.                 tailwind.config = {{ tailwind_config|json_encode|raw }};
  37.             </script>
  38.                 <style>
  39.             .nav-main__item.is-active,
  40.             .is-active.nav-main__item--blog {
  41.                 border-top: 0.175rem inset #facc03;
  42.                 color: #facc03;
  43.             }
  44.             .nav-scroll a.is-active {
  45.                 color: #facc03;
  46.             }
  47.             .nav-scroll a {
  48.                 color: white;
  49.             }
  50.             @media screen and(max-width: 768px) {
  51.                 .nav-main__item,
  52.                 .nav-scroll a {
  53.                     color: white;
  54.                     text-decoration: none;
  55.                     padding: 10px 15px;
  56.                     font-size: 1rem;
  57.                     transition: color 0.3s, border-top 0.3s;
  58.                 }
  59.                 .nav-scroll a.is-active {
  60.                     color: white;
  61.                 }
  62.             }
  63.             .btn,
  64.             .btn-flight-blog,
  65.             .btn--slim {
  66.                 background-color: #00a7c5;
  67.                 border-color: #00a7c5;
  68.             }
  69.             .btn:hover {
  70.                 background-color: #00a7c5;
  71.                 filter: brightness(1.1);
  72.                 border-color: #00a7c5;
  73.             }
  74.                     </style>
  75.         {% endblock stylesheets %}
  76.         {# end styles #}
  77.         {# scripts #}
  78.          <script src="{{ script('common.js') }}"></script>
  79.          <script type="module" src="{{ script('GeneralBundle//emblue_index.js') }}"></script>
  80.          <script type="module" src="{{ script('GeneralBundle//footer_terminos_condiciones_index.js') }}"></script>
  81.              <script src="https://apis.google.com/js/api:client.js" crossorigin="anonymous"></script>
  82.         {% if app.session.get('WorldChangeCoin') is defined and app.session.get('WorldChangeCoin') == 'true' %}
  83.         {% include twig_exists('@AviaturTwig/' ~ agency_folder.twigFlux() ~ '/General/Components/worldpayFunction.html.twig') %}
  84.         {% endif %} <link rel="stylesheet"href="{{ asset('assets/default_assets/css/firebase-main.css') }}"/> {% if parameters['firebasescripts'] == 'true' %}
  85.             <link
  86.             rel="stylesheet" href="https://aviaturcdndev.z5.web.core.windows.net/source/main.css">
  87.          <script src="https://aviaturcdndev.z5.web.core.windows.net/source/script.js" type="text/javascript"></script>
  88.         {% endif %}
  89.         {% if pdfGenerator is not defined %}
  90.              <script type="text/javascript">
  91.                 var clientId;
  92.                 var domain = '{{ app.session.get('domain') }}';
  93.                 var domainsecure = '{{ app.session.get('domainsecure') }}';
  94.             
  95.                 (function (i, s, o, g, r, a, m) {
  96.                     i['GoogleAnalyticsObject'] = r;
  97.                     i[r] = i[r] || function () {
  98.                         (i[r].q = i[r].q || []).push(arguments)
  99.                     }, i[r].l = 1 * new Date();
  100.                     a = s.createElement(o), m = s.getElementsByTagName(o)[0];
  101.                     a.async = 1;
  102.                     a.src = g;
  103.                     m.parentNode.insertBefore(a, m)
  104.                 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
  105.             
  106.                 ga('create', 'UA-64309537-1', 'auto', {
  107.                     cookieDomain: '{{ app.request.server.get("HTTP_HOST")|replace({'www.':''}) }}',
  108.                     allowLinker: true
  109.                 });
  110.                 ga('require', 'displayfeatures');
  111.                 ga('require', 'linkid', 'linkid.js');
  112.                 ga('require', 'linker');
  113.                 ga('require', 'ec');
  114.                 ga('linker:autoLink', [domain, domainsecure, 'pasabordo.com.co', 'grupoaviatur.com']);
  115.                 ga('linker:autoLink', [domain, domainsecure, 'pasabordo.com.co', 'grupoaviatur.com'], false, true);
  116.             
  117.                 var dimensionValue = '{{ app.request.server.get("REMOTE_ADDR") }}';
  118.                 {% if app.session.has('transactionId') %}
  119.                     var dimensionValue2 = '{{ app.session.get('transactionId') }}';
  120.                 {% else %}
  121.                     var dimensionValue2 = '';
  122.                 {% endif %}
  123.             
  124.                 var dimensionValue3 = '';
  125.                 var dimensionValue4 = '';
  126.                 var dimensionValue5 = '';
  127.                 var dimensionValue6 = '';
  128.             
  129.                 ga('send', 'pageview', {
  130.                     'dimension1': dimensionValue,
  131.                     'dimension2': dimensionValue2,
  132.                     'dimension3': dimensionValue3,
  133.                     'dimension4': dimensionValue4,
  134.                     'dimension5': dimensionValue5,
  135.                     'dimension6': dimensionValue6
  136.                 });
  137.             </script>
  138.         {% endif %}
  139.         {% if parameters['aviatur_close_modal_login'] is defined %}
  140.             {% set activate_login = json_decode(parameters['aviatur_close_modal_login'], true) %}
  141.             {% if activate_login[app.session.get('agencyId')] is defined %}
  142.                 {% set swLoginClose = activate_login[app.session.get('agencyId')] %}
  143.             {% else %}
  144.                 {% set swLoginClose = activate_login['all'] %}
  145.             {% endif %}
  146.         {% endif %}
  147.         {# Parametrización boton continuar sin iniciar sesión #}
  148.         {% if parameters['aviatur_continue_without_logging'] is defined %}
  149.             {% set continue_without_logging = json_decode(parameters['aviatur_continue_without_logging'], true) %}
  150.             {% if continue_without_logging[app.session.get('agencyId')] is defined %}
  151.                 {% set continueWithoutLogging = continue_without_logging[app.session.get('agencyId')] %}
  152.             {% else %}
  153.                 {% set continueWithoutLogging = continue_without_logging['all'] %}
  154.             {% endif %}
  155.         {% endif %}
  156.          <script>
  157.         document.addEventListener("DOMContentLoaded", function () {
  158.             const googleBtn = document.getElementById('customGoogleBtn');
  159.         
  160.             googleBtn.addEventListener('click', function (e) {
  161.                 e.preventDefault();
  162.         
  163.                 const clientId = '{{ google_idclient_login }}';
  164.                 const redirectUri = '{{ url("aviatur_customer_login_social_secure") }}';
  165.                 const scope = 'openid email profile';
  166.                 const responseType = 'code';
  167.         
  168.                 console.log("Redirect URI generada:", redirectUri);
  169.         
  170.                 const authUrl =
  171.                     `https://accounts.google.com/o/oauth2/v2/auth?` +
  172.                     `client_id=${clientId}` +
  173.                     `&redirect_uri=${encodeURIComponent(redirectUri)}` +
  174.                     `&response_type=${responseType}` +
  175.                     `&scope=${encodeURIComponent(scope)}` +
  176.                     `&prompt=select_account`;
  177.         
  178.                 console.log("URL de autenticación:", authUrl);
  179.         
  180.                 window.location.href = authUrl;
  181.             });
  182.         });
  183.         </script>
  184.          <script>
  185.         var fbid = '{{ facebook_appid_login }}';
  186.         window.fbAsyncInit = function() {
  187.             FB.init({
  188.                 appId   : fbid,
  189.                 cookie  : true,
  190.                 xfbml   : true,
  191.                 version : 'v7.0',
  192.                 oauth   : true,
  193.                 status  : true
  194.             });
  195.             FB.AppEvents.logPageView();
  196.         };
  197.         
  198.         (function(d, s, id){
  199.             var js, fjs = d.getElementsByTagName(s)[0];
  200.             if (d.getElementById(id)) return;
  201.             js = d.createElement(s); js.id = id;
  202.             js.src = "https://connect.facebook.net/en_US/sdk.js";
  203.             fjs.parentNode.insertBefore(js, fjs);
  204.         }(document, 'script', 'facebook-jssdk'));
  205.         
  206.         function checkLoginState() {
  207.             FB.getLoginStatus(function(response) {
  208.                 statusChangeCallback(response);
  209.             });
  210.         }
  211.         
  212.         function loginFace(){
  213.             FB.login(function(response) {
  214.                 if (response.authResponse) {
  215.                     var $modalLogin = jQuery('#js-modalLogin');
  216.                     FB.api('/me', {fields: 'first_name, last_name, email, picture'}, function (response2) {
  217.                         response2.picture2 = "http://graph.facebook.com/" + response2.id + "/picture?type=normal";
  218.                         jQuery(".js-globalOverlay").attr("style", "z-index: 1200 !important;");
  219.                         jQuery(".js-globalOverlay-text").text("Iniciando sesión");
  220.                         jQuery(".js-globalOverlay").show();
  221.                         jQuery.ajax({
  222.                             url: '/customer/social-networks-callback',
  223.                             type: 'POST',
  224.                             crossDomain: true,
  225.                             data: {data: response2, red: "facebook"},
  226.                             success: function (data) {
  227.                                 if(data.status == "redirect") {
  228.                                     FB.logout();
  229.                                     if(pathname[2] == "detalle" || pathname[2] == "pasajeros-reserva" || pathname[2] == "formulario") {
  230.                                         location.reload();
  231.                                     } else {
  232.                                         window.location.replace("/");
  233.                                     }
  234.                                 }
  235.                             },
  236.                             error: function () {
  237.                                 $modalLogin.find('.close[data-dismiss="modal"]').trigger('click');
  238.                                 jQuery(".js-globalOverlay").hide();
  239.                             },
  240.                             complete: function () {}
  241.                         });
  242.                     });
  243.                 } else {
  244.                     console.log('User cancelled login or did not fully authorize.');
  245.                 }
  246.             },{scope: 'email,public_profile'});
  247.         }
  248.         </script>
  249.         {% if app.user %}
  250.              <script>
  251.                 var customerLogged = true;
  252.                 var documentNum = '{{ app.user.documentNumber }}';
  253.                 var documentType = '{{ app.user.documentType }}';
  254.             
  255.                 {% if parameters['switch_login_agencies'] is defined %}
  256.                     {% set login_agencies = json_decode(parameters['switch_login_agencies'], true) %}
  257.                     {% if login_agencies[app.session.get('agencyId')] is defined %}
  258.                         {% set login_is_on = login_agencies[app.session.get('agencyId')] %}
  259.                     {% else %}
  260.                         {% set login_is_on = login_agencies['all'] %}
  261.                     {% endif %}
  262.                 {% else %}
  263.                     {% set login_is_on = '0' %}
  264.                 {% endif %}
  265.             
  266.                 var login_is_on = "{{ login_is_on }}";
  267.             </script>
  268.             {% else %}
  269.              <script>var customerLogged = false;</script>
  270.         {% endif %}
  271.         {% if 'aviatur_general_homepage' in app.request.get('_route') %}
  272.     {% if app.user.username is defined %}
  273.         <script>
  274.             jQuery(document).ready(function () {
  275.                 var dtCustomerFacebook = '{{ app.user.facebookId }}';
  276.                 var dtCustomerGoogle = '{{ app.user.googleId }}';
  277.                 var address = '{{ app.user.address }}';
  278.                 var documentNum = '{{ app.user.documentNumber }}';
  279.                 if (dtCustomerFacebook || dtCustomerGoogle) {
  280.                     if (documentNum.length == 0 && address.length == 0) {
  281.                         window.location.replace("/customer/edit");
  282.                     }
  283.                 }
  284.             });
  285.         </script>
  286.     {% else %}
  287.         <script>
  288.             sessionStorage.setItem('countDialogLogin', 0);
  289.             var countDialogLogin = 0;
  290.             jQuery(document).ready(function () {
  291.                 jQuery("#close-dialog-login").on('click', function () {
  292.                     jQuery("#dialog-login-home").hide();
  293.                 });
  294.             });
  295.         </script>
  296.     {% endif %}
  297. {% endif %}
  298. {% if 'aviatur_customer_edit_info' in app.request.get('_route') %}
  299.     {% if app.user.username is defined %}
  300.         <script>
  301.             jQuery(document).ready(function () {
  302.                 var dtCustomerFacebook = '{{ app.user.facebookId }}';
  303.                 var dtCustomerGoogle = '{{ app.user.googleId }}';
  304.                 jQuery("#customer_edit_form_email").attr("type", "email");
  305.                 jQuery("#customer_edit_form_CivilStatus").parent().parent().parent().hide();
  306.                 if (dtCustomerFacebook || dtCustomerGoogle) {
  307.                     if (jQuery("#customer_edit_form_DocumentNumber").val() == "") {
  308.                         jQuery("#customer_edit_form_DocumentNumber").removeAttr("readonly");
  309.                     }
  310.                     jQuery(".js-reserva-submit-password").hide();
  311.                     jQuery("#customer_edit_form_email").hide();
  312.                     jQuery('[for^="customer_edit_form_email"]').hide();
  313.                 }
  314.             });
  315.         </script>
  316.     {% endif %}
  317. {% endif %}
  318. {% if app.session.get('AnonymousEmail') is not null %}
  319.     {% set anonymousEmail = app.session.get('AnonymousEmail') %}
  320.     <script type="text/javascript">
  321.         jQuery(document).ready(function () {
  322.             var anonymousEmail = "{{ anonymousEmail }}";
  323.             jQuery("#username").val(anonymousEmail);
  324.             jQuery("#fos_user_registration_form_email").val(anonymousEmail);
  325.         });
  326.     </script>
  327. {% endif %}
  328. {# End scripts #}
  329. {% if "payment_success_secure" in app.request.attributes.get('_route') %}{% endif %}
  330. {% block javascripts_header %}
  331.     {# 
  332.     {% if cards is defined %}
  333.         {% if cybersource is not empty and cybersource.org_id is defined %}
  334.             {% set src = "https://h.online-metrix.net/fp/tags.js?org_id=" ~ cybersource.org_id ~ "&session_id=aviaturcom" ~ app.session.get('transactionId') %}
  335.             <script type="text/javascript" src="{{ src }}"></script>
  336.         {% endif %}
  337.     {% endif %}
  338.     #}
  339. {% endblock %}
  340. </head>
  341. <body ontouchstart="">
  342.     {% if agencyDataInfo['agency_phones'] %}
  343.         {% set agencyWhat = agencyDataInfo['agency_phones']['what'] %}
  344.         {% set agencyPhones = agencyDataInfo['agency_phones']['all'] %}
  345.     {% endif %}
  346.     <p class="app-name hide">{{ app.session.get('domain') }}</p>
  347.     {% block body_scripts %}
  348.         {# 
  349.         {% if cards is defined %}
  350.             {% if cybersource is not empty and cybersource.org_id is defined %}
  351.                 {% set src = "https://h.online-metrix.net/fp/tags?org_id=" ~ cybersource.org_id ~ "&session_id=aviaturcom" ~ app.session.get('transactionId') %}
  352.                 <noscript>
  353.                     <iframe style="width: 100px; height: 100px; border: 0; position:absolute; top: -5000px;" src="{{ src }}"></iframe>
  354.                 </noscript>
  355.             {% endif %}
  356.         {% endif %}
  357.         #}
  358.     {% endblock %}
  359.     {% for flashMessage in app.session.flashbag.get('notice') %}
  360.         <div class="flash-notice">{{ flashMessage }}</div>
  361.     {% endfor %}
  362.     {% block overlay %}
  363.         <script>
  364.             document.addEventListener("DOMContentLoaded", function () {
  365.                 const overlay = document.querySelector(".js-globalOverlay");
  366.                 if (overlay) {
  367.                     overlay.style.display = "none";
  368.                     window.addEventListener("load", function () {
  369.                         overlay.style.display = "none";
  370.                     });
  371.                     window.addEventListener("pageshow", function () {
  372.                         overlay.style.display = "none";
  373.                     });
  374.                 }
  375.             });
  376.         </script>
  377.         <div class="overlay js-globalOverlay" style="display: none;">
  378.             <div class="overlay-center">
  379.                 <svg class="mat-loader--200 center-block" height="200" width="200">
  380.                     <circle class="mat-loader--200__path" cx="100" cy="100" r="80" fill="none" stroke-width="6" stroke-miterlimit="10"/>
  381.                 </svg>
  382.                 <p class="spin-text js-globalOverlay-text">Cargando...</p>
  383.             </div>
  384.         </div>
  385.         <div class="responsive-js"></div>
  386.     {% endblock %}
  387.     {% block base_content %}
  388.         {% block header %}{% endblock %}
  389.         {% block body %}{% endblock body %}
  390.         {% block content %}{% endblock content %}
  391.         {% block footer %}{% endblock footer %}
  392.         {% block modal %}
  393.             <div id="js-globalModal" class="modal fade">
  394.                 <div class="modal-dialog">
  395.                     <div class="modal-content">
  396.                         <div class="modal-header">
  397.                             <button type="button" class="close" data-dismiss="modal">
  398.                                 <span aria-hidden="true">&times;</span>
  399.                                 <span class="sr-only">Close</span>
  400.                             </button>
  401.                             <h4 id="js-globalModal-title" class="modal-title">Modal title</h4>
  402.                         </div>
  403.                         <div class="modal-body">
  404.                             <div id="js-globalModal-illustration"></div>
  405.                             <p id="js-globalModal-text" class="modal-text modal-text--error"></p>
  406.                         </div>
  407.                     </div>
  408.                 </div>
  409.             </div>
  410.         {% endblock modal %}
  411.     {% endblock base_content %}
  412.     {% block javascripts %}{% endblock %}
  413.     {% block javascripts_bottom %}
  414.     {% endblock javascripts_bottom %}
  415.     <!-- Facebook Pixel Code -->
  416.     <script>
  417.         !function (f, b, e, v, n, t, s) {
  418.             if (f.fbq) return;
  419.             n = f.fbq = function () {
  420.                 n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments)
  421.             };
  422.             if (!f._fbq) f._fbq = n;
  423.             n.push = n; n.loaded = !0; n.version = '2.0';
  424.             n.queue = [];
  425.             t = b.createElement(e); t.async = !0;
  426.             t.src = v;
  427.             s = b.getElementsByTagName(e)[0];
  428.             s.parentNode.insertBefore(t, s)
  429.         }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');
  430.         fbq('init', '124649384848609');
  431.         fbq('track', 'PageView');
  432.     </script>
  433.     <noscript>
  434.         <img height="1" width="1"
  435.              src="https://www.facebook.com/tr?id=124649384848609&ev=PageView&noscript=1"/>
  436.     </noscript>
  437.     <!-- End Facebook Pixel Code -->
  438. </body>
  439. </html>