fix: 修复由于更新django captch版本引起的css丢失问题 (#5204)

* fix: 修复由于更新django captch版本引起的css丢失问题

* perf: 优化验证码的高度

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2020-12-10 20:48:10 +08:00
committed by GitHub
parent 5aee2ce3db
commit d4feaf1e08
9 changed files with 38 additions and 29 deletions

View File

@@ -1,12 +0,0 @@
{{image}}{{hidden_field}}{{text_field}}
<script>
function refresh_captcha() {
$.getJSON("{% url "captcha-refresh" %}",
function (result) {
$('.captcha').attr('src', result['image_url']);
$('#id_captcha_0').val(result['key'])
})
}
$('.captcha').click(refresh_captcha)
</script>

View File

@@ -1 +0,0 @@
<input id="{{id}}_0" name="{{name}}_0" type="hidden" value="{{key}}" />

View File

@@ -1,4 +0,0 @@
{% load i18n %}
{% spaceless %}
{% if audio %}<a title="{% trans "Play CAPTCHA as audio file" %}" href="{{audio}}">{% endif %}<img src="{{image}}" alt="captcha" class="captcha" />{% if audio %}</a>{% endif %}
{% endspaceless %}

View File

@@ -1,7 +0,0 @@
{% load i18n %}
<div class="row">
<div class="col-sm-6">
<input autocomplete="off" id="{{id}}_1" class="form-control" name="{{name}}_1" placeholder="{% trans 'Captcha' %}" type="text" />
</div>
</div>
</br>