diff options
| -rw-r--r-- | ws2a/bugs.html | 2 | ||||
| -rw-r--r-- | ws2a/bugs.js | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ws2a/bugs.html b/ws2a/bugs.html index f62b304..2bfd65a 100644 --- a/ws2a/bugs.html +++ b/ws2a/bugs.html @@ -62,7 +62,7 @@ <label for="inputName" class="sr-only">Name</label> <input id="inputName" name="name" class="form-control" placeholder="Screen Name" required="" autofocus="" type="text"> <label for="inputID" class="sr-only">Identifier</label> - <input id="inputID" name="id" class="form-control" placeholder="Identifier" required="" type="password"> + <input id="inputID" name="id" class="form-control" placeholder="Identifier" required="" type="text"> <label for="shortdesc" class="sr-only">Short Description</label> <input id="shortdesc" name="shortdesc" class="form-control" placeholder="Short description" required="" type="password"> <textarea class="form-control" name="longdesc" rows="5" cols="50" placeholder="Long description"></textarea> diff --git a/ws2a/bugs.js b/ws2a/bugs.js index 675659c..3d47a64 100644 --- a/ws2a/bugs.js +++ b/ws2a/bugs.js @@ -44,5 +44,15 @@ function loadLastBugs() { }; xhttp.open("GET", "/cgi-bin/bugsdata.cgi", true); xhttp.send(); + var captcha = new XMLHttpRequest(); + captcha.onreadystatechange = function() { + if (captcha.readyState == 4 && captcha.status == 200) { + var id = captcha.response; + document.getElementById("captcha").innerHTML = "<img src=\"./captchas/" + id + ".png\">"; + console.log("Added hidden field to form:" + bugnum); + } + } + captcha.open("GET", "/cgi-bin/gencaptcha.cgi",true); + captcha.send(); } window.onload = loadLastBugs |
