    <div class="corps">
        <% if (errors && errors.length > 0) { %>
            <div class="alert alert-danger">
              <% errors.forEach(error => { %>
                <p><%= error.msg %></p>
              <% }) %>
            </div>
          <% } %>
        <div class="card">
            <div class="card-header">Inscription</div>
            <div class="card-body">
                <form method="POST" action="/admin/signup">
                    <div class="form-group">
                        <label for="matricules">Matricule</label>
                        <input type="text" class="form-control form-control-sm" id="matricules" name="matriculeEmployee"/>
                    </div>
                    <div class="form-group">
                        <label for="nom">Nom</label>
                        <input type="text" class="form-control form-control-sm" id="nom" name="firstName" required/>
                    </div>
                    <div class="form-group">
                        <label for="prenom">Prénom</label>
                        <input type="text" class="form-control form-control-sm" id="prenom" name="lastName" required/>
                    </div>
                    <div class="form-group">
                        <label for="email">Email</label>
                        <input type="email" class="form-control form-control-sm" id="email" name="email" required>
                    </div>
                    <div class="form-group">
                        <label for="role">Rôle</label>              
                        <select name="role" class="form-select" id="role" aria-label="size 3 select example">
                          <option value="User">User</option>
                          <option value="Admin">Admin</option>
                          <option value="Manager">Manager</option>
                          <option value="Super admin">Super admin</option>                          
                        </select>
                    </div>
                    <div class="form-group" id="leader">
                        
                    </div>
                    <!-- <div class="form-group">
                        <label for="password">Mot de passe</label>
                        <input type="password" class="form-control form-control-sm" id="password" name="password" required>
                    </div>
                    <div class="form-group">
                        <label for="confirmPassword">Confirmer le mot de passe</label>
                        <input type="password" class="form-control form-control-sm" id="confirmPassword" name="confirmPassword">
                    </div> -->
                      
                    <div class="form-group">
                        <label for="telephone">Numéro de téléphone</label>
                        <input type="tel" class="form-control form-control-sm" id="telephone" name="phoneNumber">
                    </div>
                    <!-- <div class="form-group">
                        <label for="photo">Photo de profil</label>
                        <input type="file" class="form-control-file" id="photo" name="photo" accept="image/*" required>
                    </div> -->
                    <button type="submit" class="btn btn-primary">S'inscrire</button>
                    <button type="reset" class="btn btn-light">Annuler</button>
                </form>
            </div>
        </div>        
    </div>

    <script>
        var user = document.getElementById('role');
        var value = `
            <div class="form-group">
                <label for="leader">Encadreur</label>                
                <select name="leader" id="leader" class="form-select form-select-sm">
                  <option value="superieur" selected>Les supérieurs</option>
                  <% admins.forEach(admin => { %>                    
                      <option value="<%= admin.id %>"><%= admin.firstName %> <%= admin.lastName %></option>                    
                  <% }); %>
                </select>
            </div>
        `
        var choice = document.getElementById('leader');
        if(user.value == 'User') {
            choice.innerHTML = value;
        }
        else {
            choice.innerHTML = '';
        }
        user.addEventListener('input', (event) => {
            if(user.value == 'User') {
                choice.innerHTML = value;
            }
            else {
                choice.innerHTML = '';
            }
        })
    </script>