forked from ScoDoc/ScoDoc
nettoyage
This commit is contained in:
parent
17611cad03
commit
ba3832bf29
|
@ -68,75 +68,12 @@ class ScoDocConfigurationForm(FlaskForm):
|
|||
capitalize_all_ues = BooleanField(label="Capitalise toutes les UE des semestres validés (règles DUT)")
|
||||
allow_null_prenom = BooleanField(label="Autorise les étudiants sans prénom (UCAC)")
|
||||
publish_portal_photo_url = BooleanField(label="Si pas de photo et portail, publie l'url (était vrai jusqu'en oct 2016)")
|
||||
default_pdf_footer_template = StringField(
|
||||
label="Pied de page par défaut des documents PDF",
|
||||
)
|
||||
logo_header_height = IntegerField(
|
||||
label="hauteur en mm du logo d'entête",
|
||||
)
|
||||
logo_footer_height = IntegerField(
|
||||
label="hauteur en mm du logo de pied de page",
|
||||
)
|
||||
custom_html_header = StringField(
|
||||
label="Fichier d'entete html",
|
||||
)
|
||||
custom_html_footer = StringField(
|
||||
label="fichier pied de page html",
|
||||
)
|
||||
custom_html_header_cnx = StringField(
|
||||
label="Fichier d'entete html (connexion)",
|
||||
)
|
||||
custom_html_footer_cnx = StringField(
|
||||
label="fichier pied de page html (connexion)",
|
||||
)
|
||||
capitalize_all_ues = BooleanField(
|
||||
label="Capitalise toutes les UE des semestres validés (règles DUT)",
|
||||
)
|
||||
allow_null_prenom = BooleanField(
|
||||
label="Autorise les étudiants sans prénom (UCAC)",
|
||||
)
|
||||
publish_portal_photo_url = BooleanField(
|
||||
label="Si pas de photo et portail, publie l'url (était vrai jusqu'en oct 2016)",
|
||||
)
|
||||
alwways_require_ine = BooleanField(label="Rendre l'INE obligatoire")
|
||||
|
||||
etud_max_filesize = IntegerField(label="Taille maximale des fichiers archives étudiants en octets")
|
||||
logo_header_height = IntegerField(label="hauteur en mm du logo d'entête")
|
||||
logo_footer_height = IntegerField(label="hauteur en mm du logo de pied de page")
|
||||
alwways_require_ine = BooleanField(label="Rendre l'INE obligatoire")
|
||||
etud_max_filesize = IntegerField(label="Taille maximale des fichiers archives étudiants en octets")
|
||||
|
||||
etud_max_filesize = IntegerField(
|
||||
label="Taille maximale des fichiers archives étudiants en octets",
|
||||
)
|
||||
default_pdf_footer_template = StringField(
|
||||
label="Pied de page par défaut des documents PDF",
|
||||
)
|
||||
custom_html_header = StringField(
|
||||
label="Fichier d'entete html",
|
||||
)
|
||||
custom_html_footer = StringField(
|
||||
label="fichier pied de page html",
|
||||
)
|
||||
custom_html_header_cnx = StringField(
|
||||
label="Fichier d'entete html (connexion)",
|
||||
)
|
||||
custom_html_footer_cnx = StringField(
|
||||
label="fichier pied de page html (connexion)",
|
||||
)
|
||||
capitalize_all_ues = BooleanField(
|
||||
label="Capitalise toutes les UE des semestres validés (règles DUT)",
|
||||
)
|
||||
allow_null_prenom = BooleanField(
|
||||
label="Autorise les étudiants sans prénom (UCAC)",
|
||||
)
|
||||
publish_portal_photo_url = BooleanField(
|
||||
label="Si pas de photo et portail, publie l'url (était vrai jusqu'en oct 2016)",
|
||||
)
|
||||
alwways_require_ine = BooleanField(
|
||||
label="Rendre l'INE obligatoire"
|
||||
)
|
||||
etud_max_filesize = IntegerField(
|
||||
label="Taille maximale des fichiers archives étudiants en octets",
|
||||
)
|
||||
submit = SubmitField("Valider")
|
||||
cancel = SubmitField("Annuler", render_kw={"formnovalidate": True})
|
||||
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
from enum import Enum
|
||||
|
||||
from flask import flash
|
||||
from app import db, log, ScoValueError
|
||||
from app import db, log
|
||||
from app.comp import bonus_spo
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SelectField, SubmitField, StringField, BooleanField, IntegerField
|
||||
from app.scodoc.sco_exceptions import ScoValueError
|
||||
|
||||
from app.scodoc.sco_codes_parcours import (
|
||||
ADC,
|
||||
|
@ -332,19 +331,6 @@ class ScoDocSiteConfig(db.Model):
|
|||
"DEFAULT_PDF_FOOTER_TEMPLATE": str,
|
||||
"enable_entreprises": bool,
|
||||
}
|
||||
# BONUS_SPORT = "bonus_sport_func_name"
|
||||
|
||||
# NAMES = {
|
||||
# # BONUS_SPORT: str,
|
||||
# "always_require_ine": bool,
|
||||
# "SCOLAR_FONT": str,
|
||||
# "SCOLAR_FONT_SIZE": str,
|
||||
# "SCOLAR_FONT_SIZE_FOOT": str,
|
||||
# "INSTITUTION_NAME": str,
|
||||
# "INSTITUTION_ADDRESS": str,
|
||||
# "INSTITUTION_CITY": str,
|
||||
# # DEFAULT_PDF_FOOTER_TEMPLATE: str,
|
||||
# }
|
||||
|
||||
def __init__(self, name, value):
|
||||
self.name = name
|
||||
|
@ -368,9 +354,7 @@ class ScoDocSiteConfig(db.Model):
|
|||
"""
|
||||
if class_name not in cls.get_bonus_sport_class_names():
|
||||
raise NameError("invalid class name for bonus_sport")
|
||||
c = ScoDocSiteConfig.query.filter_by(
|
||||
name=SiteConfig.BONUS_SPORT.db_name()
|
||||
).first()
|
||||
c = ScoDocSiteConfig.query.filter_by(name=SiteConfig.BONUS_SPORT.db_name()).first()
|
||||
if c:
|
||||
log("setting to " + class_name)
|
||||
c.value = class_name
|
||||
|
@ -402,9 +386,7 @@ class ScoDocSiteConfig(db.Model):
|
|||
and flash a warning.
|
||||
"""
|
||||
if not class_name: # None or ""
|
||||
c = ScoDocSiteConfig.query.filter_by(
|
||||
name=SiteConfig.BONUS_SPORT.db_name()
|
||||
).first()
|
||||
c = ScoDocSiteConfig.query.filter_by(name=SiteConfig.BONUS_SPORT.db_name()).first()
|
||||
if c is None:
|
||||
return None
|
||||
class_name = c.value
|
||||
|
|
|
@ -38,7 +38,6 @@ from flask import url_for, g
|
|||
from app import email
|
||||
from app import log
|
||||
from app.models.config import SiteConfig
|
||||
from app.models.config import SiteConfig
|
||||
from app.models import Admission
|
||||
from app.models.etudiants import make_etud_args
|
||||
import app.scodoc.sco_utils as scu
|
||||
|
|
|
@ -76,7 +76,6 @@ INSCRIT = "I"
|
|||
DEMISSION = "D"
|
||||
DEF = "DEF"
|
||||
|
||||
|
||||
# Types de modules
|
||||
class ModuleType(IntEnum):
|
||||
"""Code des types de module."""
|
||||
|
|
Loading…
Reference in New Issue