Source code for election_day.forms.upload.wabsti_proporz
from onegov.election_day.forms.upload.common import ALLOWED_MIME_TYPES
from onegov.election_day.forms.upload.common import MAX_FILE_SIZE
from onegov.form import Form
from onegov.form.fields import UploadField
from onegov.form.validators import FileSizeLimit
from onegov.form.validators import WhitelistedMimeType
from wtforms.validators import DataRequired
[docs]
class UploadWabstiProporzElectionForm(Form):
[docs]
wp_gemeinden = UploadField(
label='WP_Gemeinden',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wp_kandidaten = UploadField(
label='WP_Kandidaten',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wp_kandidatengde = UploadField(
label='WP_KandidatenGde',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wp_listen = UploadField(
label='WP_Listen',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wp_listengde = UploadField(
label='WP_ListenGde',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wp_wahl = UploadField(
label='WP_Wahl',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wpstatic_gemeinden = UploadField(
label='WPStatic_Gemeinden',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)
[docs]
wpstatic_kandidaten = UploadField(
label='WPStatic_Kandidaten',
validators=[
DataRequired(),
WhitelistedMimeType(ALLOWED_MIME_TYPES),
FileSizeLimit(MAX_FILE_SIZE)
],
render_kw={'force_simple': True}
)