<html>
    <%- include("./partials/header.ejs") %>
    <body>
        <%- include("./partials/navbar.ejs") %>
        <div class="container-fluid">
            <form method="POST" enctype="multipart/form-data">
                <div class="form-group">
                  <label for="name">Nom de la faction</label>
                  <input type="text" class="form-control" id="name" name="name" placeholder="Entrez le nom de la faction">
                </div>
                <div class="form-group">
                  <label for="">Discord de la faction</label>
                  <input type="text" placeholder="entrer le code d'un lien permanent pour votre faction" class="form-control" name="discord" id="">
                </div>
                <div class="form-group">
                  <label for="description">Description</label>
                  <textarea class="form-control" id="description" name="description" rows="3" placeholder="Entrez une description de la faction"></textarea>
                </div>
                <div class="form-group">
                  <label for="">Type de faction</label>
                  <input type="text" class="form-control" name="typefaction" id="">
                </div>
                <div class="form-group">
                  <label for="members">Membres</label>
                  <select multiple class="form-select" id="members" name="members">
                    <% users.forEach(user => { %>
                    <option value="<%= user.username %>"><%= user.username %></option>
                    <% }) %>
                  </select>
                </div>
                <div class="form-group">
                  <label for="image">Image</label>
                  <input type="file" class="form-control-file" id="image" name="image" accept="image/*">
                </div>
                <button type="submit" class="btn btn-block btn-primary">Cr√©er la faction</button>
              </form>
        </div>
        <%- include("./partials/footer.ejs") %>
    </body>
</html>