forked from ScoDoc/ScoDoc
améliore dialogue inscription/passage
This commit is contained in:
parent
651f111839
commit
a8198f889a
@ -343,15 +343,19 @@ def formsemestre_inscr_passage(
|
|||||||
% inscrits[etudid]
|
% inscrits[etudid]
|
||||||
)
|
)
|
||||||
H.append("</ol>")
|
H.append("</ol>")
|
||||||
if not a_inscrire and not a_desinscrire:
|
todo = a_inscrire or a_desinscrire
|
||||||
|
if not todo:
|
||||||
H.append("""<h3>Il n'y a rien à modifier !</h3>""")
|
H.append("""<h3>Il n'y a rien à modifier !</h3>""")
|
||||||
H.append(
|
H.append(
|
||||||
scu.confirm_dialog(
|
scu.confirm_dialog(
|
||||||
dest_url="formsemestre_inscr_passage",
|
dest_url="formsemestre_inscr_passage"
|
||||||
|
if todo
|
||||||
|
else "formsemestre_status",
|
||||||
|
message="<p>Confirmer ?</p>" if todo else "",
|
||||||
add_headers=False,
|
add_headers=False,
|
||||||
cancel_url="formsemestre_inscr_passage?formsemestre_id="
|
cancel_url="formsemestre_inscr_passage?formsemestre_id="
|
||||||
+ str(formsemestre_id),
|
+ str(formsemestre_id),
|
||||||
OK="Effectuer l'opération",
|
OK="Effectuer l'opération" if todo else "",
|
||||||
parameters={
|
parameters={
|
||||||
"formsemestre_id": formsemestre_id,
|
"formsemestre_id": formsemestre_id,
|
||||||
"etuds": ",".join([str(x) for x in etuds]),
|
"etuds": ",".join([str(x) for x in etuds]),
|
||||||
|
@ -876,9 +876,10 @@ def confirm_dialog(
|
|||||||
H = [
|
H = [
|
||||||
f"""<form {action} method="POST">
|
f"""<form {action} method="POST">
|
||||||
{message}
|
{message}
|
||||||
<input type="submit" value="{OK}"/>
|
|
||||||
""",
|
""",
|
||||||
]
|
]
|
||||||
|
if OK or not cancel_url:
|
||||||
|
H.append(f'<input type="submit" value="{OK}"/>')
|
||||||
if cancel_url:
|
if cancel_url:
|
||||||
H.append(
|
H.append(
|
||||||
"""<input type ="button" value="%s"
|
"""<input type ="button" value="%s"
|
||||||
|
Loading…
Reference in New Issue
Block a user