# HG changeset patch # User Dennis Fink # Date 2015-10-25 16:10:25 # Node ID 34da714bae581e6ee4c4f3ad0a50c5e90fe05858 # Parent a2e1a4a4ed7c7f9b0468d6833dffbe8a177dad55 Move submit fields directly into the corresponding form class diff --git a/ennstatus/donate/forms.py b/ennstatus/donate/forms.py --- a/ennstatus/donate/forms.py +++ b/ennstatus/donate/forms.py @@ -1,5 +1,5 @@ from flask_wtf import Form -from wtforms import SelectField +from wtforms import SelectField, SubmitField from wtforms.validators import DataRequired @@ -10,3 +10,5 @@ class DateForm(Form): ('{:02d}'.format(i), str(i)) for i in range(1, 13) ], validators=[DataRequired()]) + + submit = SubmitField('Submit') diff --git a/ennstatus/root/forms.py b/ennstatus/root/forms.py --- a/ennstatus/root/forms.py +++ b/ennstatus/root/forms.py @@ -20,6 +20,7 @@ class BPMForm(Form): country = SelectField('Country', validators=[DataRequired()], choices=COUNTRIES) + submit = SubmitField('Submit') class MembershipForm(Form): diff --git a/ennstatus/templates/donate/index.html b/ennstatus/templates/donate/index.html --- a/ennstatus/templates/donate/index.html +++ b/ennstatus/templates/donate/index.html @@ -71,7 +71,7 @@ {{ form.hidden_tag() }}
{{ form.country(class_='form-control input-sm', onchange='this.form.submit()') }} - +
diff --git a/ennstatus/templates/donate/received.html b/ennstatus/templates/donate/received.html --- a/ennstatus/templates/donate/received.html +++ b/ennstatus/templates/donate/received.html @@ -23,7 +23,7 @@ {{ form.year(class_='form-control input-sm') }} {{ form.month.label }} {{ form.month(class_='form-control input-sm') }} - + {{ form.submit(class_='btn btn-enn btn-sm') }} diff --git a/ennstatus/templates/root/contact.html b/ennstatus/templates/root/contact.html --- a/ennstatus/templates/root/contact.html +++ b/ennstatus/templates/root/contact.html @@ -16,7 +16,7 @@ {{ form.hidden_tag()}}
{{ form.country(class_='form-control input-sm', onchange='this.form.submit()') }} - +