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 Login = () => {
|
||||||
|
|
||||||
const [username, setUsername] = useState("");
|
const [adresse, setAdresse] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [returnmess, returnMessage] = useState("");
|
const [returnmess, returnMessage] = useState("");
|
||||||
|
|
||||||
@ -49,11 +49,11 @@ const Login = () => {
|
|||||||
<h5>{returnmess}</h5>
|
<h5>{returnmess}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>Nom Utilisateur: </label>
|
<label>Adresse courriel </label>
|
||||||
<input className="form-control form-input" type='text'
|
<input className="form-control form-input" type='text'
|
||||||
placeholder="Nom de l'utilisateur..."
|
placeholder="Adresse..."
|
||||||
value={username}
|
value={adresse}
|
||||||
onChange={(e) => setUsername(e.target.value)} />
|
onChange={(e) => setAdresse(e.target.value)} />
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>Mot de passe: </label>
|
<label>Mot de passe: </label>
|
||||||
|
@ -3,8 +3,8 @@ import { Button } from "react-bootstrap";
|
|||||||
|
|
||||||
const Register = () => {
|
const Register = () => {
|
||||||
|
|
||||||
const [username, setUsername] = useState("");
|
//const [username, setUsername] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
//const [password, setPassword] = useState("");
|
||||||
|
|
||||||
const handleLogin = async (e) => {
|
const handleLogin = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -15,7 +15,7 @@ const Register = () => {
|
|||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': '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).
|
// 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}>
|
<form className="form-horizontal" onSubmit={handleLogin}>
|
||||||
<h4 className="text-center">Nouvel utilisateur</h4>
|
<h4 className="text-center">Nouvel utilisateur</h4>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>Nom Utilisateur: </label>
|
<label>Prénom: </label>
|
||||||
<input className="form-control form-input" type='text'
|
<input type='text' className="form-control form-input"
|
||||||
placeholder="Votre nom..."
|
placeholder="Votre prénom..."/>
|
||||||
value={username}
|
</div>
|
||||||
onChange={(e) => setUsername(e.target.value)} />
|
<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>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>Mot de passe: </label>
|
<label>Mot de passe: </label>
|
||||||
<input type='password' className="form-control form-input"
|
<input type='password' className="form-control form-input"
|
||||||
placeholder="Mot de passe..."
|
placeholder="Mot de passe..."/>
|
||||||
value={password}
|
|
||||||
onChange={(e) => setPassword(e.target.value)} />
|
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>Pour un acount admin, entrer le mot de passe. Sinon laisser vide: </label>
|
<label>Pour un acount admin, entrer le mot de passe. Sinon laisser vide: </label>
|
||||||
|
Loading…
Reference in New Issue
Block a user