footer: add hcapatcha check for subsribe #20

Merged
ayakael merged 2 commits from footer/subscribe-hcaptcha into main 2025-03-13 21:40:45 +00:00
4 changed files with 103 additions and 16 deletions

Binary file not shown.

View file

@ -7,15 +7,15 @@
msgid ""
msgstr ""
"Project-Id-Version: ilot.io\n"
"POT-Creation-Date: 2024-10-09 18:45-0400\n"
"PO-Revision-Date: 2024-10-09 18:46-0400\n"
"POT-Creation-Date: 2025-03-13 17:34-0400\n"
"PO-Revision-Date: 2025-03-13 17:36-0400\n"
"Last-Translator: \n"
"Language-Team: dev@ayakael.net\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.3\n"
"X-Generator: Poedit 3.5\n"
#. type: Content of: <p><div><div><div><h5>
msgid "Support"
@ -77,6 +77,14 @@ msgstr "Nouvelles"
msgid "Subscribe to our [[newsletter|https://notif.ilot.io/archive]]"
msgstr "S'abonner à notre [[liste de diffusion|https://notif.ilot.io/archive]]"
#. type: Content of: <p><div><div><div><form><script>
msgid ""
"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(); } });"
msgstr ""
#. type: Content of: <p><div><div><div><form>
msgid ""
"<input type=\"hidden\" name=\"nonce\" /> <input id=\"9c490\" type=\"hidden\" "
@ -93,11 +101,33 @@ msgstr ""
#. type: Content of: <p><div><div><div><form>
msgid ""
"<button aria-label=\"Subscribe\" class=\"btn\" type=\"submit\">Subscribe</"
"button>"
"<button aria-label=\"Subscribe\" class=\"btn\" type=\"button\" data-bs-"
"toggle=\"modal\" data-bs-target=\"#hcaptchamodal\">Subscribe</button>"
msgstr ""
"<button aria-label=\"Subscribe\" class=\"btn\" type=\"submit\">S'abonner</"
"button>"
"<button aria-label=\"Subscribe\" class=\"btn\" type=\"button\" data-bs-"
"toggle=\"modal\" data-bs-target=\"#hcaptchamodal\">S'abonner</button>"
#. type: Content of: <p><div><div><div><form><div><div><div><div><h5>
msgid "Are you a robot?"
msgstr "Êtes-vous un robot?"
#. type: Content of: <p><div><div><div><form><div><div><div><div>
msgid ""
"<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-"
"label=\"Close\"></button>"
msgstr ""
"<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-"
"label=\"Fermer\"></button>"
#. type: Content of: <p><div><div><div><form><div><div><div><div>
msgid ""
"<button type=\"button\" class=\"btn btn-secondary\" data-bs-"
"dismiss=\"modal\">Close</button> <button aria-label=\"Subscribe\" "
"class=\"btn\" type=\"submit\">Subscribe</button>"
msgstr ""
"<button type=\"button\" class=\"btn btn-secondary\" data-bs-"
"dismiss=\"modal\">Fermer</button> <button aria-label=\"Subscribe\" "
"class=\"btn\" type=\"submit\">S'abonner</button>"
#, fuzzy
#~| msgid "[[Wiki|https://wiki.ilot.io]]"

View file

@ -35,13 +35,44 @@
<form method="post" action="https://notif.ilot.io/subscription/form" class="listmonk-form">
<input type="hidden" name="nonce" />
<input id="9c490" type="hidden" name="l" value="9c490957-b50b-4162-898d-92259e350cd6" />
<div class="t">
<input aria-label="Email" class="btn" type="email" name="email" required placeholder="E-mail" />
</div>
<button aria-label="Subscribe" class="btn" type="submit">Subscribe</button>
<!-- 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>
<input type="hidden" name="nonce" />
<input id="9c490" type="hidden" name="l" value="9c490957-b50b-4162-898d-92259e350cd6" />
<div class="t">
<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">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">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">Close</button>
<button aria-label="Subscribe" class="btn" type="submit">Subscribe</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>

View file

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-10-09 18:45-0400\n"
"POT-Creation-Date: 2025-03-13 17:34-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -76,6 +76,14 @@ msgstr ""
msgid "Subscribe to our [[newsletter|https://notif.ilot.io/archive]]"
msgstr ""
#. type: Content of: <p><div><div><div><form><script>
msgid ""
"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(); } });"
msgstr ""
#. type: Content of: <p><div><div><div><form>
msgid ""
"<input type=\"hidden\" name=\"nonce\" /> <input id=\"9c490\" type=\"hidden\" "
@ -90,6 +98,24 @@ msgstr ""
#. type: Content of: <p><div><div><div><form>
msgid ""
"<button aria-label=\"Subscribe\" class=\"btn\" "
"type=\"submit\">Subscribe</button>"
"<button aria-label=\"Subscribe\" class=\"btn\" type=\"button\" "
"data-bs-toggle=\"modal\" "
"data-bs-target=\"#hcaptchamodal\">Subscribe</button>"
msgstr ""
#. type: Content of: <p><div><div><div><form><div><div><div><div><h5>
msgid "Are you a robot?"
msgstr ""
#. type: Content of: <p><div><div><div><form><div><div><div><div>
msgid ""
"<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" "
"aria-label=\"Close\"></button>"
msgstr ""
#. type: Content of: <p><div><div><div><form><div><div><div><div>
msgid ""
"<button type=\"button\" class=\"btn btn-secondary\" "
"data-bs-dismiss=\"modal\">Close</button> <button aria-label=\"Subscribe\" "
"class=\"btn\" type=\"submit\">Subscribe</button>"
msgstr ""