templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{app.request.locale}}">
  3.     {# detecting which of the predefined locales is the current loaded one #}
  4.     {# instead of just comparing the current loaded locale directly with locales as strings 'ar' and 'en' we will use them as keys of the predefined locales config to eleminate mistakes #}
  5.     {% set available_locales = app_locales|split('|') %} {# get locales from config #}
  6.     {% set locale_codes = [] %}
  7.     {# generate array of locales where the array keys are the locales instead of the array values #}
  8.     {% for key, value in available_locales %}
  9.         {% set locale_codes = locale_codes|merge({ (value): value }) %} {# no way to push to an array in twig except via merging to it #}
  10.     {% endfor %}
  11.     <head>
  12.         <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  13.         <!--[if IE]>
  14.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  15.         <![endif]-->
  16.         <meta name="description" content="">
  17.         <meta name="author" content="Auction.Sa">
  18.         <title>{% block title %}{{ "website title" | trans }} {% endblock %}  </title>
  19.         <!-- =-=-=-=-=-=-= Favicons Icon =-=-=-=-=-=-= -->
  20.         <link rel="icon" href="{{ asset('favicon.ico')}}" type="image/x-icon" />
  21.         <!-- =-=-=-=-=-=-= Mobile Specific =-=-=-=-=-=-= -->
  22.         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  23.         {% block stylesheets %}
  24.             {# decide which css to load based on the current locale #}
  25.             {% if app.request.locale == locale_codes['ar'] %}
  26.                 <link rel="stylesheet" href="{{ asset('css/bootstrap.rtl.full.css')}}">
  27.             {% elseif app.request.locale == locale_codes['en'] %}
  28.                 <link rel="stylesheet" href="{{ asset('css/bootstrap.css')}}">
  29.             {% endif %}
  30.             <link rel="stylesheet" href="{{ asset('css/style.css')}}">
  31.             <link href="{{ asset('css/flaticon.css')}}" rel="stylesheet">
  32.             <!-- =-=-=-=-=-=-= Et Line Fonts =-=-=-=-=-=-= -->
  33.             <link rel="stylesheet" href="{{ asset('css/et-line-fonts.css')}}" type="text/css">
  34.             <!-- =-=-=-=-=-=-= Menu Drop Down =-=-=-=-=-=-= -->
  35.             <link rel="stylesheet" href="{{ asset('css/forest-menu.css')}}" type="text/css">
  36.             <link rel="stylesheet" href="{{ asset('css/animate.min.css')}}" type="text/css">
  37.             <link href="{{ asset('css/select2.min.css')}}" rel="stylesheet" />
  38.             <link href="{{ asset('css/nouislider.min.css')}}" rel="stylesheet">
  39.             <!-- =-=-=-=-=-=-= Listing Slider =-=-=-=-=-=-= -->
  40.             <link href="{{ asset('css/slider.css')}}" rel="stylesheet">
  41.             <link rel="stylesheet" type="text/css" href="{{ asset('css/owl.carousel.css')}}">
  42.             <link rel="stylesheet" type="text/css" href="{{ asset('css/owl.theme.css')}}">
  43.             <!-- =-=-=-=-=-=-= Check boxes =-=-=-=-=-=-= -->
  44.             <link href="{{ asset('skins/minimal/minimal.css')}}" rel="stylesheet">
  45.             <link href="{{ asset('css/responsive-media.css')}}" rel="stylesheet">
  46.             <link rel="stylesheet"  href="{{ asset('css/colors/green.css')}}">
  47.             <!-- =-=-=-=-=-=-= Calendars =-=-=-=-=-=-= -->
  48.             <link rel="stylesheet" href="{{ asset('bootstrap/js/build/css/bootstrap-datetimepicker.min.css')}}"/>
  49.             <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  50.             <link href="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/css/jquery.calendars.picker.css" rel="stylesheet"/>
  51.             <link rel="stylesheet" href="{{ asset('css/font-awesome.min.css')}}">
  52.             <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.0.3/sweetalert2.min.css">
  53.             
  54.             {# load customs.css only with ar locale #}
  55.             {% if app.request.locale == locale_codes['ar'] %}
  56.                 <link rel="stylesheet" href="{{ asset('css/customs.css')}}">{# load customs.css only with ar locale #}
  57.             {% elseif app.request.locale == locale_codes['en'] %}
  58.                 <link rel="stylesheet" href="{{ asset('css/customs_en.css')}}">
  59.             {% endif %}
  60.         {% endblock %}
  61.         <!-- JavaScripts -->
  62.         <script src="{{ asset('js/modernizr.js')}}"></script>
  63.         <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  64.         <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  65.         <!--[if lt IE 9]>
  66.         <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  67.         <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  68.         <script type="text/javascript" src="{{ asset('js/flashcanvas.js')}}"></script>
  69.         <![endif]-->
  70.     </head>
  71.     <body>
  72.         <!-- =-=-=-=-=-=-= Light Header =-=-=-=-=-=-= -->
  73.         <div class="colored-header">
  74.             <!-- Top Bar -->
  75.             <div class="header-top">
  76.                 <div class="container">
  77.                     <div class="row">
  78.                         <!-- Header Top Left -->
  79.                         <div class="header-top-left col-lg-1 col-md-2 col-sm-2 col-xs-3" style=" padding: 0 0px;">
  80.                             <ul class="">
  81.                                 <li style="padding: 0">  <a href="{{ path('contactus_form') }}"><img src="{{ asset('feedback.png')}}" style="width:25px !important; height: 25px !important;" />{{ "Feedback" | trans({}, 'messages') }}</a>  </li>
  82.                             </ul>
  83.                         </div>
  84.                         {# if route array is empty, for example in case of errors, then don't show language switcher #}
  85.                         {% if app.request.get('_route') is not null %}
  86.                             <div class="header-top-left col-lg-7 col-md-6 col-sm-4 col-xs-3" style="padding: 0;">
  87.                                 <ul class="listnone">
  88.                                     <li class="dropdown">
  89.                                         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-globe" aria-hidden="true"></i> {{ 'language' | trans }} <span class="caret"></span></a>
  90.                                         <ul class="dropdown-menu">
  91.                                             <li><a href="{{ app.request.getRequestUri() |replace({'/ar': "/en"}) }}">{{ "Eng" | trans({}, 'messages' , locale_codes['en']) }}</a></li>
  92.                                             <li><a href="{{ app.request.getRequestUri() |replace({'/en': "/ar"}) }}">{{ "Arabic" | trans({}, 'messages' , locale_codes['ar']) }}</a></li>
  93.                                         </ul>
  94.                                     </li>
  95.                                 </ul>
  96.                             </div>
  97.                         {% endif %}
  98.                         <!-- Header Top Right Social -->
  99.                         <div class="header-right col-lg-4 col-md-4 col-sm-6 col-xs-6 ">
  100.                             <div class="pull-right">
  101.                                 <ul class="listnone">
  102.                                     {# Authenticated user area #}
  103.                                     {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  104.                                         <li class="dropdown">
  105.                                             <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
  106.                                                 <i class="icon-profile-male" aria-hidden="true"></i>
  107.                                                 {{ "welcome"|trans( {}, "clients" ) }} {{ attribute(app.user.userIdentityInfo, 'firstname'~app.request.locale) }}
  108.                                                 <span class="caret"></span>
  109.                                             </a>
  110.                                             <ul class="dropdown-menu">
  111.                                                 <li><a href="{{ path('my_profile') }}">{{ 'profile' | trans({}, 'clients') }}</a></li>
  112.                                                 <li><a href="{{ path('change_password') }}">{{ 'change password' | trans({}, 'clients') }}</a></li>
  113.                                                 {% set CLIENT_TYPES = constant('App\\Entity\\VehicleClients::CLIENT_TYPES') %}
  114.                                                 {# get clients that the current user is a delegator to (clients who delegated the current logged in user) #}
  115.                                                 {% set delegations = user_helper.getUserDelegators(app.user) %}
  116.                                                 {% for delegation in delegations %}
  117.                                                     {% if delegation.delegator.getClientType == CLIENT_TYPES.user %}
  118.                                                         {% set profileLink = path('users_dashboard', {'userId': delegation.delegator.getActualClient.userId})  %}
  119.                                                     {% elseif delegation.delegator.getClientType == CLIENT_TYPES.company %}
  120.                                                         {% set profileLink = path('company_dashboard', {'companyId': delegation.delegator.getActualClient.companyId }) %}
  121.                                                     {% endif %}
  122.                                                     <li><a href="{{ profileLink }}">{{ delegation.delegator.getName(app.request.locale) }}</a></li>
  123.                                                 {% endfor %}
  124.                                                 <li><a href="{{ path('logout') }}">{{ "logout"|trans( {}, "clients" ) }}</a></li>
  125.                                             </ul>
  126.                                         </li> 
  127.                                     {% else %}
  128.                                         <li><a href="{{ path('login') }}"><i class="fa fa-sign-in"></i>{{ 'login' |trans( {}, 'clients' ) }}</a></li>
  129.                                     {% endif %}
  130.                                 </ul>
  131.                             </div>
  132.                         </div>
  133.                     </div>
  134.                 </div>
  135.             </div>
  136.             <!-- Top Bar End -->
  137.             <!-- Navigation Menu -->
  138.             <nav id="menu-1" class="mega-menu">
  139.                 <!-- menu list items container -->
  140.                 <section class="menu-list-items">
  141.                     <div class="container">
  142.                         <div class="row">
  143.                             <div class="col-lg-12 col-md-12">
  144.                                 <!-- menu logo -->
  145.                                 <ul class="menu-logo">
  146.                                     <li>
  147.                                     </li>
  148.                                 </ul>
  149.                                 <!-- menu links -->
  150.                                 {% block menu %}
  151.                                     {% set route = app.request.get('_route') %}
  152.                                     <ul class="menu-links">
  153.                                         <li><a href="{{ path('homepage') }}">{{ 'Home'| trans }}</a></li>
  154.                                     {# Admins menu #}
  155.                                     {% if is_granted('ROLE_ADMIN') %}
  156.                                             <li class="{% if (route starts with 'vehicle') or (route starts with 'revokerequests') %}active{% endif %}"><a href="{{ path('vehicles_index') }}">{{ 'Vehicles'| trans }}</a></li>
  157.                                             <li class="{% if (route starts with 'user') or (route starts with 'additional_details') %}active{% endif %}"><a href="{{ path('users_index') }}">{{ 'Users'| trans }}</a></li>
  158.                                             <li class="{% if route starts with 'company' %}active{% endif %}"><a href="{{ path('company_index') }}">{{ 'Companies' | trans }}</a></li>
  159.                                             <li class="{% if route starts with 'auction' %}active{% endif %}"><a href="{{ path('auctions_index') }}">{{ 'Auctions' | trans }}</a></li>
  160.                                             <li class="{% if (route starts with 'reports') or (route ends with 'report') %}active{% endif %}"><a href="{{ path('reports_index') }}">{{ 'reports' | trans }}</a></li>
  161.                                         {% if is_granted('ROLE_ACCOUNTANT') %}
  162.                                             <li class="{% if route starts with 'banktrans' %}active{% endif %}"><a href="{{ path('banktrans_index') }}">{{ 'Bank Transactions' | trans }}</a></li>
  163.                                         {% endif %}
  164.                                         {% if is_granted('ROLE_SUPER_ADMIN') %}
  165.                                             <li class="{% if route starts with 'contentPages' %}active{% endif %}"><a href="{{ path('contentPages_index') }}">{{ 'Content Pages' | trans }}</a></li>
  166.                                         {% endif %}
  167.                                         {% if is_granted('ROLE_CUSTOMER_CARE') %}
  168.                                                 <li class="{% if route starts with 'contactus' %}active{% endif %}"><a href="{{ path('contactus_index') }}">{{ 'visitors feedback' | trans }}</a></li>
  169.                                         {% endif %}
  170.                                         {% if is_granted('ROLE_DATA_ADMIN') %}
  171.                                             <li class="{% if route starts with 'data_import' %}active{% endif %}"><a href="{{ path('data_import_index') }}">{{ 'Data import' | trans({},'vehicles')  }}</a></li>
  172.                                         {% endif %}
  173.                                         {# Beneficiary Rep menu #}
  174.                                     {% elseif is_granted('ROLE_BENEFICIARY_REP') %}
  175.                                             <li class="{% if route starts with 'company' %}active{% endif %}">
  176.                                                 <a href="{{ path('company_dashboard', {'companyId': app.user.company.companyId}) }}"> {{ 'control panel' | trans({}, 'clients') }} {{ app.user.company.companyRegistration.getName(app.request.locale) }} </a>
  177.                                             </li>
  178.                                     {% endif %}
  179.                                         {% if not is_granted('IS_AUTHENTICATED_FULLY') %}
  180.                                             <li class="visible-xs hidden-md hidden-lg hidden-sm">
  181.                                                 <a href="{{ path('user_registration') }}">{{ 'register now' | trans({}, 'clients') }}</a>
  182.                                             </li>
  183.                                         {% endif %}
  184.                                     </ul>
  185.                                 {% endblock %}
  186.                                 {% if not is_granted('IS_AUTHENTICATED_FULLY') %}
  187.                                     <ul class="menu-search-bar visible-lg visible-md visible-sm hidden-xs   ">
  188.                                         <li>
  189.                                             <a href="{{ path('user_registration') }}" class="btn btn-light">{{ 'register now' | trans({}, 'clients') }}</a>
  190.                                         </li>
  191.                                     </ul>
  192.                                 {%  endif %}
  193.                             </div>
  194.                         </div>
  195.                     </div>
  196.                 </section>
  197.             </nav>
  198.         </div>
  199.         <!-- Navigation Menu End -->
  200.         <!-- =-=-=-=-=-=-= Light Header End  =-=-=-=-=-=-= -->
  201.         {% block page_front %}
  202.         <div class="page-header-area {#hidden-xs#}">
  203.             <div class="container">
  204.                 <div class="row">
  205.                     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  206.                         <div class="header-page">
  207.                             <h1 class="page_title">{% block page_title %}{% endblock %}</h1>
  208.                         </div>
  209.                     </div>
  210.                 </div>
  211.             </div>
  212.         </div>
  213.         {% endblock %}
  214.         {% block breadcrumb %}{% endblock %}
  215.         <!-- =-=-=-=-=-=-= Main Content Area =-=-=-=-=-=-= -->
  216.         <div class="main-content-area clearfix" style="min-height: 600px">
  217.         {% block flash_messages %}
  218.             {% for label, messages in app.flashes([ 'success','warning', 'danger', 'notice', 'info']) %}
  219.                 {% for message in messages %}
  220.                     <div class="alert alert-{{ label }}" role="alert">
  221.                         {{ message|trans }}
  222.                         <button type="button" class="close close-btn" aria-label="Close" style="background: red;padding: 0px 5px 3px">
  223.                             <span aria-hidden="true">&times;</span>
  224.                         </button>
  225.                     </div>
  226.                 {% endfor %}
  227.             {% endfor %}
  228.         {% endblock %}
  229.         {% block body %}{% endblock %}
  230.         </div>
  231.         <!-- Main Content Area End -->
  232.         <!-- =-=-=-=-=-=-= FOOTER =-=-=-=-=-=-= -->
  233.         <div class="footer-area">
  234.             <!--Footer Upper-->
  235.             <div class="footer-content">
  236.                     <div class="clearfix text-center">
  237.                         
  238.                     <ul class="list-inline footer-links" style="text-align: center">
  239.                         <li><a href="{{ path('content', {'page': 'auction_terms'} ) }}"> {{ 'procedures and conditions of the auction' | trans}}</a></li>
  240.                         <li><a href="{{ path('static', {'page': 'location', '_proxy': 'static'} ) }}">{{ 'vehicles auction location' | trans}}</a></li>
  241.                         <li><a href="{{ path('content', {'page': 'video'} ) }}"> {{ 'auction vehicles video' | trans}}</a></li>
  242.                     </ul>
  243.                     </div>
  244.                     <div class="column line-dec" style="font-size: 9px;text-align: center;line-height: 13px;">
  245.                         {{ "tjr footer info" | trans({}, 'vehicles') }}
  246.                     </div>
  247.             </div>
  248.             <!--Footer Bottom-->
  249.             <div class="footer-copyright">
  250.                 <div class="container clearfix">
  251.                     <!--Copyright-->
  252.                     
  253.                     <div class="col-lg-12 col-md-12 col-xs-12">
  254.                         <ul class="list-inline footer-links" style="text-align: center;display: inline-block;">
  255.                             <li><a href="{{ path('content', {'page': 'terms'} ) }}"> {{ "terms and conditions" | trans({}, 'messages') }}</a></li>
  256.                             <li><a href="{{ path('content', {'page': 'privacy'} ) }}"> {{ "privacy policy" | trans({}, 'messages') }} </a></li>
  257.                         </ul>
  258.                         <div class="copyright  ">© 2018 TJR</div>
  259.                     </div>
  260.                 </div>
  261.             </div>
  262.         </div>
  263.         <!-- =-=-=-=-=-=-= FOOTER END =-=-=-=-=-=-= -->
  264.         <!-- =-=-=-=-=-=-= FOOTER =-=-=-=-=-=-= -->
  265.         {#<footer class="footer-area">
  266.             <div class="footer-copyright">
  267.                 <div class="container clearfix">
  268.                     <!--Copyright-->
  269.                     <div class="copyright text-center">Copyright 2018 © Auction.Sa All Rights Reserved</div>
  270.                 </div>
  271.                 <ul class="list-inline footer-links">
  272.                     <li><a  href="{{ path('static', {'page': 'terms', '_proxy': 'static'} ) }}"> {{ "terms and conditions" | trans({}, 'messages') }}</a></li>
  273.                     <li><a href="{{ path('static', {'page': 'privacy', '_proxy': 'static'} ) }}"> {{ "privacy policy" | trans({}, 'messages') }} </a></li>
  274.                 </ul>
  275.                 <div class="row">
  276.                     <a href="https://wa.me/966559661234" target="_blank" style="color: white;">
  277.                     <div dir="ltr" style="direction: ltr;">
  278.                         {{ 'support whatsapp contact' | trans}}
  279.                         <br /><img src="{{ asset('w1.png')}}" width="40" />
  280.                         +966-55-966-1234
  281.                     </div>
  282.                     </a>
  283.                 </div>
  284.             </div>
  285.         </footer>#}
  286.         <!-- =-=-=-=-=-=-= FOOTER END =-=-=-=-=-=-= -->
  287.         <!-- Back To Top -->
  288.         <a href="#0" class="cd-top">Top</a>
  289.         {% block javascripts %}
  290.             <!-- =-=-=-=-=-=-= JQUERY =-=-=-=-=-=-= -->
  291.             <script src="{{ asset('js/jquery.min.js')}}"></script>
  292.             <!-- Bootstrap Core Css  -->
  293.             <script src="{{ asset('js/bootstrap.min.js')}}"></script>
  294.             <!-- Jquery Easing -->
  295.             <script src="{{ asset('js/easing.js')}}"></script>
  296.             <!-- Menu Hover  -->
  297.             <script src="{{ asset('js/forest-megamenu.js')}}"></script>
  298.             <!-- Jquery Appear Plugin -->
  299.             <script src="{{ asset('js/jquery.appear.min.js')}}"></script>
  300.             <!-- Numbers Animation   -->
  301.             <script src="{{ asset('js/jquery.countTo.js')}}"></script>
  302.             <!-- Jquery Smooth Scroll  -->
  303.            {# <script src="{{ asset('js/jquery.smoothscroll.js')}}"></script>#}
  304.             <!-- Jquery Select Options  -->
  305.             <script src="{{ asset('js/select2.min.js')}}"></script>
  306.             <!-- noUiSlider -->
  307.             <script src="{{ asset('js/nouislider.all.min.js')}}"></script>
  308.             <!-- Carousel Slider  -->
  309.             <script src="{{ asset('js/carousel.min.js')}}"></script>
  310.             <script src="{{ asset('js/slide.js')}}"></script>
  311.             <!-- Image Loaded  -->
  312.             <script src="{{ asset('js/imagesloaded.js')}}"></script>
  313.             <script src="{{ asset('js/isotope.min.js')}}"></script>
  314.             <!-- CheckBoxes  -->
  315.             <script src="{{ asset('js/icheck.min.js')}}"></script>
  316.             <!-- Jquery Migration  -->
  317.             <script src="{{ asset('js/jquery-migrate.min.js')}}"></script>
  318.             <!-- Sticky Bar  -->
  319.             <script src="{{ asset('js/theia-sticky-sidebar.js')}}"></script>
  320.             <!-- Core JS -->
  321.             <script src="{{ asset('js/custom.js')}}"></script>
  322.             <!-- calenders -->
  323.             <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" crossorigin="anonymous"></script>
  324.             <script type="text/javascript" src="{{ asset('bootstrap/js/moment.js') }}"></script>
  325.             <script src="{{ asset('bootstrap/js/validator.js') }}"></script>
  326.             <script src="{{ asset('bootstrap/js/build/js/bootstrap-datetimepicker.min.js') }}"></script>
  327.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.js"></script>
  328.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.plus.min.js"></script>
  329.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.plugin.min.js"></script>
  330.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.plugin.js"></script>
  331.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.picker.js"></script>
  332.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.picker-ar.js"></script>
  333.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.ummalqura.min.js"></script>
  334.             <script src="https://cdn.rawgit.com/kbwood/calendars/2.1.0/dist/js/jquery.calendars.ummalqura-ar.js"></script>
  335.             <script src=" https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.0.3/sweetalert2.all.min.js"></script>
  336.             <script type="text/javascript">
  337.                 //to Show Website name and current page title in browser title bar
  338.                 if($(".page_title").html()){
  339.                     $("head title").html($("head title").html()+'-'+$(".page_title").html());
  340.                 }
  341.                 // function to get all cities under any region by region id takes the html element id for regions and citied.
  342.                 function jsGetCitiesByRegion(regionSelectId, citiesSelectId) {
  343.                     var regionID = $(regionSelectId).val();
  344.                     //removing options of cities list to force its validation to prevent form submission until AJAX response returns
  345.                     $("> option", citiesSelectId).each(function() {
  346.                         //only leave the default option, it is usually the first option and holds empty value
  347.                         if( this.value !== $("option:first", citiesSelectId).val() ){
  348.                             this.remove();
  349.                         }
  350.                      });
  351.                     $.ajax({
  352.                         url: '{{ (path('get_cities_ajax')) }}',
  353.                         type: "POST",
  354.                         dataType: "json",
  355.                         data: {
  356.                             "regionID": regionID
  357.                         },
  358.                         async: true,
  359.                         beforeSend: function() {
  360.                             // to put loader until fill the next select 
  361.                             $(citiesSelectId).parent('div').css("position", "relative");
  362.                             $('<div class="lds-spinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>').insertBefore(citiesSelectId);
  363.                         },
  364.                         success: function (data)
  365.                         {
  366.                             {#console.log(citiesSelectId);
  367.                             $(citiesSelectId).empty();
  368.                             $('<option value="">{{ "Please Select"|trans }}</option>').appendTo(citiesSelectId);#}
  369.                             $.each(data, function (key, value)
  370.                             {
  371.                                 $.each(value, function (key2, value2) {
  372.                                     $('<option value=' + value2.cityId + '>' + value2.name + '</option>').appendTo(citiesSelectId);
  373.                                 });
  374.                             });
  375.                             $(".lds-spinner").remove(); // remove loader
  376.                         }
  377.                     });
  378.                 }
  379.             </script>
  380.             
  381.             <!-- Google Analytics -->
  382.             <script async src="https://www.googletagmanager.com/gtag/js?id=UA-52229458-1"></script>
  383.             <script>
  384.               window.dataLayer = window.dataLayer || [];
  385.               function gtag(){dataLayer.push(arguments);}
  386.               gtag('js', new Date());
  387.               gtag('config', 'UA-52229458-1');
  388.             </script>
  389.             <!-- End Google Analytics -->
  390.         {% endblock %}
  391. </body>
  392. </html>