link de toutes les pages entre elles
continuous-integration/drone/push Build is failing Details

Issue_030_Cookies
Antoine PINAGOT 1 year ago
parent 0c0704e51e
commit 470092f36f

@ -25,7 +25,7 @@ class Controller extends BaseController
#[Route(path: '/', name: 'home', methods: ['GET'])]
public function index(): Response
{
return $this->render('./page/password.html.twig',[
return $this->render('./page/index.html',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
@ -586,6 +586,132 @@ class Controller extends BaseController
]);
}
#[Route(path: '/login', name: 'login', methods: ['POST'])]
public function login(string $username,string $mdp, IRequest $req): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/home.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
#[Route(path: '/log', name: 'log', methods: ['GET'])]
public function login2(): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/login.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
#[Route(path: '/register', name: 'register', methods: ['POST'])]
public function register(string $username,string $mdp,string $confirmMdp,string $nom,string $prenom,string $dateNaissance,string $sexe,string $taille,string $poids, IRequest $req): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/home.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
#[Route(path: '/regist', name: 'regist', methods: ['GET'])]
public function register2(): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/register.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
#[Route(path: '/pass', name: 'pass', methods: ['GET'])]
public function pass(): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/password.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
#[Route(path: '/password', name: 'password', methods: ['POST'])]
public function password(string $email, IRequest $req): Response
{
// CONFIRMER LES DONNESS !!!!! IMPORTANT
return $this->render('./page/login.html.twig',[
'css' => $this->preference->getCookie(),
'pp' => "test2",
'user' => "Doe",
'role' => "Athlète",
'friendship' => [],
'analyzes' => [],
'mails' => [],
'users' => [],
'infoUser' => [],
'exos' => [],
'member' => []
]);
}
}

@ -0,0 +1 @@
<a href="/log">Se connecter</button>

@ -11,27 +11,27 @@
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header"><h3 class="text-center font-weight-light my-4">Connexion</h3></div>
<div class="card-body">
<form>
<form method="post" action="/login">
<div class="form-floating mb-3">
<input class="form-control" id="inputEmail" type="email" placeholder="nom@exemple.com" />
<label for="inputEmail">Adresse eMail</label>
<input class="form-control" id="username" name="username" type="text" placeholder="Nom d'utilisateur" />
<label for="username">Nom d'utilisateur</label>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputPassword" type="password" placeholder="Mot de passe" />
<label for="inputPassword">Mot de passe</label>
<input class="form-control" id="mdp" name="mdp" type="password" placeholder="Mot de passe" />
<label for="mdp">Mot de passe</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input" id="inputRememberPassword" type="checkbox" value="" />
<label class="form-check-label" for="inputRememberPassword">Mémoriser le mot de passe</label>
</div>
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<a class="small" href="password.html">Mot de passe oublié ?</a>
<a class="btn btn-primary" href="index.html">Se connecter</a>
<a class="small" href="/pass">Mot de passe oublié ?</a>
<button class="btn btn-primary" type="submit">Se connecter</a>
</div>
</form>
</div>
<div class="card-footer text-center py-3">
<div class="small"><a href="register.html">Besoin d'un compte ? Inscrivez-vous !</a></div>
<div class="small"><a href="/regist">Besoin d'un compte ? Inscrivez-vous !</a></div>
</div>
</div>
</div>

@ -12,19 +12,19 @@
<div class="card-header"><h3 class="text-center font-weight-light my-4">Récupération du mot de passe</h3></div>
<div class="card-body">
<div class="small mb-3 text-muted">Entrez votre adresse eMail pour recevoir un lien pour changer de mot de passe</div>
<form>
<form method="post" action="/password">
<div class="form-floating mb-3">
<input class="form-control" id="inputEmail" type="email" placeholder="name@example.com" />
<label for="inputEmail">Adresse eMail</label>
<input class="form-control" id="email" name="email" type="email" placeholder="name@example.com" />
<label for="email">Adresse eMail</label>
</div>
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<a class="small" href="login.html">Retour à la connexion</a>
<a class="btn btn-primary" href="login.html">Réinitialiser votre mot de passe</a>
<a class="small" href="/log">Retour à la connexion</a>
<button class="btn btn-primary" type="submit">Réinitialiser votre mot de passe</a>
</div>
</form>
</div>
<div class="card-footer text-center py-3">
<div class="small"><a href="register.html">Besoin d'un compte ? Inscrivez-vous !</a></div>
<div class="small"><a href="/regist">Besoin d'un compte ? Inscrivez-vous !</a></div>
</div>
</div>
</div>

@ -11,32 +11,32 @@
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header"><h3 class="text-center font-weight-light my-4">Créer un compte</h3></div>
<div class="card-body">
<form method="post" action="">
<form method="post" action="/register">
<div class="row mb-3">
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputFirstName" type="text" placeholder="Entrez votre nom" />
<label for="inputFirstName">Nom de famille</label>
<input class="form-control" id="nom" name="nom" type="text" placeholder="Entrez votre nom" />
<label for="nom">Nom de famille</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating">
<input class="form-control" id="inputLastName" type="text" placeholder="Entrez votre prénom" />
<label for="inputLastName">Prénom</label>
<input class="form-control" id="prenom" name="prenom" type="text" placeholder="Entrez votre prénom" />
<label for="prenom">Prénom</label>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputUsername" type="text" placeholder="Entrez votre pseudonyme" />
<label for="inputFirstName">Nom d'utilisateur</label>
<input class="form-control" id="username" name="username" type="text" placeholder="Entrez votre pseudonyme" />
<label for="username">Nom d'utilisateur</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating">
<input class="form-control" id="inputGender" type="hidden">
<select id="gender" name="gender">
<input class="form-control" id="sexe" name="sexe" type="hidden">
<select id="sexe" name="sexe">
<option value="male">Homme</option>
<option value="female">Femme</option>
<option value="unknown">Ne se prononce pas</option>
@ -46,48 +46,50 @@
</div>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputEmail" type="email" placeholder="nom@exemple.com" />
<label for="inputEmail">Adresse eMail</label>
<input class="form-control" id="mail" type="mail" placeholder="nom@exemple.com" />
<label for="mail">Adresse eMail</label>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputDateNaissance" type="date" placeholder="" />
<label for="inputEmail">Date de naissance</label>
<input class="form-control" id="dateNaissance" name="dateNaissance" type="date" placeholder="" />
<label for="dateNaissance">Date de naissance</label>
</div>
<div class="row mb-3">
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputTaille" type="text" placeholder="Entrez votre taille" />
<label for="inputPassword">Taille</label>
<input class="form-control" id="taille" name="taille" type="text" placeholder="Entrez votre taille" />
<label for="taille">Taille</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputPoids" type="text" placeholder="Entrez votre poids" />
<label for="inputPasswordConfirm">Poids</label>
<input class="form-control" id="poids" name="poids" type="text" placeholder="Entrez votre poids" />
<label for="poids">Poids</label>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputPassword" type="password" placeholder="Créez un mot de passe" />
<label for="inputPassword">Mot de passe</label>
<input class="form-control" id="mdp" name="mdp" type="password" placeholder="Créez un mot de passe" />
<label for="mdp">Mot de passe</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3 mb-md-0">
<input class="form-control" id="inputPasswordConfirm" type="password" placeholder="Confirmez votre mot de passe" />
<label for="inputPasswordConfirm">Confirmer le mot de passe</label>
<input class="form-control" id="confirmMdp" name="confirmMdp" type="password" placeholder="Confirmez votre mot de passe" />
<label for="confirmMdp">Confirmer le mot de passe</label>
</div>
</div>
</div>
<div class="mt-4 mb-0">
<div class="d-grid"><a class="btn btn-primary btn-block" href="login.html.twig">Créer un compte</a></div>
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-block">Créer un compte</a>
</div>
</div>
</form>
</div>
<div class="card-footer text-center py-3">
<div class="small"><a href="login.html.twig">Avez-vous déjà un compte ? Connectez-vous ?</a></div>
<div class="small"><a href="/log">Avez-vous déjà un compte ? Connectez-vous ?</a></div>
</div>
</div>
</div>

Loading…
Cancel
Save