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