Split join and include as inline
This commit is contained in:
parent
8d7fe91920
commit
fda22f8b1f
23 changed files with 2132 additions and 1388 deletions
|
@ -7,7 +7,7 @@
|
|||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
|
||||
|
||||
<title>Se joindre - ilot.io</title>
|
||||
<title>Join - ilot.io</title>
|
||||
|
||||
<!-- cargo-culted from https://realfavicongenerator.net/ -->
|
||||
<!-- for the record: it is absolutely ridiculous that new browsers
|
||||
|
@ -85,9 +85,85 @@
|
|||
|
||||
<main class="flex-shrink-0">
|
||||
<div class="container" id="content">
|
||||
|
||||
|
||||
<script>
|
||||
async function checkDuplicate() {
|
||||
var url='https://forge.ilot.io/api/v1/repos/ilot/registration/issues';
|
||||
var email = document.getElementById("email").value;
|
||||
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
'authorization': 'token b8d8617bb6049c0e47b7bba5cd0931799f54609c',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
const result = await response.json();
|
||||
let index = result
|
||||
.findIndex(item => item.title === email);
|
||||
|
||||
if (index !== -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function createIssue() {
|
||||
var url = 'https://forge.ilot.io/api/v1/repos/ilot/registration/issues';
|
||||
var mathspamtrap = document.getElementById("math-spam-trap").value;
|
||||
var agreetoterms = document.getElementById("agree-to-terms").checked;
|
||||
var email = document.getElementById("email").value;
|
||||
|
||||
if(!agreetoterms) {
|
||||
alert("Registration requires agreement of Code of Conduct");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!email) {
|
||||
alert("Email cannot be empty");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(mathspamtrap != "9") {
|
||||
alert("Wrong math answer");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(await checkDuplicate(email) === true) {
|
||||
alert("This email address has already requested an account");
|
||||
return false;
|
||||
}
|
||||
|
||||
var name = document.getElementById("name").value;
|
||||
var name = name.replace (/^/,'Name: ');
|
||||
var aboutme = document.getElementById("about-me").value;
|
||||
var aboutme = aboutme.replace (/^/,'About me: ');
|
||||
var howfound = document.getElementById("how-found").value;
|
||||
var howfound = howfound.replace (/^/,'How I found ilot: ');
|
||||
var ocuser = document.getElementById("oc-user").value;
|
||||
var ocuser = ocuser.replace (/^/,'OpenCollective Profile: ');
|
||||
var description = name + "\n\n" + aboutme + "\n\n" + howfound + "\n\n" + ocuser;
|
||||
console.log('Description:', description);
|
||||
|
||||
fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'authorization': 'token b8d8617bb6049c0e47b7bba5cd0931799f54609c',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ title: email, body: description }),
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
console.log('Success:', result);
|
||||
alert("Request submitted. A working group member will process your registration shortly. If you receive no contact within seven days of registration, please send an email to support@ilot.io");
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error)
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../js/join.js"></script>
|
||||
|
||||
<header class="text-center">
|
||||
<h1 class="post-title">Formulaire d'inscription</h1>
|
||||
|
@ -195,72 +271,71 @@ onClick = "createIssue()"> </form>
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<h5>Soutient</h5>
|
||||
<h5>Support</h5>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://support.ilot.io/fr/hc/706927618">FAQ</a></li>
|
||||
<li><a href="https://forge.ilot.io/ilot/-/projects/3">Problèmes connus</a></li>
|
||||
<li><a href="https://support.ilot.io/help/706927618">Soutient technique</a></li>
|
||||
<li><a href="https://support.ilot.io/en/hc/706927618">FAQs</a></li>
|
||||
<li><a href="https://forge.ilot.io/ilot/-/projects/3">Known issues</a></li>
|
||||
<li><a href="https://support.ilot.io/help/706927618">Support ticket</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<h5>Contribuer</h5>
|
||||
<h5>Contribute</h5>
|
||||
|
||||
<ul>
|
||||
<li><span class="selflink">Devenir membre</span>
|
||||
<li><a href="https://opencollective.com/ilot">Faire un don</a></li>
|
||||
<li><a href="https://forge.ilot.io/ilot/-/projects">Forge Git</a></li>
|
||||
<li><span class="selflink">Become a member</span>
|
||||
<li><a href="https://opencollective.com/ilot">Donate</a></li>
|
||||
<li><a href="https://forge.ilot.io/ilot/-/projects">Git Forge</a></li>
|
||||
<li><a href="https://wiki.ilot.io">Wiki</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<h5>À propos de nous</h5>
|
||||
<h5>About us</h5>
|
||||
|
||||
<ul>
|
||||
<li><a href="../meta/code-of-conduct/">Code de conduite</a></li>
|
||||
<li><a href="../meta/code-of-conduct/">Code of conduct</a></li>
|
||||
<li><a href="../meta/license/">Licenses</a></li>
|
||||
<li><a href="https://status.ilot.io/status/ilot">État du réseau</a></li>
|
||||
<li><a href="https://status.ilot.io/status/ilot">Network Status</a></li>
|
||||
</div>
|
||||
<div class="col-sm-3 listmonk-form">
|
||||
<h5>Nouvelles</h5>
|
||||
<h5>News</h5>
|
||||
|
||||
<p>S'abonner à notre <a href="https://notif.ilot.io/archive">liste de diffusion</a></p>
|
||||
<p>Subscribe to our <a href="https://notif.ilot.io/archive">newsletter</a></p>
|
||||
|
||||
<form method="post" action="https://notif.ilot.io/subscription/form" class="listmonk-form">
|
||||
|
||||
|
||||
<!-- Converts enter key to tab -->
|
||||
<script>
|
||||
document.addEventListener('keydown', function (event) { if (event.keyCode
|
||||
=== 13 && event.target.nodeName === 'INPUT') { var form = event.target.form;
|
||||
var index = Array.prototype.indexOf.call(form, event.target);
|
||||
form.elements[index + 1].focus(); event.preventDefault(); } });
|
||||
<script>
|
||||
document.addEventListener('keydown', function (event) {
|
||||
if (event.keyCode === 13 && event.target.nodeName === 'INPUT') {
|
||||
var form = event.target.form;
|
||||
var index = Array.prototype.indexOf.call(form, event.target);
|
||||
form.elements[index + 1].focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<input type="hidden" name="nonce" /> <input id="39425" type="hidden"
|
||||
name="l" value="39425113-44b5-46f7-9897-91151467b05f" />
|
||||
<input type="hidden" name="nonce" />
|
||||
<input id="39425" type="hidden" name="l" value="39425113-44b5-46f7-9897-91151467b05f" />
|
||||
<div class="t">
|
||||
<input aria-label="Email" class="btn" type="email" name="email" required
|
||||
placeholder="Courriel" />
|
||||
<input aria-label="Email" class="btn" type="email" name="email" required placeholder="E-mail" />
|
||||
</div>
|
||||
<button aria-label="Subscribe" class="btn" type="button"
|
||||
data-bs-toggle="modal" data-bs-target="#hcaptchamodal">S'abonner</button>
|
||||
<button aria-label="Subscribe" class="btn" type="button" data-bs-toggle="modal" data-bs-target="#hcaptchamodal">Subscribe</button>
|
||||
<div class="modal fade" id="hcaptchamodal" tabindex="-1" aria-labelledby="haptcha" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="hcapatchamodallabel">Êtes-vous un robot?</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Fermer"></button>
|
||||
<h5 class="modal-title" id="hcapatchamodallabel">Are you a robot?</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="h-captcha" data-sitekey="be08a59e-ae24-472e-8a80-22d07016ee90" data-callback="submitSubscribe"></div>
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary"
|
||||
data-bs-dismiss="modal">Fermer</button> <button aria-label="Subscribe"
|
||||
class="btn" type="submit">S'abonner</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button aria-label="Subscribe" class="btn" type="submit">Subscribe</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -284,7 +359,7 @@ class="btn" type="submit">S'abonner</button>
|
|||
<!-- TODO: Find other ways to setup analytics
|
||||
<script data-goatcounter="https://analytics.anarc.at/count" async src="//analytics.anarc.at/count.js"></script>
|
||||
<noscript>
|
||||
<img src="https://analytics.anarc.at/count?p=join.fr&t=Se%20joindre" alt="tracking pixel to count visitors when Javascript is disabled" />
|
||||
<img src="https://analytics.anarc.at/count?p=join.fr&t=Join" alt="tracking pixel to count visitors when Javascript is disabled" />
|
||||
</noscript>
|
||||
-->
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue