Mercurial > prosody-modules
diff mod_http_oauth2/html/login.html @ 5625:e86a1018cdb3
mod_http_oauth2: Present errors in HTML <dialog>
Nice semantic things that don't require JavaScript
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 31 Jul 2023 02:07:24 +0200 |
parents | 6109496a7ccc |
children | 2a31ee81e816 |
line wrap: on
line diff
--- a/mod_http_oauth2/html/login.html Mon Jul 31 02:05:49 2023 +0200 +++ b/mod_http_oauth2/html/login.html Mon Jul 31 02:07:24 2023 +0200 @@ -7,6 +7,11 @@ <link rel="stylesheet" href="style.css" /> </head> <body> +{state.error& + <dialog open="" class="error"> + <p>{state.error}</p> + <form method="dialog"><button>dismiss</button></form> + </dialog>} <header> <h1>{site_name}</h1> </header> @@ -14,9 +19,6 @@ <fieldset> <legend>Sign in</legend> <p>Sign in to your account to continue.</p> - {state.error&<div class="error"> - <p>{state.error}</p> - </div>} <form method="post"> <input type="text" name="username" placeholder="Username" aria-label="Username" required {extra.username_hint~autofocus}{extra.username_hint& value="{extra.username_hint?}"} /><br/> <input type="password" name="password" placeholder="Password" aria-label="Password" autocomplete="current-password" required {extra.username_hint&autofocus} /><br />