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