mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2025-01-25 00:35:12 +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:
parent
bc1901baa5
commit
f04e0fd2ae
|
@ -118,6 +118,9 @@ $(document).ready(function() {
|
|||
$errorStatus.text(error);
|
||||
}).always(function() {
|
||||
$submitButton.removeAttr('disabled');
|
||||
if (grecaptcha) {
|
||||
grecaptcha.reset();
|
||||
}
|
||||
$waitIndicator.hide();
|
||||
});
|
||||
})
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -178,6 +178,23 @@
|
|||
<div class="form-group">
|
||||
<textarea class="form-control" name="comment" autofocus>{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', ' '|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>
|
||||
|
|
Loading…
Reference in a new issue