templates/front-office/booking/form.html.twig line 1

Open in your IDE?
  1. {#
  2. Controller : App\FrontOffice\BookingController
  3. Route : "booking_form"
  4. URI : "/reservation"
  5. #}
  6. {% extends "front-office/_base.html.twig" %}
  7. {% block script %}
  8.     <script src="{{ asset('assets/js/reservation.js') }}"></script>
  9. {% endblock %}
  10. {% block content %}
  11.     <section class="form-bg-page">
  12.         {# Check if there is really products in basket #}
  13.         {% set check = false %}
  14.         {% for key, c in app.request.cookies.all %}
  15.             {% if key|split("-")|length > 1 %}
  16.                 {% set check = true %}
  17.             {% endif %}
  18.         {% endfor %}
  19.         {% if check %}
  20.             <div class="form-resa">
  21.                 <h1>votre demande de reservation</h1>
  22.                 <form class="form-content meli-section-90" action="#" method="POST">
  23.                     <section class="section-info">
  24.                         <div class="cercle-bleu-content meli-between-center">
  25.                             <h2>1</h2>
  26.                             <p>vous etes<span class="mention">*Mentions obligatoires</span></p>
  27.                         </div>
  28.                         <div class="info-resp meli-section-90">
  29.                             <div class="child-info-resp meli-between-center">
  30.                                 <div class="form-div meli-flex-col">
  31.                                     <label for="resa-name" class="form-label">nom*</label>
  32.                                     <input type="text" name="resa-name" class="form-input">
  33.                                 </div>
  34.                                 <div class="form-div meli-flex-col">
  35.                                     <label for="resa-prenom" class="form-label">prenom*</label>
  36.                                     <input type="text" name="resa-firstname" class="form-input">
  37.                                 </div>
  38.                             </div>
  39.                             <div class="child-info-resp meli-between-center">
  40.                                 <div class="form-div meli-flex-col">
  41.                                     <label for="resa-tel" class="form-label">telephone*</label>
  42.                                     <input type="text" name="resa-tel" class="form-input">
  43.                                 </div>
  44.                                 <div class="form-div meli-flex-col">
  45.                                     <label for="resa-email" class="form-label">adresse e-mail*</label>
  46.                                     <input type="email" name="resa-email" class="form-input">
  47.                                 </div>
  48.                             </div>
  49.                             <div class="form-local meli-width-100">
  50.                                 <div class="form-adresse meli-width-100 meli-flex-col ">
  51.                                     <label for="resa-adresse" class="form-label">adresse*</label>
  52.                                     <input type="text" name="resa-address" class="form-input">
  53.                                 </div>
  54.                                 <div class="child-info-resp meli-width-45 meli-between-center">
  55.                                     <div class="form-cp form-local-div meli-width-30 meli-flex-col">
  56.                                         <label for="resa-code" class="form-label">code postal*</label>
  57.                                         <input type="text" name="resa-code" class="form-input">
  58.                                     </div>
  59.                                     <div class="form-local-div meli-width-60 meli-flex-col">
  60.                                         <label for="resa-city" class="form-label">ville*</label>
  61.                                         <input type="text" name="resa-city" class="form-input">
  62.                                     </div>
  63.                                 </div>
  64.                             </div>
  65.                         </div>
  66.                     </section>
  67.                     <section class="section-location">
  68.                         <div class="cercle-bleu-content meli-between-center">
  69.                             <h2>2</h2>
  70.                             <p>vous souhaitez louer</p>
  71.                         </div>
  72.                         <div class="errors">
  73.                             <p class="error-p"></p>
  74.                         </div>
  75.                         <div class="meli-section-90">
  76.                             <div class="title-form-loc meli-between-center">
  77.                                 <h2>designation</h2>
  78.                                 <h2>dates</h2>
  79.                                 <h2>prix</h2>
  80.                             </div>
  81.                             {% set products = app.request.cookies.all %}
  82.                             <div id="loc-section"  class="group-line-loc">
  83.                                 {% for key, p in products %}
  84.                                     {% if key|split("-")|length > 1 %}
  85.                                         {% set product = key|split("-")[0] %}
  86.                                         {% set id = key|split("-")[1] %}
  87.                                             <div  class="line-loc meli-between-center js-field"
  88.                                                   id="{{ product }}-{{ id }}"
  89.                                                   data-id="{{ id }}"
  90.                                                   data-price=""
  91.                                                   data-tva=""
  92.                                                   data-type="{{ product }}"
  93.                                                   data-url="{{ path('ajax_reservation',{'product':product,'id':id}) }}"
  94.                                             >
  95.                                                 <div class="designation meli-width-30">
  96.                                                     <p id="js-name-view-{{ product }}-{{ id }}"></p>
  97.                                                     <input type="hidden" id="js-name-hidden-{{ product }}-{{ id }}" name="{{ product }}-{{ id }}" value="">
  98.                                                     <div class="delete-line"
  99.                                                         data-url="{{ path('ajax_cookie_remove',{'product':product,'id':id}) }}"
  100.                                                     >
  101.                                                         <P>retirer</P>
  102.                                                     </div>
  103.                                                 </div>
  104.                                                 <div class="date-loc">
  105.                                                     <div class="start-date meli-between-center">
  106.                                                         <p>Du</p>
  107.                                                         <div class="days-loc">
  108.                                                             <select  class="border-date" name="date-start-day-{{ product }}-{{ id }}"
  109.                                                                      id="date-start-day-{{ product }}-{{ id }}" required>
  110.                                                                 <option disabled selected value="">JJ</option>
  111.                                                                 {% for i in 1..31 %}
  112.                                                                     <option value="{{ i }}">{{ i }}</option>
  113.                                                                 {% endfor %}
  114.                                                             </select>
  115.                                                         </div>
  116.                                                         <div class="month-loc">
  117.                                                             <select class="border-date" name="date-start-month-{{ product }}-{{ id }}"
  118.                                                                     id="date-start-month-{{ product }}-{{ id }}" required>
  119.                                                                 <option disabled selected value="">MM</option>
  120.                                                                 {% for i in 1..12 %}
  121.                                                                     <option value="{{ i }}">{{ i }}</option>
  122.                                                                 {% endfor %}
  123.                                                             </select>
  124.                                                         </div>
  125.                                                         <div class="years-loc">
  126.                                                             <select name="date-start-year-{{ product }}-{{ id }}"
  127.                                                                     class="border-date"
  128.                                                                     id="date-start-year-{{ product }}-{{ id }}" required>
  129.                                                                 <option disabled selected value="">AAAA</option>
  130.                                                                 {% for date in 0..5 %}
  131.                                                                     {% set year = "now"|date_modify("+"~date~" year")|date('Y') %}
  132.                                                                     <option value="{{ year }}">{{ year }}</option>
  133.                                                                 {% endfor %}
  134.                                                             </select>
  135.                                                         </div>
  136.                                                     </div>
  137.                                                     <div class="finish-date meli-between-center ">
  138.                                                         <p>Au</p>
  139.                                                         <div class="days-loc">
  140.                                                             <select class="border-date"
  141.                                                                     name="date-end-day-{{ product }}-{{ id }}"
  142.                                                                     id="date-end-day-{{ product }}-{{ id }}" required>
  143.                                                                 <option disabled selected value="">JJ</option>
  144.                                                                 {% for i in 1..31 %}
  145.                                                                     <option value="{{ i }}">{{ i }}</option>
  146.                                                                 {% endfor %}
  147.                                                             </select>
  148.                                                         </div>
  149.                                                         <div class="month-loc">
  150.                                                             <select class="border-date"
  151.                                                                     name="date-end-month-{{ product }}-{{ id }}"
  152.                                                                     id="date-end-month-{{ product }}-{{ id }}" required>
  153.                                                                 <option disabled selected value="">MM</option>
  154.                                                                 {% for i in 1..12 %}
  155.                                                                     <option value="{{ i }}">{{ i }}</option>
  156.                                                                 {% endfor %}
  157.                                                             </select>
  158.                                                         </div>
  159.                                                         <div class="years-loc">
  160.                                                             <select name="date-end-year-{{ product }}-{{ id }}" class="border-date"
  161.                                                                     id="date-end-year-{{ product }}-{{ id }}" required>
  162.                                                                 <option disabled selected value="">AAAA</option>
  163.                                                                 {% for date in 0..5 %}
  164.                                                                     {% set year = "now"|date_modify("+"~date~"year")|date('Y') %}
  165.                                                                     <option value="{{ year }}">{{ year }}</option>
  166.                                                                 {% endfor %}
  167.                                                             </select>
  168.                                                         </div>
  169.                                                     </div>
  170.                                                 </div>
  171.                                                 <div class="price-line meli-width-20">
  172.                                                     <p><span id="js-price-view-{{ product }}-{{ id }}"></span> €/jour</p>
  173.                                                 </div>
  174.                                             </div>
  175.                                     {% endif %}
  176.                                 {% endfor %}
  177.                             </div>
  178.                         </div>
  179.                     </section>
  180.                     <section class="last-section">
  181.                         <div class="cercle-bleu-content meli-between-center">
  182.                             <h2>3</h2>
  183.                             <p>vous y etes presque!</p>
  184.                         </div>
  185.                         <div class="footer-form meli-between-center">
  186.                             <p class="meli-width-50">Les studios P vous propose une location<br>pour un motant total de :</p>
  187.                             <div class="total-loc meli-width-20">
  188.                                 <h2>total</h2>
  189.                                 <p><span id="price-tot">-</span> €</p>
  190.                             </div>
  191.                             <div class="btn-envoyer">
  192.                                 <button id="submit-btn" type="submit">envoyer</button>
  193.                             </div>
  194.                         </div>
  195.                     </section>
  196.                 </form>
  197.             </div>
  198.         {% else %}
  199.             <div id="empty-basket">
  200.                 <h1>Vous n'avez rien mis dans votre panier</h1>
  201.             </div>
  202.         {% endif %}
  203.     </section>
  204. {% endblock %}