(Feat): Initial Commit
This commit is contained in:
30
web/templates/views/account_confirmation.html.tmpl
Normal file
30
web/templates/views/account_confirmation.html.tmpl
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Account confirmation</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="status">Processing request...</div>
|
||||
|
||||
<script>
|
||||
function processConfirmation() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', {{ .confirmationRequestURL }}, true);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
document.getElementById('status').textContent = 'Successfully confirmed account.';
|
||||
} else {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
}
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
};
|
||||
xhr.send(JSON.stringify({}));
|
||||
}
|
||||
|
||||
window.onload = processConfirmation;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user