summaryrefslogtreecommitdiffstats
path: root/static/volunteer
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-07-08 20:40:22 -0400
committerrsiddharth <s@ricketyspace.net>2019-07-08 20:40:22 -0400
commit4dc861f8c415d3073d0f55c0ec88a5be2cc1577a (patch)
tree1ae0da4a5709fd6ef82fa489c78ff44a2d641343 /static/volunteer
parentfd41295ca50695f7db85d1ed1a23d4ba0f6211c0 (diff)
/volunteer form: Add "Meaning of life" challenge.
Diffstat (limited to 'static/volunteer')
-rwxr-xr-xstatic/volunteer/index.html9
-rw-r--r--static/volunteer/submit/index.php4
2 files changed, 13 insertions, 0 deletions
diff --git a/static/volunteer/index.html b/static/volunteer/index.html
index 8f98ad8..119e43e 100755
--- a/static/volunteer/index.html
+++ b/static/volunteer/index.html
@@ -48,6 +48,15 @@
</div>
<div class="field">
+ <label class="label c">What is 41 + 1?</label>
+ <div class="control">
+ <input name="c" class="input" type="number"
+ placeholder="Meaning of life"
+ required>
+ </div>
+ </div>
+
+ <div class="field">
<div class="control">
<button class="button is-link" type="submit">
Submit
diff --git a/static/volunteer/submit/index.php b/static/volunteer/submit/index.php
index 1cfb16e..60a8406 100644
--- a/static/volunteer/submit/index.php
+++ b/static/volunteer/submit/index.php
@@ -35,6 +35,7 @@ function post() {
$n = $_POST['name'];
$e = $_POST['email'];
$m = $_POST['msg'];
+ $c = $_POST['c'];
$errors = [];
if (empty($n)) {
@@ -46,6 +47,9 @@ function post() {
if (empty($m)) {
$errors[] = em_fw('Message is required');
}
+ if ($c !== '42') {
+ $errors[] = '41 + 1 is not \'' . $c . '\'';
+ }
$errors[] = 'This form is disabled for now';
$sok = true;