Skip to content

Commit 13ccfaa

Browse files
committed
Captcha: Fix spacing of renew button
1 parent 52b6b2f commit 13ccfaa

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

ChangeLog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Unreleased 1.42.3 (2025-MM-DD)
3636
* Reworked ``MetaFilter`` in wiki to yield more accurate results
3737
* Use HTML ``<summary>`` and ``<details>`` instead of own JS collapse
3838
* Remove ``python-dateutil`` as direct dependency of Inyoka (still needed by dependencies ``celery`` and ``icalendar``)
39+
* Captcha: Fix spacing of renew button
3940

4041
🗑 Deprecations
4142
--------------

inyoka/portal/jinja2/portal/register.html

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ <h3>Registrierung</h3>
1818
<form action="" method="post" class="-horizontal">
1919
{{ csrf_input }}
2020
{{ form.non_field_errors() }}
21+
{{ form.media }}
2122
<dl>
2223
{{ render_form(form, ['username', 'password', 'confirm_password',
2324
'email'], inline=true)}}

inyoka/static/style/captcha.less

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* style.captcha
3+
* ~~~~~~~~~~~~~
4+
*
5+
* The styles for the captcha.
6+
*
7+
* :copyright: (c) 2007-2025 by the Inyoka Team, see AUTHORS for more details.
8+
* :license: BSD, see LICENSE for more details.
9+
*/
10+
11+
img.captcha {
12+
vertical-align: bottom;
13+
}
14+
input[name="renew_captcha"] {
15+
margin-top: 1em;
16+
margin-left: 1em;
17+
}

inyoka/utils/forms.py

+5
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ def clean(self, value):
267267
class ImageCaptchaWidget(TextInput):
268268
template_name = 'forms/widgets/image_captcha.html'
269269

270+
class Media:
271+
css = {
272+
"all": ["style/captcha.css"],
273+
}
274+
270275
def get_context(self, name, value, attrs):
271276
context = super().get_context(name, value, attrs)
272277
context['widget']['captcha_url'] = href('portal', __service__='portal.get_captcha',

0 commit comments

Comments
 (0)