1 | <!DOCTYPE html> |
2 | <html lang="es"> |
3 | |
4 | <head> |
5 | |
6 | <meta charset="UTF-8"> |
7 | <meta name="viewport" content="width=device-width"> |
8 | |
9 | <title>Iniciar sesión</title> |
10 | |
11 | <script type="module" src="lib/js/submitForm.js"></script> |
12 | <script type="module" src="lib/js/muestraError.js"></script> |
13 | <script type="module" src="./js/protege.js"></script> |
14 | |
15 | </head> |
16 | |
17 | <body onload="protege('srv/sesion-actual.php') |
18 | .then(sesion => { |
19 | if (sesion.cue !== '') { |
20 | location.href = 'perfil.html' |
21 | } |
22 | }) |
23 | .catch(muestraError)"> |
24 | |
25 | <form id="login" onsubmit="submitForm('srv/login.php', event) |
26 | .then(sesion => location.href = 'perfil.html') |
27 | .catch(muestraError)"> |
28 | |
29 | <h1>Iniciar Sesión</h1> |
30 | |
31 | <p><a href="perfil.html">Cancelar</a></p> |
32 | |
33 | <p> |
34 | <label> |
35 | Cue |
36 | <input name="cue"> |
37 | </label> |
38 | </p> |
39 | |
40 | <p> |
41 | <label> |
42 | Match |
43 | <input type="password" name="match"> |
44 | </label> |
45 | </p> |
46 | |
47 | <p><button type="submit">Iniciar sesión</button></p> |
48 | |
49 | </form> |
50 | |
51 | </body> |
52 | |
53 | </html> |