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