templates/Complaint/complaintXPresentation.html.twig line 1

Open in your IDE?
  1. {% extends "Theme/UserComplaint/layout.html.twig" %}
  2. {% block stylesheets %}
  3.     {{ parent() }}
  4.     <link rel="stylesheet" href="{{ asset('assets/css/user/assistance.css') }}"/>
  5.     <style>
  6.         .body {
  7.             padding-top: 0;
  8.             padding-bottom:50px;
  9.         }
  10.         label {
  11.             font-size: 15px;
  12.         }
  13.         button[type="submit"] {
  14.             font-size: 16px;
  15.             font-weight: bold;
  16.         }
  17.     </style>
  18. {% endblock %}
  19. {% block heading %}
  20.     {% if (currentPath starts with '/express/') %}
  21.         Déposer une plainte contre X
  22.     {% endif %}
  23. {% endblock %}
  24. {% block body %}
  25.     {% if not (currentPath starts with '/express/') %}
  26.         {{ parent() }}
  27.     {% endif %}
  28.     {% if app.request.query.get('initial', 'yes') == 'no' %}
  29.         <p class="text-gray fz-16">
  30.             L’anticipation des risques est la meilleure façon de protéger vos biens !
  31.         </p>
  32.         <p class="text-gray fz-16">
  33.             Pour simplifier votre dépôt de plainte, vous gagnerez du temps si vous avez enregistré
  34.             préventivement
  35.             les informations nécessaires comme votre identité, vos adresses, vos objets sensibles, vos
  36.             véhicules,
  37.             ainsi que vos contrats d'assurances correspondants
  38.         </p>
  39.         <div class="d-flex justify-content-center mt-5 mb-5">
  40.             <a href="{{ path('express_complaint_x_presentation') }}" class="w-auto btn-sm m-0 px-5 btn btn-blue fs-16 justify-content-center">
  41.                 Porter plainte maintenant
  42.             </a>
  43.         </div>
  44.     {% else %}
  45.         {{ form_start(complaintXApprovalForm) }}
  46.         <div class="containerDashboard contentDashboard contentEdit position-relative">
  47.             <h4 class="text-center red fz-16">Merci de confirmer que votre situation répond à toutes ces conditions pour accéder à
  48.                 la sélection de votre plainte</h4>
  49.         </div>
  50.         <div class="containerDashboard contentDashboard body">
  51.             <div class="">
  52.                 <div class="">
  53.                     <span class="red fw-bold"></span>
  54.                 </div>
  55.                 <div class="blue fw-bold">
  56.                     <div class="card flex-column">
  57.                         {{ form_errors(complaintXApprovalForm) }}
  58.                         {{ form_widget(complaintXApprovalForm.youHasVictim) }}
  59.                         <span style="color:#de171f;font-size: 15px;margin: 5px 35px;width: 20px;display:block;">ou</span>
  60.                         {{ form_widget(complaintXApprovalForm.yourChildrenHasVictim) }}</div>
  61.                     <hr>
  62.                     <div class="card">{{ form_widget(complaintXApprovalForm.noWeaponsUsage) }}</div>
  63.                     <hr>
  64.                     <div class="card">{{ form_widget(complaintXApprovalForm.noDocumentStolen) }}</div>
  65.                     <hr>
  66.                     <div class="card">{{ form_widget(complaintXApprovalForm.noTargetDescription) }}</div>
  67.                     {% if complaintXApprovalForm.frenchPhone is defined %}
  68.                     <hr>
  69.                     <div class="card">{{ form_widget(complaintXApprovalForm.frenchPhone) }}</div>
  70.                     {% endif %}
  71.                 </div>
  72.                 {% if not (currentPath starts with '/express/') %}
  73.                 <div class="text-center">
  74.                     <a id="submit-complaint-presentation" href="{{ path('user_complaint_x_category') }}"
  75.                     class="btn-riposte-default submit-complaint-presentation d-none">
  76.                         Valider
  77.                     </a>
  78.                 </div>
  79.                 {% else %}
  80.                     {% include "ExpressComplaint/parts/_actions.html.twig" with {
  81.                             nextLabel : 'Valider'
  82.                         } %}
  83.                 {% endif %}
  84.                 <br/><br/>
  85.             {#            <p>#}
  86.                 {#                <a href="{{path('user_complaint_x_infos')}}"  class="btn btn-outline-danger seeMoreMobile btn-submit-custom2">#}
  87.                 {#                    <i class="far fa-book-reader navIco"></i>#}
  88.                 {#                        <span style="padding-left: 10px;">En savoir plus</span>#}
  89.                 {#                    </a>#}
  90.                 {#            </p>#}
  91.             </div>
  92.         </div>
  93.         {{form_end(complaintXApprovalForm)}}
  94.         {{ encore_entry_script_tags('complaint_presentation') }}
  95.         <script type="text/javascript">
  96.             let checkboxAll = $('input[type="checkbox"]');
  97.             let checkbox1 = $('#complaint_x_approval_youHasVictim');
  98.             let checkbox2 = $('#complaint_x_approval_yourChildrenHasVictim');
  99.             let checkbox3 = $('#complaint_x_approval_noWeaponsUsage');
  100.             let checkbox4 = $('#complaint_x_approval_noDocumentStolen');
  101.             let checkbox5 = $('#complaint_x_approval_noTargetDescription');
  102.             let checkbox6 = $('#complaint_x_approval_frenchPhone');
  103.             let $submitButton = $('.submit-complaint-presentation');
  104.             function toggleSubmitButton() {
  105.                 if ((checkbox1.is(":checked") || checkbox2.is(":checked")) && checkbox3.is(":checked") && checkbox4.is(":checked") && checkbox5.is(":checked") && checkbox6.is(":checked")) {
  106.                     $submitButton.removeClass('d-none');
  107.                 } else {
  108.                     $submitButton.addClass('d-none');
  109.                 }
  110.             }
  111.             // Show submit button only if checkbox required are checked
  112.             $(document).ready(function () {
  113.                 toggleSubmitButton();
  114.                 checkboxAll.on("change", function () {
  115.                     let element = $(this).first();
  116.                     if (element.prop("id") === 'complaint_x_approval_youHasVictim' && element.is(":checked")) {
  117.                         $('#complaint_x_approval_yourChildrenHasVictim').prop("checked", false);
  118.                     }
  119.                     if (element.prop("id") === 'complaint_x_approval_yourChildrenHasVictim' && element.is(":checked")) {
  120.                         $('#complaint_x_approval_youHasVictim').prop("checked", false);
  121.                     }
  122.                     toggleSubmitButton();
  123.                 });
  124.                 toggleSubmitButton();
  125.             });
  126.         </script>
  127.     {% endif %}
  128. {% endblock %}