forked from ScoDoc/ScoDoc
Fix regression: cancel button in old forms
This commit is contained in:
parent
b5d5bb3b91
commit
a9bc28a49e
@ -442,8 +442,9 @@ class TF(object):
|
||||
self.formid}_submit" id="{self.formid}_submit" value="{self.submitlabel
|
||||
}" {' '.join(self.submitbuttonattributes)}/>"""
|
||||
if self.cancelbutton:
|
||||
buttons_markup += f""" <input class="btn btn-default" type="submit" name="cancel" id="{
|
||||
self.formid}_cancel" value="{self.cancelbutton}">"""
|
||||
buttons_markup += f""" <input class="btn btn-default" type="submit"
|
||||
name="{self.formid}_cancel" id="{self.formid}_cancel"
|
||||
value="{self.cancelbutton}">"""
|
||||
buttons_markup += "</div>"
|
||||
|
||||
R = []
|
||||
|
@ -706,7 +706,6 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
|
||||
def opt_selected(gid):
|
||||
if gid == vals.get(select_name):
|
||||
return "selected"
|
||||
else:
|
||||
return ""
|
||||
|
||||
if mod.id in module_ids_set:
|
||||
@ -866,7 +865,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
|
||||
{msg}
|
||||
{tf[1]}
|
||||
"""
|
||||
elif tf[0] == -1:
|
||||
if tf[0] == -1: # Annulation
|
||||
if formsemestre:
|
||||
return redirect(
|
||||
url_for(
|
||||
@ -876,6 +875,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
|
||||
)
|
||||
)
|
||||
return redirect(url_for("notes.index_html", scodoc_dept=g.scodoc_dept))
|
||||
|
||||
# Edition ou modification du semestre
|
||||
tf[2]["gestion_compensation"] = bool(tf[2]["gestion_compensation_lst"])
|
||||
tf[2]["gestion_semestrielle"] = bool(tf[2]["gestion_semestrielle_lst"])
|
||||
@ -890,6 +890,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
|
||||
# (retire le "MI" du début du nom de champs)
|
||||
module_ids_checked = [int(x[2:]) for x in tf[2]["tf-checked"]]
|
||||
_formsemestre_check_ue_bonus_unicity(module_ids_checked)
|
||||
ok = False
|
||||
if not edit:
|
||||
if is_apc:
|
||||
_formsemestre_check_module_list(module_ids_checked, tf[2]["semestre_id"])
|
||||
|
Loading…
Reference in New Issue
Block a user