templates/registration/register.html.twig line 1

Open in your IDE?
  1. <!doctype html>
  2. <html lang="fr">
  3. <head>
  4.     <meta charset="utf-8"/>
  5.     <title>Register | Octo - Delsart</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <!-- App favicon -->
  8.     <link rel="shortcut icon" href="assets/images/delsart_logo.jpg">
  9.     <!-- Bootstrap Css -->
  10.     <link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css"/>
  11.     <!-- Icons Css -->
  12.     <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css"/>
  13.     <!-- App Css-->
  14.     <link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css"/>
  15. </head>
  16. <body>
  17. <div class="account-pages my-5 pt-sm-5">
  18.     <div class="container">
  19.         <div class="row justify-content-center">
  20.             <div class="col-md-8 col-lg-6 col-xl-5">
  21.                 <div class="card overflow-hidden">
  22.                     <div class="card-body pt-0">
  23.                         <div>
  24.                             <div class="mb-4">
  25.                                         <span class="">
  26.                                             <img src="assets/images/delsart_logo.jpg" alt=""
  27.                                                  class="align-self-sm-start">
  28.                                         </span>
  29.                             </div>
  30.                         </div>
  31.                         <div class="p-2">
  32.                             <div class="form-horizontal">
  33.                                 <div class="mt-3 d-grid" id="buttonEstablishment">
  34.                                     <button class="btn btn-dark waves-effect waves-light" type="button" id="buttonClient" onclick="toggleForm(true)">
  35.                                         Je suis déjà client Delsart
  36.                                     </button>
  37.                                     <button class="btn btn-light waves-effect waves-light mt-2" type="button" id="buttonNewClient" onclick="toggleForm(false)">
  38.                                         Je ne suis pas encore client Delsart
  39.                                     </button>
  40.                                 </div>
  41.                                 <div class="mt-4 text-center">
  42.                                     <span><a href="/login" class="text-muted"><i class="mdi mdi-lock me-1"></i>Déjà inscrit ?</a></span>
  43.                                 </div>
  44.                             </div>
  45.                             {% if app.flashes('error') %}
  46.                                 <div class="alert alert-danger">
  47.                                     <span>Erreur dans les données introduites</span>
  48.                                 </div>
  49.                             {% endif %}
  50.                         </div>
  51.                         <div id="clientCarousel" class="carousel slide" data-bs-interval="false" style="display:none;">
  52.                             <div class="carousel-inner">
  53.                                 <!-- Section pour nouveau client avec choix d'établissement -->
  54.                                 <div class="carousel-item" id="newClient">
  55.                                     <h4>Choisissez une option</h4>
  56.                                     <div class="mt-3 d-grid" id="buttonEstablishment">
  57.                                         <button class="btn btn-dark waves-effect waves-light" type="button" id="buttonExistingEstablishment" onclick="showForm(true)">
  58.                                             Établissement existant
  59.                                         </button>
  60.                                         <button class="btn btn-light waves-effect waves-light mt-2" type="button" id="buttonProjectInProgress" onclick="showForm(false)">
  61.                                             Projet en cours
  62.                                         </button>
  63.                                     </div>
  64.                                 </div>
  65.                                 <div class="carousel-item active" id="existingClient">
  66.                                     <h4>Créez votre compte client pour un établissement existant</h4>
  67.                                     {{ form_start(registrationForm) }}
  68.                                     <form id="registrationForm" method="post">
  69.                                         <input type="hidden" id="isExistingEstablishment" name="isExistingEstablishment" value="false">
  70.                                         <div class="row">
  71.                                             <div class="col-lg-6">
  72.                                                 {{form_label(registrationForm.firstname, 'Prénom' ,{'attr': {'class': 'form-label'}}) }}
  73.                                                 {{form_widget(registrationForm.firstname, {'attr' : {'class': 'form-control', 'placeholder' : 'Entrez votre prénom'}})}}
  74.                                             </div>
  75.                                             <div class="col-lg-6">
  76.                                                 {{form_label(registrationForm.lastname, 'Nom' ,{'attr': {'class': 'form-label'}}) }}
  77.                                                 {{form_widget(registrationForm.lastname, {'attr' : {'class': 'form-control', 'placeholder' : 'Entrez votre nom'}})}}
  78.                                             </div>
  79.                                         </div>
  80.                                         <div class="col-lg-12 mt-2">
  81.                                             {{form_label(registrationForm.email, 'Email' ,{'attr': {'class': 'form-label'}}) }}
  82.                                             {{form_widget(registrationForm.email, {'attr' : {'class': 'form-control', 'placeholder' : 'Entrez votre email'}})}}
  83.                                             {{form_label(registrationForm.numberPhone, 'Numéro de téléphone' ,{'attr': {'class': 'form-label'}}) }}
  84.                                             {{ form_widget(registrationForm.numberPhone, {'attr' : {'class': 'form-control', 'placeholder' : 'Entrez votre numéro de téléphone'}}) }}
  85.                                             {{ form_label(registrationForm.plainPassword.first, 'Mot de Passe*', {'attr': {'class': 'form-label'}}) }}
  86.                                             {{ form_errors(registrationForm.plainPassword.first, {'attr': {'class': 'text-danger'}}) }}
  87.                                             <div class="input-group show-hide-password mb-3">
  88.                                                 {{ form_widget(registrationForm.plainPassword.first, {'attr': {'class': 'form-control', 'placeholder': 'Entrez votre mot de passe', 'id': 'passwordField'}}) }}
  89.                                                 <span class="input-group-text btn-yellow" id="password-addon" onclick="togglePasswordVisibility('registration_form_plainPassword_first', 'eyeIconFirst')">
  90.         <i class="mdi mdi-eye-outline" id="eyeIconFirst" aria-hidden="true" style="cursor: pointer;"></i>
  91.     </span>
  92.                                             </div>
  93.                                             {{ form_label(registrationForm.plainPassword.second, 'Confirmation*', {'attr': {'class': 'form-label'}}) }}
  94.                                             {{ form_errors(registrationForm.plainPassword.second, {'attr': {'class': 'text-danger'}}) }}
  95.                                             <div class="input-group show-hide-password mb-3">
  96.                                                 {{ form_widget(registrationForm.plainPassword.second, {'attr': {'class': 'form-control', 'placeholder': 'Confirmez votre mot de passe', 'id': 'confirmPasswordField'}}) }}
  97.                                                 <span class="input-group-text btn-yellow" id="password-addon" onclick="togglePasswordVisibility('registration_form_plainPassword_second', 'eyeIconSecond')">
  98.         <i class="mdi mdi-eye-outline" id="eyeIconSecond" aria-hidden="true" style="cursor: pointer;"></i>
  99.     </span>
  100.                                             </div>
  101.                                             {{form_label(registrationForm.tvaNumber, 'Numéro de tva' ,{'attr': {'class': 'form-label'}}) }}
  102.                                             {{form_widget(registrationForm.tvaNumber, {'attr' : {'class': 'form-control', 'placeholder' : 'Entrez votre numéro de tva'}})}}
  103.                                             {{ form_label(registrationForm.tvaStatus, 'Statut TVA', {'attr': {'class': 'form-label'}}) }}
  104.                                             {{ form_widget(registrationForm.tvaStatus, {'attr': {'class': 'form-control'}}) }}
  105.                                             {{ form_errors(registrationForm.tvaStatus) }}
  106.                                                 <label class="form-check-label mt-2" for="establishments">Mon (mes) établissement(s)</label>
  107.                                                 <textarea class="form-control" name="establishments" id="establishments"></textarea>
  108.                                                 <div style="display:none" id="newEstablishmentAddress">
  109.                                                     <label class="form-check-label mt-2" for="establishmentsAddress">Adresse(s) de mon (mes) établissement(s)</label>
  110.                                                     <textarea class="form-control" name="establishmentsAddress" id="establishmentsAddress"></textarea>
  111.                                                 </div>
  112.                                                 <div style="display:none" id="projectDescribe">
  113.                                                     <label class="form-check-label mt-2" for="description">Décrivez votre projet / type d'établissement</label>
  114.                                                     <textarea class="form-control" name="description" id="description"></textarea>
  115.                                                 </div>
  116.                                         </div>
  117.                                         <div class="col-lg-12 mt-4">
  118.                                             <div class="form-group">
  119.                                                 <div class="d-flex mt-2">
  120.                                                     {{ form_widget(registrationForm.cgvAccepted) }}
  121.                                                     <sub class="ml-2">
  122.                                                         J'accepte les <a href="/docs/privacy_policy.pdf" target="_blank" style="cursor:pointer; color: orangered">Conditions générales de ventes de Delsart</a> &
  123.                                                         <a href="/docs/disclaimer.pdf" target="_blank" style="cursor:pointer; color: orangered">Disclaimer</a>
  124.                                                     </sub>
  125.                                                 </div>
  126.                                             </div>
  127.                                         </div>
  128.                                         <div class="d-grid mt-3">
  129.                                             <button class="btn btn-dark waves-effect waves-light" id="submitButtonExisting" type="submit">Valider</button>
  130.                                         </div>
  131.                                         {{ form_end(registrationForm) }}
  132.                                     </form>
  133.                                 </div>
  134.                             </div>
  135.                         </div>
  136.                     </div>
  137.                 </div>
  138.             </div>
  139.         </div>
  140.     </div>
  141. </div>
  142. <!-- end account-pages -->
  143. <script src="assets/libs/jquery/jquery.min.js"></script>
  144. <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
  145. <script src="assets/libs/metismenu/metisMenu.min.js"></script>
  146. <script src="assets/libs/simplebar/simplebar.min.js"></script>
  147. <script src="assets/libs/node-waves/waves.min.js"></script>
  148. <!-- App js -->
  149. <script src="assets/js/app.js"></script>
  150. <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
  151. <script src="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/js/bootstrap.min.js"></script>
  152. <script>
  153.     function toggleForm(isExistingClient) {
  154.         $('#clientCarousel').show(); // Affiche le carrousel
  155.         $("#newEstablishmentAddress").hide();
  156.         $("#projectDescribe").hide();
  157.         if (isExistingClient) {
  158.             $('#existingClient').addClass('active').show(); // Affiche la section client existant
  159.             $('#newClient').removeClass('active').hide(); // Masque la section nouveau client
  160.         } else {
  161.             $('#existingClient').removeClass('active').hide(); // Masque la section client existant
  162.             $('#newClient').addClass('active').show(); // Affiche la section nouveau client
  163.         }
  164.     }
  165.     function showForm(exist) {
  166.         $('#isExistingEstablishment').val(exist);
  167.         $("#newEstablishmentAddress").hide();
  168.         $("#projectDescribe").hide();
  169.         $('#existingClient').addClass('active').show(); // Affiche la section client existant
  170.         $('#newClient').removeClass('active').hide(); // Masque la section nouveau client
  171.         if(exist){
  172.             $("#newEstablishmentAddress").hide();
  173.             $("#projectDescribe").hide();
  174.             $("#newEstablishmentAddress").show();
  175.         }
  176.         else{
  177.             $("#newEstablishmentAddress").show();
  178.             $("#projectDescribe").show();
  179.         }
  180.     }
  181.     $(document).ready(function() {
  182.         window.togglePasswordVisibility = function(fieldId, eyeIconId) {
  183.             // Sélectionne le champ de mot de passe
  184.             var $passwordField = $('#' + fieldId);
  185.             var $eyeIcon = $('#' + eyeIconId);
  186.             // Vérifie si le champ de mot de passe existe
  187.             if ($passwordField.length) {
  188.                 if ($passwordField.attr('type') === 'password') {
  189.                     $passwordField.attr('type', 'text'); // Affiche le mot de passe
  190.                     $eyeIcon.removeClass('mdi-eye-outline').addClass('mdi-eye-off-outline'); // Change l'icône
  191.                 } else {
  192.                     $passwordField.attr('type', 'password'); // Cache le mot de passe
  193.                     $eyeIcon.removeClass('mdi-eye-off-outline').addClass('mdi-eye-outline'); // Rechange l'icône
  194.                 }
  195.             } else {
  196.                 console.error("Element not found: " + fieldId);
  197.             }
  198.         };
  199.     });
  200. </script>
  201. <!-- App js -->
  202. <script src="assets/js/app.js"></script>
  203. </body>
  204. </html>