forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -40,6 +40,7 @@ from wtforms import (
|
||||
validators,
|
||||
)
|
||||
from wtforms.validators import DataRequired
|
||||
from app.scodoc import sco_utils as scu
|
||||
|
||||
|
||||
class AjoutAssiOrJustForm(FlaskForm):
|
||||
@ -98,15 +99,7 @@ class AjoutAssiOrJustForm(FlaskForm):
|
||||
"id": "assi_date_fin",
|
||||
},
|
||||
)
|
||||
assi_raison = TextAreaField(
|
||||
"Raison",
|
||||
render_kw={
|
||||
"id": "assi_raison",
|
||||
"cols": 75,
|
||||
"rows": 4,
|
||||
"maxlength": 500,
|
||||
},
|
||||
)
|
||||
|
||||
entry_date = StringField(
|
||||
"Date de dépot ou saisie",
|
||||
validators=[validators.Length(max=10)],
|
||||
@ -122,7 +115,15 @@ class AjoutAssiOrJustForm(FlaskForm):
|
||||
|
||||
class AjoutAssiduiteEtudForm(AjoutAssiOrJustForm):
|
||||
"Formulaire de saisie d'une assiduité pour un étudiant"
|
||||
|
||||
description = TextAreaField(
|
||||
"Description",
|
||||
render_kw={
|
||||
"id": "description",
|
||||
"cols": 75,
|
||||
"rows": 4,
|
||||
"maxlength": 500,
|
||||
},
|
||||
)
|
||||
assi_etat = RadioField(
|
||||
"Signaler:",
|
||||
choices=[("absent", "absence"), ("retard", "retard"), ("present", "présence")],
|
||||
@ -139,16 +140,24 @@ class AjoutAssiduiteEtudForm(AjoutAssiOrJustForm):
|
||||
|
||||
class AjoutJustificatifEtudForm(AjoutAssiOrJustForm):
|
||||
"Formulaire de saisie d'un justificatif pour un étudiant"
|
||||
|
||||
raison = TextAreaField(
|
||||
"Raison",
|
||||
render_kw={
|
||||
"id": "raison",
|
||||
"cols": 75,
|
||||
"rows": 4,
|
||||
"maxlength": 500,
|
||||
},
|
||||
)
|
||||
etat = SelectField(
|
||||
"État du justificatif",
|
||||
choices=[
|
||||
("", "Choisir..."), # Placeholder
|
||||
("attente", "En attente de validation"),
|
||||
("non_valide", "Non valide"),
|
||||
("modifie", "Modifié"),
|
||||
("valide", "Valide"),
|
||||
(scu.EtatJustificatif.ATTENTE.value, "En attente de validation"),
|
||||
(scu.EtatJustificatif.NON_VALIDE.value, "Non valide"),
|
||||
(scu.EtatJustificatif.MODIFIE.value, "Modifié"),
|
||||
(scu.EtatJustificatif.VALIDE.value, "Valide"),
|
||||
],
|
||||
validators=[DataRequired(message="This field is required.")],
|
||||
)
|
||||
fichiers = MultipleFileField()
|
||||
fichiers = MultipleFileField(label="Ajouter des fichiers")
|
||||
|
Loading…
Reference in New Issue
Block a user