From d4e43a995de4eb7b85fe8215b6f41c3587bdaeea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 2 Jan 2023 10:40:18 +0100 Subject: [PATCH] Show CLA error (#25496) --- source/developers/cla_sign.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/developers/cla_sign.html b/source/developers/cla_sign.html index 6c7571430b9..4a43f097155 100644 --- a/source/developers/cla_sign.html +++ b/source/developers/cla_sign.html @@ -29,12 +29,20 @@ description: "The Home Assistant contributor license agreement (CLA) signature p #complete { display: none; } + + #error { + background: red; + color: white; + padding: 4px; + display: none; + }

Please wait while we complete authentication and load data from GitHub...

+
@@ -454,6 +462,7 @@ description: "The Home Assistant contributor license agreement (CLA) signature p } }); $('#submit').click(function(e){ + const errorEl = document.querySelector("#error") if ($('form')[0].checkValidity()) { e.preventDefault(); var payload = { @@ -489,6 +498,10 @@ description: "The Home Assistant contributor license agreement (CLA) signature p } localStorage.removeItem("pr"); localStorage.removeItem("gh_token"); + errorEl.style.display = "none" + }).fail(function(data){ + errorEl.textContent = data.responseJSON.message; + errorEl.style.display = "block" }); } });