<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="/styles.css">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
  </head>
</head>
<body>

{{!-- Navigation links --}}
    <nav>
        <a href="/"><h4>Projet MIA</h4></a>
    </nav>

   <div class="container mt-4">

        <h4>Vous avez sélectionné la session <b>{{topic}}</b> planifiée le {{session_date}}</h4>
        <form action="/" method="GET">
            <button type="submit" class="btn btn-secondary">< Changer de session</button>
        </form>
        <br>
        <div class="card" style="width: 30rem;">            
            <div class="card-header">2 - Identification du participant</div>    
            <div class="card-body">
                <form action="/auth/check-login" method="POST">
                    <input type="hidden" name="session" id="session-reg" value="{{session}}">
                    <input type="hidden" name="role" id="role-reg" value="{{role}}">
                    <div class="mb-3">
                        <label for="email-reg" class="form-label">Adresse email</label>
                        <input type="text" class="form-control" id="email-reg" name="email" value="{{email}}">                        
                    </div>
                    <div class="mb-3">
                        <label for="nickname-reg" class="form-label">Votre pseudo</label>
                        <input type="text" class="form-control" id="nickname-reg" name="nickname" value="{{nickname}}">                        
                    </div>
                    <div class="mb-3">
                        <label for="password-reg" class="form-label">Votre mot de passe *</label>
                        <input type="password" class="form-control" id="password-reg" name="password" required="true">
                    </div>
                    <button type="submit" class="btn btn-primary">Se connecter</button>
                </form>
            </div>
            <a href="/register?s={{session}}&r={{role}}">Pas encore inscrit ? Cliquez ici pour vous enregistrer.</a>
        </div>

        {{#if error }}
            <h4 class="alert alert-danger mt-4">{{error}}</h4>
        {{/if}}

    </div>

</body>
</html>