refresh captcha if it is wrong
This commit is contained in:
parent
8f19c59ebb
commit
c029d47157
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,8 @@ async function formClick(ev) {
|
|||
|
||||
let json = await fetched.json();
|
||||
|
||||
target.querySelector('.captcha').src += '&a=b';
|
||||
|
||||
target.querySelector('.form-message').textContent = json.message;
|
||||
|
||||
if (json.redirect) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class='form-message'></div>
|
||||
<% if (!noCaptcha) { %>
|
||||
<span class='form-key'>
|
||||
<img class='captcha' src='/client/captcha'>
|
||||
<img class='captcha' src='/client/captcha?a'>
|
||||
</span>
|
||||
<input class='form-input' type='text' name='challenger' value='Type the captcha'>
|
||||
<% } %>
|
||||
|
|
Loading…
Reference in a new issue