mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +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 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#error {
|
||||
background: red;
|
||||
color: white;
|
||||
padding: 4px;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="loading">
|
||||
<div id="spinner"></div>
|
||||
<p>Please wait while we complete authentication and load data from GitHub...</p>
|
||||
</div>
|
||||
<div id="error"></div>
|
||||
|
||||
<form action="#" id="signature_form">
|
||||
<div class="wrapper">
|
||||
@ -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"
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user