Bill form style update

This commit is contained in:
Emily 2019-05-12 21:00:06 +01:00
parent 9826d12466
commit c29ec24bdd
2 changed files with 10 additions and 10 deletions

View File

@ -11,14 +11,15 @@ FORM_RENDER_KW = {
}
class BillForm(Form):
payment_to = StringField(_("Payment to"), [validators.DataRequired()])
payment_to = StringField(_("Payment to"), [validators.DataRequired()], render_kw = FORM_RENDER_KW)
description = TextAreaField(_("Description"), render_kw = {
"cols": 55,
"rows": 8
"rows": 8,
**FORM_RENDER_KW
})
sum = DecimalField(_("Sum"))
kid = IntegerField(_("KID"))
date_due = DateField(_("Date due"))
sum = DecimalField(_("Sum"), render_kw = FORM_RENDER_KW)
kid = IntegerField(_("KID"), render_kw = FORM_RENDER_KW)
date_due = DateField(_("Date due"), render_kw = FORM_RENDER_KW)
class LoginForm(Form):
email = StringField(_("Email"), [

View File

@ -23,18 +23,17 @@
</div>
<div class="modal-body">
{% macro render_field(field) %}
<dt>
<div class="form-group">
<label for="{{ field.label.field_id }}">{{ _(field.label.text) }}</label>
</dt>
<dd>{{ field(**kwargs)|safe }}
{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class=errors>
{% for error in field.errors %}
<li>{{ error }}</li>
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
</dd>
</div>
{% endmacro %}
<form method=post>
<dl>