ScoDoc/app/but/forms/refcomp_forms.py

36 lines
1.0 KiB
Python
Raw Permalink Normal View History

2021-12-03 11:03:33 +01:00
##############################################################################
# ScoDoc
2022-01-01 14:49:42 +01:00
# Copyright (c) 1999 - 2022 Emmanuel Viennet. All rights reserved.
2021-12-03 11:03:33 +01:00
# See LICENSE
##############################################################################
"""ScoDoc 9 : Formulaires / référentiel de compétence
"""
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed, FileRequired
from wtforms import SelectField, SubmitField
class FormationRefCompForm(FlaskForm):
referentiel_competence = SelectField("Référentiels déjà chargés")
submit = SubmitField("Valider")
cancel = SubmitField("Annuler")
class RefCompLoadForm(FlaskForm):
upload = FileField(
label="Sélectionner un fichier XML Orébut",
validators=[
FileRequired(),
FileAllowed(
[
"xml",
],
"Fichier XML Orébut seulement",
),
],
)
submit = SubmitField("Valider")
cancel = SubmitField("Annuler")