From 29db9228a8df677b7d13eddfb11107b4a8555fe8 Mon Sep 17 00:00:00 2001 From: vbochet <vbochet@gmail.com> Date: Wed, 27 Apr 2016 21:58:59 +0200 Subject: [PATCH] Modification du css et de la vue du formulaire d'inscription pour prendre en compte le design --- app/view/Includes/css/style.css | 30 ++++++++++++---- app/view/Register/displayForm.html | 57 ++++++++++++++++-------------- 2 files changed, 54 insertions(+), 33 deletions(-) diff --git a/app/view/Includes/css/style.css b/app/view/Includes/css/style.css index 86835cb..8ea2359 100644 --- a/app/view/Includes/css/style.css +++ b/app/view/Includes/css/style.css @@ -208,14 +208,10 @@ header a:hover, footer a:hover{ } -label { - display: block; - min-width: 140px; - float: left; -} div.submit { text-align:center; + margin-top:10px; } div.submit input[type=submit], div.submit input[type=reset] { @@ -229,7 +225,29 @@ div.submit input[type=submit], div.submit input[type=reset] { width: 300px; } -.connexion-form input{ +.inscription-form{ + margin: auto; + display: block; + width: 400px; +} + +.connexion-form label { + display: block; + min-width: 140px; + float: left; +} + +.inscription-form label { + display: block; + min-width: 210px; + float: left; +} + +.inscription-form textarea { + width: 170px; +} + +.connexion-form input, .inscription-form input{ margin-bottom:12px; } diff --git a/app/view/Register/displayForm.html b/app/view/Register/displayForm.html index 694629d..26a22e9 100644 --- a/app/view/Register/displayForm.html +++ b/app/view/Register/displayForm.html @@ -1,32 +1,35 @@ <?php session_start(); ?> -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"/> - <title>Formulaire d'inscription</title> -</head> -<body> - <header> - <h1>Inscription au site</h1> - </header> +<?php $page_title = "Formulaire d'inscription"; + $RACINE = ".."; ?> +<?php include(ROOT."/app/view/Includes/header.include.html"); ?> + + <?php if(isset($_SESSION['registerErrCode'])) { // si message d'erreur $errCode = $_SESSION['registerErrCode']; - $errMsg = ($errCode == 2) ? '<h3 style="color:red;">Pseudo déjà utilisé !</h3>' : '<h3 style="color:red;">Adresse e-mail déjà utilisée !</h3>'; // on détermine le message à afficher - echo $errMsg; // on affiche le message + $errMsg = ($errCode == 2) ? '<h3>Pseudo déjà utilisé !</h3>' : '<h3>Adresse e-mail déjà utilisée !</h3>'; // on détermine le message à afficher + echo '<article class="msg-erreur">'.$errMsg.'</article>'; // on affiche le message unset($_SESSION['registerErrCode']); // on retire la variable de session } ?> - <form method="post" action="inscription/verify"> - <label for="pseudo">Pseudo* : </label> <input type="text" required="" name="pseudo" id="pseudo" /><br/> - <label for="password">Mot de passe* : </label> <input type="password" required="" name="password" id="password" /><br/> - <label for="password_bis">Vérification mdp* : </label> <input type="password" required="" name="password_bis" id="password_bis" /><br/> - <label for="nom">Nom* : </label> <input type="text" required="" name="nom" id="nom" /><br/> - <label for="prenom">Prénom* : </label> <input type="text" required="" name="prenom" id="prenom" /><br/> - <label for="email">Adresse e-mail* : </label> <input type="email" required="" name="email" id="email" /><br/> - <label for="description">Une description de vous : </label><textarea name="description" id="description"></textarea><br/> - <input type="submit" value="Inscription" /> - </form> - <footer> - <p>Le pied de page</p> - </footer> -</body> -</html> + + + <article> + <h2>Formulaire d'inscription</h2> + <div class="inscription-form"> + <form method="post" action="inscription/verify"> + <label for="pseudo">Pseudo* : </label> <input type="text" required="" name="pseudo" id="pseudo" /><br/> + <label for="password">Mot de passe* : </label> <input type="password" required="" name="password" id="password" /><br/> + <label for="password_bis">Vérification mdp* : </label> <input type="password" required="" name="password_bis" id="password_bis" /><br/> + <label for="nom">Nom* : </label> <input type="text" required="" name="nom" id="nom" /><br/> + <label for="prenom">Prénom* : </label> <input type="text" required="" name="prenom" id="prenom" /><br/> + <label for="email">Adresse e-mail* : </label> <input type="email" required="" name="email" id="email" /><br/> + <label for="description">Une description de vous : </label><textarea name="description" id="description"></textarea><br/> + <div class="submit"> + <input type="reset" name="reset" value="Réinitialiser"> + <input type="submit" name="submit" value="S'inscrire"> + </div> + </form> + </div> + </article> + + +<?php include(ROOT."/app/view/Includes/footer.include.html"); ?> -- GitLab