1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-06-24 13:05:49 +00:00

comments: fix editing for users with a CAPTCHA (#502)

* comments: fix editing for users with a CAPTCHA

My bad!

* Update help.html
This commit is contained in:
Nicolas F 2018-06-17 01:57:14 +02:00 committed by Arylide
parent bc1901baa5
commit f04e0fd2ae
3 changed files with 21 additions and 1 deletions

View file

@ -118,6 +118,9 @@ $(document).ready(function() {
$errorStatus.text(error);
}).always(function() {
$submitButton.removeAttr('disabled');
if (grecaptcha) {
grecaptcha.reset();
}
$waitIndicator.hide();
});
})

View file

@ -14,7 +14,7 @@
<ul>
<li>Torrents uploaded by trusted users.</li>
</ul>
<span style="color:red; font-weight: bold;">Red</span> entries (remake) are torrents that matching any of the following:
<span style="color:red; font-weight: bold;">Red</span> entries (remake) are torrents that match any of the following:
<ul>
<li>Reencode of original release.</li>
<li>Remux of another uploader's original release for hardsubbing and/or fixing purposes.</li>

View file

@ -178,6 +178,23 @@
<div class="form-group">
<textarea class="form-control" name="comment" autofocus>{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', '&#10;'|safe) -}}</textarea>
</div>
{% if config.USE_RECAPTCHA and g.user.age < config['ACCOUNT_RECAPTCHA_AGE'] %}
<div class="row">
<div class="col-md-4">
{% if comment_form.recaptcha.errors %}
<div class="alert alert-danger">
<p><strong>CAPTCHA error:</strong></p>
<ul>
{% for error in comment_form.recaptcha.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{{ comment_form.recaptcha }}
</div>
</div>
{% endif %}
<input type="submit" value="Submit" class="btn btn-success btn-sm">
<button class="btn btn-sm edit-comment" title="Cancel">Cancel</button>
<span class="edit-error text-danger"></span>