diff mod_http_oauth2/html/device.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 f889ff779571
line wrap: on
line diff
--- a/mod_http_oauth2/html/device.html	Mon Jul 31 02:05:49 2023 +0200
+++ b/mod_http_oauth2/html/device.html	Mon Jul 31 02:07:24 2023 +0200
@@ -7,15 +7,17 @@
 <link rel="stylesheet" href="style.css" />
 </head>
 <body>
+{error&
+	<dialog open="" class="error">
+		<p>{error.text}</p>
+		<form method="dialog"><button>dismiss</button></form>
+	</dialog>}
 	<header>
 	<h1>{site_name}</h1>
 	</header>
 	<main>
 	<fieldset>
 	<legend>Device Authorization</legend>
-	{error&<div class="error">
-		<p>{error.text}</p>
-	</div>}
 {client&
 	<p>Authorization completed. You can go back to
 	<em>{client.client_name}</em>.</p>}