templates/Mobile/vignette.html.twig line 1

Open in your IDE?
  1. {% extends '@templates/Mobile/Shop/layout.html.twig' %}
  2. {% block head %}
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta http-equiv="Content-Language" content="ro">
  7.         <meta name="google-site-verification" content="BEtIqk-choaMawpOxG98NtbWKAZK5MuTxV_2-pSHGFQ">
  8.         {% block title %} <title>{{ 'app.ui.calculator_vignette_price'|trans }} | Roviniete.ro</title> {% endblock %}
  9.         {% block metatags %}
  10.             <meta name="description" content="{% if vignetteDescriptionForSeo|length > 0 %}{{ vignetteDescriptionForSeo.content }}{% endif %}">
  11.             <meta name="keywords" content="{% if vignetteKeywordsForSeo|length > 0 %}{{ vignetteKeywordsForSeo.content }}{% endif %}"/>
  12.         {% endblock %}
  13.         <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  14.         {% block stylesheets %}
  15.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/homepage.css') }}">
  16.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/bootstrap.min.css') }}">
  17.             {{ encore_entry_link_tags('bootstrap-fix', null, 'bootstrapTheme') }}
  18.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/vignette_shop.v1.css') }}">
  19.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/bs-stepper.css') }}">
  20.             <link rel="stylesheet" href="{{ asset('/assets/shop/css/leftmenu.v1.css') }}">
  21.         {% endblock %}
  22.         {{ sonata_block_render_event('sylius.shop.layout.head') }}
  23.         {% block javascripts %}
  24.             <script src="{{ asset('assets/shop/js/sentry-bundle.min.js') }}"></script>
  25.             <script>
  26.                  if (typeof Sentry !== 'undefined') {
  27.                     Sentry.init({
  28.                         dsn: "{{ sentry_dsn }}",
  29.                         integrations: [new Sentry.Integrations.TryCatch({
  30.                             eventTarget: false,
  31.                         })]
  32.                     });
  33.                 }
  34.                 let roadAssistanceValidFrom = null;
  35.                 MESSAGE_INVALID_REGISTRATION_PLATE = '{{ 'app.ui.invalid_registration_plate'|trans }}';
  36.                 MESSAGE_INVALID_VIN = '{{ 'app.ui.invalid_vin'|trans }}'
  37.             </script>
  38.             <script src="{{ asset('assets/shop/js/jquery.min.js') }}"></script>
  39.             <script src="{{ asset('/assets/shop/js/bs-stepper.js') }}"></script>
  40.             <script src="{{ asset('assets/shop/js/jquery-ui.min.js') }}"></script>
  41.             <script src="{{ asset('assets/shop/js/popper.min.js') }}"></script>
  42.             <script src="{{ asset('assets/shop/js/bootstrap.min.js') }}"></script>
  43.             <script src="{{ asset('assets/shop/js/leftmenu.js') }}"></script>
  44.             <script src="{{ asset('/bundles/fosjsrouting/js/router.js') }}"></script>
  45.             <script src="{{ asset('assets/shop/js/moment.min.js') }}"></script>
  46.             <script src="{{ asset('assets/shop/js/jquery.validate.min.js') }}"></script>
  47.             {{ encore_entry_script_tags('vignette') }}
  48.             <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  49.             <script>
  50.                 dataLayer = [];
  51.             </script>
  52.             <!-- Google Tag Manager -->
  53.             <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  54.                         new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  55.                     j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  56.                     'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  57.                 })(window,document,'script','dataLayer','{{ gtm_code }}');</script>
  58.             <!-- End Google Tag Manager -->
  59.         {% endblock %}
  60.     </head>
  61. {% endblock %}
  62. {% block content %}
  63.     <div id="loadingDiv" class="loading d-none">
  64.         <div class="card w-50">
  65.             <div class="card-body bg-loading-card">
  66.                 <img src="{{ asset('assets/shop/images/spinner.gif') }}"
  67.                      style="width: 50px; pointer-events: none"/>
  68.                 <h5>Se verifica datele</h5>
  69.             </div>
  70.         </div>
  71.     </div>
  72.     <div class="d-inline-flex mx-3">
  73.         <a href="{{ path('sylius_shop_homepage') }}" class="section text-primary" style="font-size: 0.8em;">{{ 'sylius.ui.home'|trans }}</a>
  74.         <div class="divider"> /</div>
  75.         <small class="section active">{{ 'app.ui.vignettes'|trans }}</small>
  76.     </div>
  77.     <div id="isMobileComponent" class="d-none"></div>
  78.     <!-- Google Tag Manager (noscript) -->
  79.     <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ gtm_code }}"
  80.                       height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  81.     <!-- End Google Tag Manager (noscript) -->
  82.     {% if lastProductStatus.vignetteStatus %}
  83.         <h1 class="mt-4 mx-3">{{ 'app.ui.calculator_vignette_price'|trans}}</h1>
  84.         {% set smsPrice = sms_price_ron.calculateSmsPrice %}
  85.         {% set oldValues = app.request.request %}
  86.         <div id="specialErrors" class="alert alert-warning alert-dismissible fade show d-none" role="alert">
  87.             <div class="header text-center">
  88.                 <h2>{{ 'sylius.ui.warning'|trans }}</h2>
  89.             </div>
  90.             <p>
  91.             <h5 class="text-center text-primary vignette-already-bought d-none">
  92.                 {{ 'app.ui.vignette_available_for_choosen_date'|trans }}
  93.             </h5>
  94.             <h5 class="special-error">
  95.             </h5>
  96.             <a class="text-center">
  97.             </a>
  98.             </p>
  99.             <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  100.                 <span aria-hidden="true">&times;</span>
  101.             </button>
  102.         </div>
  103.         <div id="categoryError" class="alert alert-warning fade show d-none" role="alert">
  104.             <div class="header text-center">
  105.                 <h2>{{ 'app.ui.error'|trans }}</h2>
  106.             </div>
  107.             <p>
  108.             <h5 class="text-center text-primary">
  109.                 {{ 'app.ui.vignette_category_error'|trans }}
  110.             </h5>
  111.             <h5 class="special-error">
  112.             </h5>
  113.             <a class="text-center">
  114.             </a>
  115.             </p>
  116.         </div>
  117.         <div id="divNoSpecialCharacters" class="alert alert-warning d-none" role="alert">
  118.             {{ 'app.ui.no_special_characters_allowed'|trans }}
  119.         </div>
  120.         {% include '@templates/Mobile/Checkout/_modal_payment_not_available.html.twig' %}
  121.         {% include '@templates/AdminCustom/Layout/loading.html.twig' with {showLoading: true} %}
  122.         <div class="row mx-1 my-3">
  123.         </div>
  124.         <form id="vignetteForm" method="POST">
  125.             <input type="hidden" name="ignoreAlreadyActive" id="ignoreAlreadyActive" value="false">
  126.             <input type="hidden" name="ignoreWrongCategory" id="ignoreWrongCategory" value="false">
  127.             <input type="hidden" name="productStatusExtraOptions" id="productStatusExtraOptions" value="{{ lastProductStatus.extraOptionsStatus }}">
  128.             <div class="mb-5">
  129.                 <div class="main-container mx-2 mt-2">
  130.                     <div id="accordion">
  131.                         <div class="card mb-3 shadow-sm">
  132.                             <div id="headingOne" class="pb-2">
  133.                                 <h5 class="mb-0">
  134.                                     <button id="btnStep1" style="font-size: 0.8em;" class=" w-100 no-button text-dark font-weight-bolder ml-3" type="button" data-toggle="collapse" data-target="#step1Collapse" aria-expanded="true" aria-controls="step1Collapse" disabled>
  135.                                         <div class="row align-items-center mt-2 mr-2">
  136.                                             <div class="col-12 mt-1">
  137.                                                 <div class="d-flex justify-content-between align-items-center">
  138.                                                     <div>
  139.                                                         <img id="imgStep1" src="{{ asset('assets/shop/images/icons/ic_check_small_primary.png')}}" style="width: 18px; position: relative; top: -2px; margin-right: 10px;"/>
  140.                                                         <a id="txtStep1" class="text-primary">
  141.                                                             <span style="font-size: 1.5em; font-weight: 500;">{{'app.ui.step_one'|trans}}</span>
  142.                                                             <span id="step1CollapsedTxt" style="font-size: 1.3em; font-weight: 400; margin-left: 20px;">{{ 'app.ui.step_one_indication'|trans }}</span></a>
  143.                                                     </div>
  144.                                                     <div id="step1EditIcon"  class="d-none"  style="margin-left: auto; order: 2;"  >
  145.                                                         <img src="{{ asset('assets/shop/images/icons/ic_edit_grey.png')}}" style="width: 20px"/>
  146.                                                     </div>
  147.                                                 </div>
  148.                                                 <div class="text-left" style="margin-left: 27px">
  149.                                                     <a id="txtSelectionStep1"></a>
  150.                                                 </div>
  151.                                             </div>
  152.                                         </div>
  153.                                     </button>
  154.                                 </h5>
  155.                             </div>
  156.                             <div id="step1Collapse" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion" >
  157.                                 <div class="card-body">
  158.                                     <div class="mt-0">
  159.                                         {% for category in vignetteCategories%}
  160.                                             {% if loop.index % 2 != 0 %}
  161.                                                 <div class="d-flex justify-content-between">
  162.                                             {% endif %}
  163.                                             <label type="button" for="{{ category.code|first|lower }}" class="btn {% if oldValues.get('category') and  oldValues.get('category') == category.id %} btn-vignette-selected {% else %} btn-vignette-unselected {% endif %} w-100 mr-1 webkit-none" style="min-height: 50px">
  164.                                                 <div class="d-flex justify-content-between align-items-center">
  165.                                                     <input type="radio" name="category" id="{{ category.code|first|lower }}"  data-error-message="{{'app.errors.no_category_selected'|trans }}" value="{{ category.id }}"
  166.                                                            data-category="
  167.                                             {% if category.id == category_rovignette_a_id%}
  168.                                                 {{ 'app.ui.category_rovignette_a_name'|trans }}
  169.                                             {% elseif category.id == category_rovignette_b_id %}
  170.                                                 {{ 'app.ui.category_rovignette_b_name'|trans }}
  171.                                             {% elseif category.id == category_rovignette_c_id %}
  172.                                                 {{ 'app.ui.category_rovignette_c_name'|trans|raw }}
  173.                                             {% elseif category.id == category_rovignette_d_id %}
  174.                                                 {{ 'app.ui.category_rovignette_d_name'|trans }}
  175.                                             {% elseif category.id == category_rovignette_e_id %}
  176.                                                 {{ 'app.ui.category_rovignette_e_name'|trans|raw }}
  177.                                             {% elseif category.id == category_rovignette_f_id %}
  178.                                                 {{ 'app.ui.category_rovignette_f_name'|trans|raw }}
  179.                                             {% elseif category.id == category_rovignette_g_id %}
  180.                                                 {{ 'app.ui.category_rovignette_g_name'|trans }}
  181.                                             {% elseif category.id == category_rovignette_h_id %}
  182.                                                 {{ 'app.ui.category_rovignette_h_name'|trans }}
  183.                                             {% endif %}
  184.                                                "
  185.                                                     {% if vehicle is not null and vehicle.roVignetteCategory is not null and vehicle.roVignetteCategory.id is defined  and vehicle.roVignetteCategory.id == category.id %} checked
  186.                                                     {% elseif oldValues.get('category') == category.id %} checked {% endif %} hidden>
  187.                                                     <img {% if oldValues.get('category') and  oldValues.get('category') == category.id %} src="{{ (asset('assets/shop/images/icons/ic_rovinieta_categ_' ~ category.code|first|lower) ~ '_white' ~ '.png')}}" {% else %}src="{{ (asset('assets/shop/images/icons/ic_rovinieta_categ_' ~ category.code|first|lower) ~ '.png')}}"{% endif %} style="width: 46px;"/>
  188.                                                     <a id="vehicleType-{{category.code|first|lower}}" class="font-weight-bold {% if oldValues.get('category') and  oldValues.get('category') == category.id %} text-white{% endif %}" style="color: #343a40;" >
  189.                                                         {% if category.id == category_rovignette_a_id%}
  190.                                                             {{ 'app.ui.category_rovignette_a_short_code'|trans }}
  191.                                                         {% elseif category.id == category_rovignette_b_id %}
  192.                                                             {{ 'app.ui.category_rovignette_b_short_code'|trans }}
  193.                                                         {% elseif category.id == category_rovignette_c_id %}
  194.                                                             {{ 'app.ui.category_rovignette_c_short_code'|trans|raw }}
  195.                                                         {% elseif category.id == category_rovignette_d_id %}
  196.                                                             {{ 'app.ui.category_rovignette_d_short_code'|trans }}
  197.                                                         {% elseif category.id == category_rovignette_e_id %}
  198.                                                             {{ 'app.ui.category_rovignette_e_short_code'|trans|raw }}
  199.                                                         {% elseif category.id == category_rovignette_f_id %}
  200.                                                             {{ 'app.ui.category_rovignette_f_short_code'|trans|raw }}
  201.                                                         {% elseif category.id == category_rovignette_g_id %}
  202.                                                             {{ 'app.ui.category_rovignette_g_short_code'|trans }}
  203.                                                         {% elseif category.id == category_rovignette_h_id %}
  204.                                                             {{ 'app.ui.category_rovignette_h_short_code'|trans }}
  205.                                                         {% endif %}
  206.                                                     </a>
  207.                                                 </div>
  208.                                             </label>
  209.                                             {% if loop.index % 2 == 0 %}
  210.                                                 </div>
  211.                                             {% endif %}
  212.                                         {% endfor %}
  213.                                     </div>
  214.                                 </div>
  215.                             </div>
  216.                         </div>
  217.                         <div class="card mb-3 shadow-sm">
  218.                             <div id="headingTwo" class="pb-2">
  219.                                 <h5 class="mb-0">
  220.                                     <button disabled id="btnStep2" style="font-size: 0.8em;" class=" w-100 no-button text-dark font-weight-bolder ml-3" type="button" data-toggle="collapse" data-target="#step2Collapse" aria-expanded="false" aria-controls="step2Collapse">
  221.                                         <div class="row align-items-start mt-2 mr-2">
  222.                                             <div class="col-12 mt-1">
  223.                                                 <div class="d-flex justify-content-between align-items-center">
  224.                                                     <div>
  225.                                                         <img id="imgStep2" src="{{ asset('assets/shop/images/icons/ic_check_small_grey.png')}}" style="width: 18px; position: relative; top: -2px; margin-right: 10px;"/>
  226.                                                         <a id="txtStep2" class="text-secondary">
  227.                                                             <span  style="font-size: 1.5em; font-weight: 500;">{{'app.ui.step_two'|trans}}</span>
  228.                                                             <span id="step2CollapsedTxt" style="font-size: 1.3em; font-weight: 400; margin-left: 20px;">{{ 'app.ui.step_two_indication'|trans }}</span>
  229.                                                         </a>
  230.                                                     </div>
  231.                                                     <div id="step2EditIcon"  class="d-none"  style=" margin-left: auto; order: 2;"  >
  232.                                                         <img src="{{ asset('assets/shop/images/icons/ic_edit_grey.png')}}" style="width: 20px"/>
  233.                                                     </div>
  234.                                                 </div>
  235.                                                 <div class="text-left" style="margin-left: 27px">
  236.                                                     <a id="txtSelectionStep2"></a>
  237.                                                 </div>
  238.                                             </div>
  239.                                         </div>
  240.                                     </button>
  241.                                 </h5>
  242.                             </div>
  243.                             <div id="step2Collapse" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
  244.                                 <div class="card-body">
  245.                                     <div class="d-flex justify-content-center">
  246.                                         <input type="hidden" id="validFrom" name="validFrom"{% if oldValues.get('validFrom') %} value = {{oldValues.get('validFrom')   }}
  247.                                             {% elseif oldValidFrom is not null %} data-value="{{ oldValidFrom|date("m/d/Y") }}"
  248.                                             {% endif %}>
  249.                                         <div id="datepicker" data-error-message = '{{'app.errors.no_date_selected'|trans }}'></div>
  250.                                     </div>
  251.                                 </div>
  252.                             </div>
  253.                         </div>
  254.                         <div class="card mb-3 shadow-sm">
  255.                             <div id="headingThree" class="pb-2">
  256.                                 <h5 class="mb-0">
  257.                                     <button disabled id="btnStep3" style="font-size: 0.8em;" class=" w-100 no-button text-dark font-weight-bolder ml-3" type="button" data-toggle="collapse" data-target="#step3Collapse" aria-expanded="false" aria-controls="step3Collapse">
  258.                                         <div class="row align-items-start mt-2 mr-2">
  259.                                             <div class="col-12 mt-1">
  260.                                                 <div class="d-flex justify-content-between align-items-center">
  261.                                                     <div>
  262.                                                         <img id="imgStep3" src="{{ asset('assets/shop/images/icons/ic_check_small_grey.png')}}" style="width: 18px; position: relative; top: -2px; margin-right: 10px;"/>
  263.                                                         <a id="txtStep3" class="text-secondary">
  264.                                                             <span style="font-size: 1.5em; font-weight: 500;">{{'app.ui.step_three'|trans}}</span>
  265.                                                             <span id="step3CollapsedTxt" style="font-size: 1.3em; font-weight: 400; margin-left: 20px;">{{ 'app.ui.step_three_indication'|trans }}</span>
  266.                                                         </a>
  267.                                                     </div>
  268.                                                     <div id="step3EditIcon"  class="d-none"  style=" margin-left: auto; order: 2;"  >
  269.                                                         <img src="{{ asset('assets/shop/images/icons/ic_edit_grey.png')}}" style="width: 20px"/>
  270.                                                     </div>
  271.                                                 </div>
  272.                                                 <div class="text-left" style="margin-left: 27px">
  273.                                                     <a id="txtSelectionStep3" style="display: none"></a>
  274.                                                 </div>
  275.                                             </div>
  276.                                         </div>
  277.                                     </button>
  278.                                 </h5>
  279.                             </div>
  280.                             <div id="step3Collapse" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
  281.                                 <div class="card-body">
  282.                                     <div class="d-flex justify-content-between availability-wrapper" data-error-message="{{'app.errors.no_availability_selected'|trans }}">
  283.                                         <label type="button" id="lblAv1Day" for="av_1" class="btn btn-vignette-unselected w-100 webkit-none" style="display: none; min-height: 65px" data-value="{{ 'app.ui.1_day'|trans  }}">
  284.                                             <div class="mx-2 my-2">
  285.                                                 <input type="radio" name="availability"  id="av_1" value="1" hidden {% if oldValues.get('availability') == 1 %} checked {% endif %}>
  286.                                                 <h2 id="txtAv1Day" class="{% if oldValues.get('availability') == 1 %} text-white {% else %} text-primary {% endif %} txtAvailability">{{ 'app.ui.1_day'|trans }}</h2>
  287.                                                 <a id="txtAv1DayPrice" class=" {% if oldValues.get('availability') == 1 %} text-white {% endif %} txtAvailabilityPrice">17.60 LEI</a>
  288.                                             </div>
  289.                                         </label>
  290.                                     </div>
  291.                                     <div class="d-flex justify-content-between">
  292.                                         <label type="button" id="lblAv7Day" for="av_7" class="btn btn-vignette-unselected w-100 mr-2 webkit-none" data-value="{{ 'app.ui.7_days'|trans }}" style="display: none; min-height: 65px">
  293.                                             <div class="mx-2 my-2">
  294.                                                 <input type="radio" name="availability" id="av_7" value="2" hidden  {% if oldValues.get('availability') == 2 %} checked {% endif %}>
  295.                                                 <h2 id="txtAv7Days" class="{% if oldValues.get('availability') == 2 %} text-white {% else %} text-primary {% endif %} txtAvailability">{{ 'app.ui.7_days'|trans }}</h2>
  296.                                                 <a id="txtAv7DaysPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 2 %} text-white {% endif %} ">17.60 LEI</a>
  297.                                             </div>
  298.                                         </label>
  299.                                         <label type="button" id="lblAv10Day" for="av_10" class="btn btn-vignette-unselected w-100 mr-2 webkit-none" data-value="{{ 'app.ui.10_days'|trans }}" style="display: none; min-height: 65px">
  300.                                             <div class="mx-2 my-2">
  301.                                                 <input type="radio" name="availability" id="av_10" value="6" hidden  {% if oldValues.get('availability') == 6 %} checked {% endif %}>
  302.                                                 <h2 id="txtAv10Days" class="{% if oldValues.get('availability') == 6 %} text-white {% else %} text-primary {% endif %} txtAvailability">{{ 'app.ui.10_days'|trans }}</h2>
  303.                                                 <a id="txtAv10DaysPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 6 %} text-white {% endif %} ">17.60 LEI</a>
  304.                                             </div>
  305.                                         </label>
  306.                                         <label type="button" for="av_30" class="btn btn-vignette-unselected w-100 webkit-none" data-value="{{ 'app.ui.30_days'|trans }}" style="min-height: 65px">
  307.                                             <div class="mx-2 my-2">
  308.                                                 <input type="radio" name="availability" id="av_30" value="3" hidden {% if oldValues.get('availability') == 3 %} checked {% endif %}>
  309.                                                 <h2 id="txtAv30Days" class="{% if oldValues.get('availability') == 3 %} text-white {% else %} text-primary {% endif %}  txtAvailability">{{ 'app.ui.30_days'|trans }}</h2>
  310.                                                 <a id="txtAv30DaysPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 3 %} text-white {% endif %} ">33.60 LEI</a>
  311.                                             </div>
  312.                                         </label>
  313.                                     </div>
  314.                                     <div class="d-flex justify-content-between">
  315.                                         <label type="button" id="lblAv90Day" for="av_90" class="btn btn-vignette-unselected w-100 mr-2 webkit-none" data-value="{{ 'app.ui.90_days'|trans }}" style="display: none; min-height: 65px">
  316.                                             <div class="mx-2 my-2">
  317.                                                 <input type="radio" name="availability" id="av_90" value="4" hidden {% if oldValues.get('availability') == 4 %} checked {% endif %}>
  318.                                                 <h2 id="txtAv90Days" class="{% if oldValues.get('availability') == 4 %} text-white {% else %} text-primary {% endif %}  txtAvailability">{{ 'app.ui.90_days'|trans }}</h2>
  319.                                                 <a id="txtAv90DaysPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 4 %} text-white {% endif %} ">117.60 LEI</a>
  320.                                             </div>
  321.                                         </label>
  322.                                         <label type="button" id="lblAv60Day" for="av_60" class="btn btn-vignette-unselected w-100 mr-2 webkit-none" data-value="{{ 'app.ui.60_days'|trans }}" style="display: none; min-height: 65px">
  323.                                             <div class="mx-2 my-2">
  324.                                                 <input type="radio" name="availability" id="av_60" value="7" hidden {% if oldValues.get('availability') == 7 %} checked {% endif %}>
  325.                                                 <h2 id="txtAv60Days" class="{% if oldValues.get('availability') == 7 %} text-white {% else %} text-primary {% endif %}  txtAvailability">{{ 'app.ui.60_days'|trans }}</h2>
  326.                                                 <a id="txtAv60DaysPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 7 %} text-white {% endif %} ">117.60 LEI</a>
  327.                                             </div>
  328.                                         </label>
  329.                                         <label type="button" for="av_12" class="btn btn-vignette-unselected w-100 webkit-none" data-value="{{ 'app.ui.12_months'|trans }}" style="min-height: 65px">
  330.                                             <div class="mx-2 my-2">
  331.                                                 <input type="radio" name="availability" id="av_12" value="5" hidden {% if oldValues.get('availability') == 5 %} checked {% endif %}>
  332.                                                 <h2 id="txtAv1Year" class="{% if oldValues.get('availability') == 5 %} text-white {% else %} text-primary {% endif %}  txtAvailability">{{ 'app.ui.12_months'|trans }}</h2>
  333.                                                 <a id="txtAv1YearPrice" class="txtAvailabilityPrice {% if oldValues.get('availability') == 5 %} text-white {% endif %} ">333.60 LEI</a>
  334.                                             </div>
  335.                                         </label>
  336.                                     </div>
  337.                                 </div>
  338.                             </div>
  339.                         </div>
  340.                         <div class="card mb-3 shadow-sm">
  341.                             <div id="headingFour" class="pb-2">
  342.                                 <h5 class="mb-0">
  343.                                     <button disabled id="btnStep4" style="font-size: 0.8em;" class=" w-100 no-button text-dark font-weight-bolder ml-3" type="button" data-toggle="collapse" data-target="#step4Collapse" aria-expanded="false" aria-controls="step4Collapse">
  344.                                         <div class="row align-items-start mt-2 mr-2">
  345.                                             <div class="col-12 mt-1">
  346.                                                 <div class="d-flex justify-content-between align-items-center">
  347.                                                     <div>
  348.                                                         <img id="imgStep4" src="{{ asset('assets/shop/images/icons/ic_check_small_grey.png')}}" style="width: 18px; position: relative; top: -2px; margin-right: 10px;"/>
  349.                                                         <a id="txtStep4" class="text-secondary">
  350.                                                             <span style="font-size: 1.5em; font-weight: 500;">{{'app.ui.step_four'|trans}}</span>
  351.                                                             <span style="font-size: 1.3em; font-weight: 400; margin-left: 20px;">{{ 'app.ui.step_four_indication'|trans }}</span>
  352.                                                         </a>
  353.                                                     </div>
  354.                                                     <div id="step4EditIcon"  class="d-none"  style=" margin-left: auto; order: 2;"  >
  355.                                                         <img src="{{ asset('assets/shop/images/icons/ic_edit_grey.png')}}" style="width: 20px"/>
  356.                                                     </div>
  357.                                                 </div>
  358.                                             </div>
  359.                                         </div>
  360.                                     </button>
  361.                                 </h5>
  362.                             </div>
  363.                             <div id="step4Collapse" class="collapse" aria-labelledby="headingFour" data-parent="#accordion">
  364.                                 <div class="card-body">
  365.                                     <div class=" d-flex align-items-center" >
  366.                                         <div class="mr-2">
  367.                                             <label for="carCountry" id="carCountryLabel" class="lbl-custom lbl-custom-grey d-none" style="width: 100% !important;">{{ 'app.ui.country_code'|trans}}</label>
  368.                                             <select id="carCountry" name="carCountry"
  369.                                                     data-style="btn-grey border-0 selectpicker-custom shadow-none prometo-font" data-live-search="true"
  370.                                                     title="{{ 'app.ui.country_code'|trans }}*" class="form-control input-custom input-custom-grey selectpicker"
  371.                                                     required>
  372.                                                 <option id="countryCodeOption" value="">{{'app.ui.country_code'|trans}}</option>
  373.                                                 {% for country in countries|sort((a, b) => a.name > b.name) %}
  374.                                                     <option id="{{ country.code }}" data-content="<span class='text-dark'>{{ country.name }} - {{ country.code }}</span>"
  375.                                                             value="{{ country.code }}" {% if oldValues.get('carCountry') and oldValues.get('carCountry')  == country.code %} selected {% endif %}
  376.                                                     >{{ country.name }} - {{ country.code }}</option>
  377.                                                 {% endfor %}
  378.                                             </select>
  379.                                         </div>
  380.                                         <div class="flex-grow-1">
  381.                                             <label for="registrationPlate" id="registrationPlateLabel" class="lbl-custom lbl-custom-grey d-none" style="width: 100% !important;">{{'app.ui.registration_plate'|trans}}</label>
  382.                                             <input id="registrationPlate" name="registrationPlate" data-warning-message="{{ 'app.warning.characters_not_allowed'|trans }}"
  383.                                                    data-error-message="{{'app.errors.no_plate'|trans }}" type="text" class="form-control input-custom input-custom-grey"
  384.                                                    placeholder="{{'app.ui.registration_plate'|trans}}" maxlength="10" required
  385.                                                    oninvalid="this.setCustomValidity('{{ 'app.ui.please_fill_this_field'|trans }}')"
  386.                                                    oninput="setCustomValidity('')"
  387.                                                     {% if vehicle is not null and vehicle.registrationPlate is not null and vehicle.registrationPlate is defined %}
  388.                                                         value="{{ vehicle.registrationPlate }}"
  389.                                                     {% elseif oldValues.get('registrationPlate') %}
  390.                                                         value="{{ oldValues.get('registrationPlate') }}"
  391.                                                     {% endif %} required>                                        </div>
  392.                                         <div id="registrationPlateCheckIcon" class="ml-2 invisible" >
  393.                                             <img src="{{ asset('assets/shop/images/icons/ic_validation_check.png')}}" style="width: 30px"/>
  394.                                         </div>
  395.                                     </div>
  396.                                     <div class="d-flex align-items-center my-2">
  397.                                         <div class="flex-grow-1">
  398.                                             <div id="vinBlock" class="d-none">
  399.                                                 <label for="vin" class="text-dark lbl-custom lbl-custom-grey d-none" style="width: 100% !important;">{{'app.ui.vin'|trans}} ({{ 'app.ui.chassis_number'|trans }})</label>
  400.                                                 <input id="vin" name="vin" type="text" style="width: 100% !important;"
  401.                                                        class="form-control input-custom input-custom-grey" placeholder="{{'app.ui.vin'|trans}} ({{ 'app.ui.chassis_number'|trans }})">
  402.                                             </div>
  403.                                         </div>
  404.                                         <div id="vinCheckIcon" class="ml-2 invisible" >
  405.                                             <img src="{{ asset('assets/shop/images/icons/ic_validation_check.png')}}" style="width: 30px"/>
  406.                                         </div>
  407.                                     </div>
  408.                                 </div>
  409.                             </div>
  410.                         </div>
  411.                     </div>
  412.                 </div>
  413.                 <div id="finalizeOrder">
  414.                     {% if app.request.locale == 'ro' and lastProductStatus.vignetteSmsStatus %}
  415.                         <div class="vignette-alert-container px-2 py-3">
  416.                             <div class="d-flex justify-content-between align-items-center-center">
  417.                                 <div class="custom-control custom-checkbox">
  418.                                     <input type="checkbox" name="vignetteAlert" id="vignetteAlert" class="custom-control-input" data-price="{{ smsPrice }}"
  419.                                             {% if oldValues.get('vignetteAlert') %} checked {% endif %}>
  420.                                     <label for="vignetteAlert" class="custom-control-label">
  421.                                         <h4 class="text-dark font-weight-bolder" style="letter-spacing: 0.01em;">{{'app.ui.sms_alert'|trans}}</h4>
  422.                                     </label>
  423.                                 </div>
  424.                                 <div>
  425.                                     <h4 class="font-weight-bolder"> {{ smsPrice }} Lei ({{ sms_price_eur }} Eur)</h4>
  426.                                 </div>
  427.                             </div>
  428.                             <div>
  429.                                 <a>{{'app.ui.alert_description'|trans}}</a>
  430.                             </div>
  431.                         </div>
  432.                     {% endif %}
  433.                     <div id="app" class="my-2">
  434.                         {% if lastProductStatus.roadAssistanceStatus and lastProductStatus.vignetteRoadAssistanceStatus %}
  435.                             <road-assistance :price="{{ road_assistance_service.retrieveDefaultPrice }}" :terms-and-conditions-route="'{{ path('bitbag_sylius_cms_plugin_shop_page_show', {'slug' : 'terms-and-conditions-road-assistance'}) }}'" v-bind:is-mobile="true"></road-assistance>
  436.                         {% endif %}
  437.                     </div>
  438.                         <div id="divCnairAlert" class="vignette-alert-container px-2 py-3 bg-white d-none">
  439.                             <div class="d-flex justify-content-between align-items-center-center">
  440.                                 <div class="custom-control custom-checkbox">
  441.                                     <input type="checkbox" name="email_allowed" id="email_allowed" class="custom-control-input">
  442.                                     <label for="email_allowed" class="custom-control-label">
  443.                                         <h5 class="text-dark" style="letter-spacing: 0.01em;">{{'app.ui.cnair_alert'|trans}}</h5>
  444.                                     </label>
  445.                                 </div>
  446.                             </div>
  447.                         </div>
  448.                     <div class="row my-3 btn-wrapper" style="height: 45px; margin: 5px;">
  449.                         <button id="btnSubmitVignette" name="btnSubmitVignette" type="submit" class="btn btn-submit btn-primary w-100 h-100">
  450.                             <a>{{'app.ui.next_step'|trans}}</a>
  451.                         </button>
  452.                     </div>
  453.                 </div>
  454.             </div>
  455.         </form>
  456.         <style>
  457.             .text-primary {
  458.                 color: #E95A31;
  459.             }
  460.             .selectpicker-custom {
  461.                 height: 50px !important;
  462.                 border-bottom: 1px solid #878C96 !important;
  463.             }
  464.             .input-custom {
  465.                 width: 100% !important;
  466.             }
  467.             .webkit-none {
  468.                 -webkit-appearance: none !important;
  469.             }
  470.             .ui-state-highlight, .ui-widget-content .ui-state-highlight {
  471.                 background: none !important;
  472.                 color: #454545 !important;
  473.                 border: none !important;
  474.             }
  475.             .modal-backdrop {
  476.                 opacity: 50% !important;
  477.             }
  478.             .btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show>.btn-primary.dropdown-toggle {
  479.                 background-color: #e95a31 !important;
  480.             }
  481.             .b-calendar-grid-body {
  482.                 margin-left: .5rem!important;
  483.                 margin-right: .5rem!important;
  484.             }
  485.             .b-calendar-grid-weekdays {
  486.                 border: none !important;
  487.             }
  488.             .loading {
  489.                 display: flex;
  490.                 flex-direction: column;
  491.                 justify-content: center;
  492.                 align-items: center;
  493.                 text-align: center;
  494.                 min-height: 100vh;
  495.                 z-index: 999;
  496.                 position: fixed;
  497.                 background-color: rgba(0,0,0,0.7);
  498.                 opacity: 100%;
  499.                 width: 100%;
  500.                 height: 100%;
  501.             }
  502.         </style>
  503.     {% else %}
  504.         <div class="card text-center my-3">
  505.             <div class="card-header">
  506.                 <h2>{{ 'app.ui.disabled_temporary'|trans }}</h2>
  507.             </div>
  508.             <div class="card-body">
  509.                 <a href="{{ path('sylius_shop_homepage') }}">{{ 'sylius.ui.back_to_store'|trans }}</a>
  510.             </div>
  511.         </div>
  512.     {% endif %}
  513. {% endblock %}
  514. {% block footer %}
  515.     {% if lastProductStatus.vignetteStatus %}
  516.         <script>
  517.             const route = "{{ path('sylius_shop_homepage')|escape('js') }}";
  518.             const roadAssistanceTranslations = '{{ roadAssistanceTranslations|json_encode|raw }}';
  519.         </script>
  520.         {{ encore_entry_script_tags('vue') }}
  521.         {% set oldValues = app.request.request %}
  522.         <script type="text/javascript">
  523.             $(document).ready(function () {
  524.                 $(window).bind("load", function () {
  525.                     let locale = getLocale();
  526.                     function getLocale() {
  527.                         let url = Routing.generate('app_shop_get_locale');
  528.                         $.ajax({
  529.                             url: url,
  530.                             type: 'GET',
  531.                             async: false,
  532.                             dataType: 'json',
  533.                             success: function (locale) {
  534.                                 if (locale == 'ro_RO' || locale == 'ro') {
  535.                                     $('[name="carCountry"] option').filter(function() {
  536.                                         return ($(this).val() == 'RO');
  537.                                     }).prop('selected', true).change();
  538.                                     $('select[name=carCountry]').val('RO').change();
  539.                                     let selectPicker =  $('.selectpicker');
  540.                                     if (selectPicker.length > 0 && typeof selectPicker.selectpicker === 'function') {
  541.                                         selectPicker.selectpicker('refresh');
  542.                                     }
  543.                                     let btn = $('[data-id="' + 'carCountry' + '"]');
  544.                                     btn.addClass('selectpicker-custom-selected');
  545.                                     btn.removeClass('selectpicker-custom');
  546.                                 }
  547.                             },
  548.                             error: function (data) {
  549.                             }
  550.                         });
  551.                     }
  552.                 });
  553.             })
  554.             var one_day = '{{ 'app.ui.1_day'|trans|lower }}';
  555.             var seven_days = '{{ 'app.ui.7_days'|trans|lower }}';
  556.             var ten_days = '{{ 'app.ui.10_days'|trans|lower }}';
  557.             var thirty_days = '{{ 'app.ui.30_days'|trans|lower }}';
  558.             var sixty_days = '{{ 'app.ui.60_days'|trans|lower }}';
  559.             var ninety_days = '{{ 'app.ui.90_days'|trans|lower }}';
  560.             var twelve_months = '{{ 'app.ui.12_months'|trans|lower }}';
  561.             var locale = '{{ app.request.getLocale() }}';
  562.         </script>
  563.     {% endif %}
  564.     {% block cnair_partner %}
  565.         <div class="mx-5">
  566.             <div class="text-center align-items-center">
  567.                 <div class="ui circular label bg-white">
  568.                     <img src="{{ asset('assets/shop/images/icons/ic_trust_cnair_bw.png') }}" style="width: 20px"/>
  569.                 </div>
  570.                 <div class="ui circular label bg-white">
  571.                     <img src="{{ asset('assets/shop/images/icons/ic_trust_stema_bw.png') }}" style="width: 20px"/>
  572.                 </div>
  573.                 <br/>
  574.                 <small>{{ 'app.ui.cnair_authorized_long'|trans }}</small>
  575.             </div>
  576.         </div>
  577.     {% endblock %}
  578.     {% if accordionBlocksAboutVignette is defined and accordionBlocksAboutVignette|length > 0 %}
  579.         <div class="row my-3 align-items-center text-center">
  580.             {% for key, block in accordionBlocksAboutVignette %}
  581.                 <div class="col-12 col-sm-12 col-md-6 col-lg-4 mb-3">
  582.                     <button class="accordion" type="button" data-toggle="collapse" data-target="#collapse{{ key }}" aria-expanded="false" aria-controls="collapse{{ key }}">{{ block.name }}</button>
  583.                     <div class="collapse" id="collapse{{ key }}">
  584.                         <div class="card card-body border">{{ block.content|raw }}</div>
  585.                     </div>
  586.                 </div>
  587.             {% endfor %}
  588.         </div>
  589.     {% endif %}
  590.     {% if accordionBlocksAboutHuVignette is defined and accordionBlocksAboutHuVignette|length > 0 %}
  591.         <div class="row my-3 align-items-center text-center">
  592.             {% for key, block in accordionBlocksAboutHuVignette %}
  593.                 <div class="col-12 col-sm-12 col-md-6 col-lg-4 mb-3">
  594.                     <button class="accordion" type="button" data-toggle="collapse" data-target="#collapse{{ key }}" aria-expanded="false" aria-controls="collapse{{ key }}">{{ block.name }}</button>
  595.                     <div class="collapse" id="collapse{{ key }}">
  596.                         <div class="card card-body border">{{ block.content|raw }}</div>
  597.                     </div>
  598.                 </div>
  599.             {% endfor %}
  600.         </div>
  601.     {% endif %}
  602.     {% include '@templates/Front/Shop/v2/_footer.html.twig' %}
  603. {% endblock %}