Fix form width for mobile view
This commit is contained in:
parent
a9c02410e6
commit
725a2efce8
@ -16,7 +16,7 @@ def input_check(form, field):
|
||||
raise validators.ValidationError('Bitte wähle eine Option aus')
|
||||
|
||||
class QuestionForm(Form):
|
||||
computers = [('default', 'Bitte auswählen'), ('hal', 'HAL 9000 (2001: Odyssee im Weltraum)'), ('deepthought', 'Deep Thought (Per Anhalter durch die Galaxie)'), ('neuromancer', 'Neuromancer (Neuromancer)'), ('samantha', 'Samatha (Her)'), ('tars', 'TARS und CASE (Interstellar)')]
|
||||
computers = [('default', 'Bitte auswählen'), ('hal', 'HAL 9000 (2001: Odyssee im Weltraum)'), ('deepthought', 'Deep Thought (Hitchhiker\'s Guide)'), ('neuromancer', 'Neuromancer (Neuromancer)'), ('samantha', 'Samatha (Her)'), ('tars', 'TARS und CASE (Interstellar)')]
|
||||
computer = SelectField(u'Fiktionaler Lieblingscomputer', choices=computers, validators=[validators.InputRequired(), input_check])
|
||||
statuses = [('default', 'Bitte auswählen'), ('200', '200 OK'), ('300', '300 Multiple Choices'), ('301', '301 Moved Permanently'), ('402', '402 Payment Required'), ('404', '404 (Sleep) Not Found'), ('408', '408 Request Timeout'), ('418', '418 I am a teapot'), ('450', '450 Blocked by Windows Parental Controls'), ('451', '451 Unavailable For Legal Reasons'), ('502', '502 Bad Gateway (Internetkurort)')]
|
||||
status = SelectField(u'Welcher HTTP-Statuscode trifft am häufigsten auf dich zu?', choices=statuses, validators=[validators.InputRequired(), input_check])
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% macro render_field(field) %}
|
||||
<dt>{{ field.label }}
|
||||
<dd>{{ field(**kwargs)|safe }}
|
||||
<p>{{ field.label }}
|
||||
<br>{{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<ul class=errors>
|
||||
{% for error in field.errors %}
|
||||
@ -8,5 +8,6 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</p>
|
||||
<br>
|
||||
{% endmacro %}
|
||||
|
||||
@ -2,22 +2,13 @@
|
||||
{% block content %}
|
||||
{% from "_formhelpers.html" import render_field %}
|
||||
<form method=post>
|
||||
<dl>
|
||||
{{ render_field(form.computer) }}
|
||||
<br>
|
||||
{{ render_field(form.status) }}
|
||||
<br>
|
||||
{{ render_field(form.vegetable) }}
|
||||
<br>
|
||||
{{ render_field(form.spirit_animal) }}
|
||||
<br>
|
||||
{{ render_field(form.operating_system) }}
|
||||
<br>
|
||||
{{ form.check }} {{ form.check.label }}
|
||||
<br>
|
||||
<br>
|
||||
{{ render_field(form.email) }}
|
||||
</dl>
|
||||
<p></p>
|
||||
<p><input type=submit value=Abschicken>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user