From a8198f889a60eb8a17ca04cfc2b694990b9ad027 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 27 Sep 2021 22:54:58 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9liore=20dialogue=20inscription/passage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_inscr_passage.py | 10 +++++++--- app/scodoc/sco_utils.py | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_inscr_passage.py b/app/scodoc/sco_inscr_passage.py index be1f58452..4fb8c57ac 100644 --- a/app/scodoc/sco_inscr_passage.py +++ b/app/scodoc/sco_inscr_passage.py @@ -343,15 +343,19 @@ def formsemestre_inscr_passage( % inscrits[etudid] ) H.append("") - if not a_inscrire and not a_desinscrire: + todo = a_inscrire or a_desinscrire + if not todo: H.append("""

Il n'y a rien à modifier !

""") H.append( scu.confirm_dialog( - dest_url="formsemestre_inscr_passage", + dest_url="formsemestre_inscr_passage" + if todo + else "formsemestre_status", + message="

Confirmer ?

" if todo else "", add_headers=False, cancel_url="formsemestre_inscr_passage?formsemestre_id=" + str(formsemestre_id), - OK="Effectuer l'opération", + OK="Effectuer l'opération" if todo else "", parameters={ "formsemestre_id": formsemestre_id, "etuds": ",".join([str(x) for x in etuds]), diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index dbd353c6f..705277025 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -876,9 +876,10 @@ def confirm_dialog( H = [ f"""
{message} - """, ] + if OK or not cancel_url: + H.append(f'') if cancel_url: H.append( """