templates/front/services/service.html.twig line 1

Open in your IDE?
  1. {% extends "front/_common/_base.html.twig" %}
  2. {% block linkcanonical %}
  3.     <link rel="canonical" href="{{ absolute_url(path('service', {'slug': service.slug})) }}">
  4. {% endblock %}
  5. {% block cssadicional %}{% endblock %}
  6. {% block classbody %}{% endblock %}
  7. {% block content %}
  8.     <section class="b5 scroll-wrapper">
  9.         <div class="b5Wrapper">
  10.             <picture class="b5BannerPicture">
  11.                 <source srcset="{{ asset(service.bannerImage|image_path) }}">
  12.                 <img class="b5BannerPictureImage" src="{{ asset(service.bannerImage|image_path) }}" width="1600" alt="{{ service.bannerImage|image_alt }}">
  13.             </picture>
  14.             {% if service.bannerText %}
  15.                 <div class="b5BannerText">
  16.                     <h1 class="scroll-item">{{ service.bannerText }}</h1>
  17.                 </div>
  18.             {% endif %}
  19.         </div>
  20.     </section>
  21.     <section class="b21">
  22.         <div class="wanchoSecondary">
  23.             <div class="scroll-wrapper">
  24.                 <ul class="b21MigaCustom b10LeftMigaPan scroll-item">
  25.                     <li><a href="{{ path('home') }}">Home</a></li>&nbsp;/ &nbsp;
  26.                     <li><a href="{{ path('after_sales') }}">Postventa</a></li>&nbsp;/ &nbsp;
  27.                     <li><a href="{{ path('services') }}">Servicios</a></li>&nbsp;/ &nbsp;
  28.                     <li class="active"><a href="{{ path('service', {'slug': service.slug}) }}">{{ service.title }}</a></li>
  29.                 </ul>
  30.             </div>
  31.             <div class="b21Wrap">
  32.                 <div class="b21Left scroll-wrapper">
  33.                     <h4 class="titleStandard b21Title scroll-item">{{ service.detailTitle }}</h4>
  34.                     <div class="b21Text scroll-item">
  35.                         <p>{{ service.detailText|nl2br }}</p>
  36.                     </div>
  37.                     {% if service.contactShow %}
  38.                         <div class="b21Data">
  39.                             {% if service.contactTitle %}
  40.                                 <h4 class="titleStandard b21DataTitle scroll-item">{{ service.contactTitle }}</h4>
  41.                             {% endif %}
  42.                             {% if service.contactPhone %}
  43.                                 <div class="b21DataiTem scroll-item">
  44.                                     <a href="tel:{{ service.contactPhone|only_numbers }}"><i class="icon-iconos-15"></i> {{ service.contactPhone }}</a>
  45.                                 </div>
  46.                             {% endif %}
  47.                             {% if service.contactEmail %}
  48.                                 <div class="b21DataiTem scroll-item">
  49.                                     <a href="mailto:{{ service.contactEmail }}"><i class="icon-iconos-17"></i> {{ service.contactEmail }}</a>
  50.                                 </div>
  51.                             {% endif %}
  52.                             {% if service.contactAddress %}
  53.                                 <div class="b21DataiTem scroll-item">
  54.                                     <a href="https://www.google.com/maps/search/{{ service.contactAddress }}" target="_blank">
  55.                                         <i class="icon-iconos-18"></i> {{ service.contactAddress }}</a>
  56.                                 </div>
  57.                             {% endif %}
  58.                         </div>
  59.                     {% endif %}
  60.                 </div>
  61.                 <div class="b21Right scroll-wrapper">
  62.                     <div class="b21WrapContact scroll-item">
  63.                         {% if forms.serviceTitle %}
  64.                             <h4 class="titleStandard b21TitleContact">{{ forms.serviceTitle }}</h4>
  65.                         {% endif %}
  66.                         {{ form_start(form) }}
  67.                             {% include 'front/templates/form_utm_fields.html.twig' %}
  68.                             {{ form_widget(form.establishment) }}
  69.                             {{ form_widget(form.service) }}
  70.                             <div class="b21Input">
  71.                                 {{ form_widget(form.document, {'attr': {'data-expresion': 'text', 'class': 'validKeypress g-number form-contact validate[required,custom[onlyNumberSp]]'}}) }}
  72.                                 <span class="form-label">RUC o DNI*</span>
  73.                             </div>
  74.                             <div class="b21Input">
  75.                                 {{ form_widget(form.company, {'attr': {'data-expresion': 'text', 'class': 'validKeypress g-text form-contact validate[required,custom[onlyLetterSp]]'}}) }}
  76.                                 <span class="form-label">Empresa/Razón social*</span>
  77.                             </div>
  78.                             <div class="b21Input">
  79.                                 {{ form_widget(form.name, {'attr': {'data-expresion': 'text', 'class': 'validKeypress g-text form-contact validate[required,custom[onlyLetterSp]]'}}) }}
  80.                                 <span class="form-label">Nombres*</span>
  81.                             </div>
  82.                             <div class="b21Input">
  83.                                 {{ form_widget(form.lastName, {'attr': {'data-expresion': 'text', 'class': 'validKeypress g-text form-contact validate[required,custom[onlyLetterSp]]'}}) }}
  84.                                 <span class="form-label">Apellidos*</span>
  85.                             </div>
  86.                             <div class="b21Input">
  87.                                 {{ form_widget(form.email, {'attr': {'class': 'form-contact validate[required,custom[email]]'}}) }}
  88.                                 <span class="form-label">Correo*</span>
  89.                             </div>
  90.                             <div class="b21Input">
  91.                                 {{ form_widget(form.phone, {'attr': {'data-expresion': 'text', 'class': 'validKeypress g-number form-contact validate[required,custom[onlyNumberSp]]'}}) }}
  92.                                 <span class="form-label">Teléfono*</span>
  93.                             </div>
  94.                             <div class="b21Select">
  95.                                 <select class="form-contact-select validate[required]" id="establishment">
  96.                                     <option value="" disabled selected></option>
  97.                                     {% for item in establishmentsArray %}
  98.                                         <option value="{{ item.title }}">{{ item.title }}</option>
  99.                                     {% endfor %}
  100.                                 </select>
  101.                                 <span class="form-label">Establecimiento*</span>
  102.                                 <i class="icon-iconos-10"></i>
  103.                             </div>
  104.                             <div class="b21Paragraph">
  105.                                 (*) Campos obligatorios.
  106.                             </div>
  107.                             <div class="b21WrapCheckbox">
  108.                                 <input type="checkbox" id="b21Checkbox" class="validate[required]" name="">
  109.                                 <label for="b21Checkbox">Acepto las <a href="{{ path('privacy_policies') }}" target="_blank">Políticas de Privacidad</a></label>
  110.                             </div>
  111.                             <button type="submit" class="buttonStandard gray b21Btn">Enviar</button>
  112.                         {{ form_end(form) }}
  113.                     </div>
  114.                 </div>
  115.             </div>
  116.         </div>
  117.     </section>
  118. {% endblock %}
  119. {% block jsfinal %}
  120.     <script type="text/javascript">
  121.         jQuery(function ($) {
  122.             $("form").validationEngine('attach', {
  123.                 promptPosition: "topLeft",
  124.                 autoHidePrompt: true,
  125.                 autoPositionUpdate: false,
  126.                 autoHideDelay: 2000,
  127.                 binded: false,
  128.                 scroll: false,
  129.                 validateNonVisibleFields: true
  130.             })
  131.             $('#establishment').on('change', function () {
  132.                 $('#form_service_establishment').val($(this).val());
  133.             })
  134.             $('#form_service_service').val('{{ service.title }}');
  135.             $('#BtnLibro').on('click', function (event) {
  136.                 event.preventDefault();
  137.                 const item = $(this);
  138.                 const form = item.closest('form');
  139.                 const valid = form.validationEngine('validate');
  140.                 if (valid) {
  141.                     form.submit();
  142.                 }
  143.             });
  144.         })
  145.     </script>
  146. {% endblock %}