diff --git a/gestion/dialog/adherent.py b/gestion/dialog/adherent.py index f3bd2a9c..5c9e29a1 100644 --- a/gestion/dialog/adherent.py +++ b/gestion/dialog/adherent.py @@ -54,7 +54,7 @@ class Dialog(proprio.Dialog): 'Personnel' : {'text' : "Nom, prénom, téléphone... (ajouter l'age ?)", 'callback':self.adherent_personnel}, 'Études' : {'text' : "Étude en cours", "callback":self.adherent_etudes}, 'Chambre' : {'text' : 'Déménagement', "callback":self.adherent_chambre}, - 'Compte' : {'text' : "Gestion du compte crans", "adherent":"proprio", "callback":self.proprio_compte, 'help':"Création/Suppression/Activation/Désactivation du compte, gestion des alias mails crans du compte"}, + 'Compte' : {'text' : "Gestion du compte crans", "adherent":"proprio", "callback":TailCall(self.proprio_compte, update_obj='adherent'), 'help':"Création/Suppression/Activation/Désactivation du compte, gestion des alias mails crans du compte"}, 'GPGFingerprint' : {'text':'Ajouter ou supprimer une empeinte GPG', 'attribut':attributs.gpgFingerprint}, 'Remarques' : {'text':'Ajouter ou supprimer une remarque de la machine', 'attribut':attributs.info}, 'Droits' : {'text':"Modifier les droits alloués à cet adhérent", "callback":self.adherent_droits}, diff --git a/gestion/dialog/proprio.py b/gestion/dialog/proprio.py index ed67c0df..8c7a01e7 100644 --- a/gestion/dialog/proprio.py +++ b/gestion/dialog/proprio.py @@ -279,7 +279,7 @@ class Dialog(machine.Dialog, blacklist.Dialog): codes_todo=[([self.dialog.DIALOG_OK], todo, [output, shell, shells, proprio, self_cont, cont])] ) - def proprio_compte(self, proprio, cont, default_item=None): + def proprio_compte(self, proprio, cont, default_item=None, update_obj='proprio'): """Menu de gestion du compte crans d'un proprio""" has_compte = 'cransAccount' in proprio['objectClass'] disabled_compte = has_compte and 0 in proprio['shadowExpire'] @@ -347,8 +347,9 @@ class Dialog(machine.Dialog, blacklist.Dialog): raise EnvironmentError("Il n'y a ni champ 'attribut' ni 'callback' pour le tag %s" % tag) + cont(**{update_obj:proprio}) (code, tag) = self.handle_dialog(cont, box, default_item) - self_cont = TailCall(self.proprio_compte, proprio=proprio, cont=cont, default_item=tag_translate.get(tag, tag)) + self_cont = TailCall(self.proprio_compte, proprio=proprio, cont=cont, default_item=tag_translate.get(tag, tag), update_obj=update_obj) return self.handle_dialog_result( code=code, output=tag,