mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
from flask_wtf import FlaskForm
|
|
from wtforms import MultipleFileField, SelectField, StringField, SubmitField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
class CreateOCRJobForm(FlaskForm):
|
|
description = StringField(
|
|
'Description',
|
|
validators=[DataRequired(), Length(1, 64)]
|
|
)
|
|
files = MultipleFileField('Files', validators=[DataRequired()])
|
|
language = SelectField(
|
|
'Language',
|
|
choices=[('', 'Choose your option'),
|
|
('eng', 'English'),
|
|
('enm', 'English, Middle (1100-1500)'),
|
|
('fra', 'French'),
|
|
('frm', 'French, Middle (ca. 1400-1600)'),
|
|
('deu', 'German'),
|
|
('frk', 'German Fraktur'),
|
|
('ita', 'Italian'),
|
|
('por', 'Portuguese'),
|
|
('spa', 'Spanish; Castilian')
|
|
],
|
|
validators=[DataRequired()]
|
|
)
|
|
submit = SubmitField('Create OCR job')
|
|
title = StringField(
|
|
'Title',
|
|
validators=[DataRequired(), Length(1, 32)]
|
|
)
|