Merge branch 'react-version' of https://github.com/MarcEricMartel/420-5DW-HY-TP into react-version
This commit is contained in:
commit
5112762ac9
@ -3,7 +3,7 @@ import { Button } from "react-bootstrap";
|
||||
|
||||
const Login = () => {
|
||||
|
||||
const [username, setUsername] = useState("");
|
||||
const [adresse, setAdresse] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [returnmess, returnMessage] = useState("");
|
||||
|
||||
@ -49,11 +49,11 @@ const Login = () => {
|
||||
<h5>{returnmess}</h5>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Nom Utilisateur: </label>
|
||||
<label>Adresse courriel </label>
|
||||
<input className="form-control form-input" type='text'
|
||||
placeholder="Nom de l'utilisateur..."
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)} />
|
||||
placeholder="Adresse..."
|
||||
value={adresse}
|
||||
onChange={(e) => setAdresse(e.target.value)} />
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Mot de passe: </label>
|
||||
|
@ -3,8 +3,8 @@ import { Button } from "react-bootstrap";
|
||||
|
||||
const Register = () => {
|
||||
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
//const [username, setUsername] = useState("");
|
||||
//const [password, setPassword] = useState("");
|
||||
|
||||
const handleLogin = async (e) => {
|
||||
e.preventDefault();
|
||||
@ -15,7 +15,7 @@ const Register = () => {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ username, password })
|
||||
//body: JSON.stringify({ username, password })
|
||||
})
|
||||
|
||||
// Partie de display d'erreur ou de redirection (faudrait checker pour se faire un state de connexion).
|
||||
@ -27,18 +27,34 @@ const Register = () => {
|
||||
<form className="form-horizontal" onSubmit={handleLogin}>
|
||||
<h4 className="text-center">Nouvel utilisateur</h4>
|
||||
<div className="form-group">
|
||||
<label>Nom Utilisateur: </label>
|
||||
<input className="form-control form-input" type='text'
|
||||
placeholder="Votre nom..."
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)} />
|
||||
<label>Prénom: </label>
|
||||
<input type='text' className="form-control form-input"
|
||||
placeholder="Votre prénom..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Nom: </label>
|
||||
<input type='text' className="form-control form-input"
|
||||
placeholder="Votre Nom..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Numéro de téléphone: </label>
|
||||
<input type='text' className="form-control form-input"
|
||||
placeholder="Votre numéro de téléphone..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Adresse civique: </label>
|
||||
<input type='text' className="form-control form-input"
|
||||
placeholder="Votre adresse..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Adresse courriel: </label>
|
||||
<input type='text' className="form-control form-input"
|
||||
placeholder="Votre adresse courrirel..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Mot de passe: </label>
|
||||
<input type='password' className="form-control form-input"
|
||||
placeholder="Mot de passe..."
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)} />
|
||||
placeholder="Mot de passe..."/>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label>Pour un acount admin, entrer le mot de passe. Sinon laisser vide: </label>
|
||||
|
Loading…
Reference in New Issue
Block a user