Fix nuke button prompt (#469)

Hitting the cancel button does not return "", but null. Therefore
the toLowerCase() fails, and throwing an exception means "sure go
ahead submitting this" to JS for some godforsaken reason.

Just remove the toLowerCase for now, have people type the names
properly.
This commit is contained in:
Nicolas F 2018-04-04 23:32:04 +02:00 committed by A nyaa developer
parent 291f859a4f
commit c786bd20f8
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@
</form>
{% if g.user.is_superadmin %}
<hr>
<form method="POST" onsubmit="return prompt('Please type {{ user.username }} to confirm').toLowerCase() == '{{ user.username }}'.toLowerCase()">
<form method="POST" onsubmit="return prompt('Please type {{ user.username }} to confirm') == '{{ user.username }}'">
{{ nuke_form.csrf_token }}
<div class="row">
<div class="col-md-6 text-left">