| 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="js/lib/manejaErrores.js"></script> |
| 12 | |
| 13 | </head> |
| 14 | |
| 15 | <body> |
| 16 | |
| 17 | <progress id="ocupado" max="100">Cargando…</progress> |
| 18 | |
| 19 | <form id="formulario" hidden> |
| 20 | |
| 21 | <h1>Iniciar Sesión</h1> |
| 22 | |
| 23 | <p><a href="perfil.html">Cancelar</a></p> |
| 24 | |
| 25 | <p> |
| 26 | <label> |
| 27 | San |
| 28 | <input name="san"> |
| 29 | </label> |
| 30 | </p> |
| 31 | |
| 32 | <p> |
| 33 | <label> |
| 34 | Sen |
| 35 | <input type="password" name="sen"> |
| 36 | </label> |
| 37 | </p> |
| 38 | |
| 39 | <p><button type="submit">Iniciar sesión</button></p> |
| 40 | |
| 41 | </form> |
| 42 | |
| 43 | <script type="module"> |
| 44 | |
| 45 | import { descargaVista } from "./js/lib/descargaVista.js" |
| 46 | import { submitAccion } from "./js/lib/submitAccion.js" |
| 47 | |
| 48 | descargaDatos() |
| 49 | |
| 50 | async function descargaDatos() { |
| 51 | |
| 52 | await descargaVista("php/vista-login.php") |
| 53 | |
| 54 | formulario.addEventListener( |
| 55 | "submit", |
| 56 | event => submitAccion(event, "php/login.php", formulario, "perfil.html") |
| 57 | ) |
| 58 | |
| 59 | } |
| 60 | |
| 61 | </script> |
| 62 | |
| 63 | </body> |
| 64 | |
| 65 | </html> |