From b2bd659c47a793a958d5bfb43e9e71c58945b472 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 25 Jun 2023 21:05:19 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20ADSUP=20au=20transcodage=20Apog=C3=A9e.?= =?UTF-8?q?=20Cosmetic=20flash.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/main/config_apo.py | 4 +++- app/models/config.py | 2 ++ app/static/css/scodoc.css | 15 +++++++++++---- app/views/scodoc.py | 2 +- sco_version.py | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/forms/main/config_apo.py b/app/forms/main/config_apo.py index b65d6407e0..5db90405ab 100644 --- a/app/forms/main/config_apo.py +++ b/app/forms/main/config_apo.py @@ -65,6 +65,7 @@ class CodesDecisionsForm(FlaskForm): ADJ = _build_code_field("ADJ") ADJR = _build_code_field("ADJR") ADM = _build_code_field("ADM") + ADSUP = _build_code_field("ADSUP") AJ = _build_code_field("AJ") ATB = _build_code_field("ATB") ATJ = _build_code_field("ATJ") @@ -81,7 +82,8 @@ class CodesDecisionsForm(FlaskForm): NOTES_FMT = StringField( label="Format notes exportées", - description="""Format des notes. Par défaut %3.2f (deux chiffres après la virgule)""", + description="""Format des notes. Par défaut + %3.2f (deux chiffres après la virgule)""", validators=[ validators.Length( max=SHORT_STR_LEN, diff --git a/app/models/config.py b/app/models/config.py index 71b462bcf9..5212ff38a3 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -15,6 +15,7 @@ from app.scodoc.codes_cursus import ( ADJ, ADJR, ADM, + ADSUP, AJ, ATB, ATJ, @@ -37,6 +38,7 @@ CODES_SCODOC_TO_APO = { ADJ: "ADM", ADJR: "ADM", ADM: "ADM", + ADSUP: "ADM", AJ: "AJ", ATB: "AJAC", ATJ: "AJAC", diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 443f47bc8a..34bb0462a9 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -65,13 +65,14 @@ div#gtrcontent { } div.flashes { - transition: opacity 0.5s ease; - margin-top: 8px; left: 50%; + margin-top: 8px; + max-width: 800px; position: fixed; + text-align: center; top: 8px; transform: translateX(-50%); - width: auto; + transition: opacity 0.5s ease; z-index: 1000; } @@ -79,7 +80,7 @@ div.alert { padding: 16px; border-radius: 12px; font-size: 200%; - opacity: 0.8; + opacity: 0.9; } div.alert-info { @@ -88,6 +89,12 @@ div.alert-info { border-color: #208d3b; } +div.alert-warning { + color: #ef5c00; + background-color: #fbfb00d4; + border-color: #767676; +} + div.alert-error { color: #ef0020; background-color: #ffff00; diff --git a/app/views/scodoc.py b/app/views/scodoc.py index 6f231f9104..02369be60a 100644 --- a/app/views/scodoc.py +++ b/app/views/scodoc.py @@ -198,7 +198,7 @@ def config_codes_decisions(): if form.validate_on_submit(): for code in models.config.CODES_SCODOC_TO_APO: ScoDocSiteConfig.set_code_apo(code, getattr(form, code).data) - flash("Codes décisions enregistrés.") + flash("Codes décisions enregistrés") return redirect(url_for("scodoc.index")) elif request.method == "GET": for code in models.config.CODES_SCODOC_TO_APO: diff --git a/sco_version.py b/sco_version.py index aa0d290876..282f517e7f 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.4.92" +SCOVERSION = "9.4.93" SCONAME = "ScoDoc"