mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-20 07:46:52 +00:00
Show CLA error (#25496)
This commit is contained in:
parent
aee819b682
commit
d4e43a995d
@ -29,12 +29,20 @@ description: "The Home Assistant contributor license agreement (CLA) signature p
|
|||||||
#complete {
|
#complete {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#error {
|
||||||
|
background: red;
|
||||||
|
color: white;
|
||||||
|
padding: 4px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="loading">
|
<div id="loading">
|
||||||
<div id="spinner"></div>
|
<div id="spinner"></div>
|
||||||
<p>Please wait while we complete authentication and load data from GitHub...</p>
|
<p>Please wait while we complete authentication and load data from GitHub...</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="error"></div>
|
||||||
|
|
||||||
<form action="#" id="signature_form">
|
<form action="#" id="signature_form">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@ -454,6 +462,7 @@ description: "The Home Assistant contributor license agreement (CLA) signature p
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#submit').click(function(e){
|
$('#submit').click(function(e){
|
||||||
|
const errorEl = document.querySelector("#error")
|
||||||
if ($('form')[0].checkValidity()) {
|
if ($('form')[0].checkValidity()) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var payload = {
|
var payload = {
|
||||||
@ -489,6 +498,10 @@ description: "The Home Assistant contributor license agreement (CLA) signature p
|
|||||||
}
|
}
|
||||||
localStorage.removeItem("pr");
|
localStorage.removeItem("pr");
|
||||||
localStorage.removeItem("gh_token");
|
localStorage.removeItem("gh_token");
|
||||||
|
errorEl.style.display = "none"
|
||||||
|
}).fail(function(data){
|
||||||
|
errorEl.textContent = data.responseJSON.message;
|
||||||
|
errorEl.style.display = "block"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user