From 067cb4bcbcdf5565d18c0467f1a199ec87257ff9 Mon Sep 17 00:00:00 2001 From: Romain Beuque Date: Mon, 24 Feb 2014 16:08:05 +0100 Subject: [PATCH] ajout d'un log pour la suppression d'une cotisation + affichage du montant dans la suppression d'une cotisation --- Brie/brie/controllers/edit.py | 4 +++- Brie/brie/templates/edit/member.html | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Brie/brie/controllers/edit.py b/Brie/brie/controllers/edit.py index 986f9f5..bacbb87 100644 --- a/Brie/brie/controllers/edit.py +++ b/Brie/brie/controllers/edit.py @@ -469,7 +469,7 @@ class CotisationDeleteController(AuthenticatedRestController): def post(self, residence, member_uid, cotisation_cn): residence_dn = Residences.get_dn_by_name(self.user, residence) member = Member.get_by_uid(self.user, residence_dn, member_uid) - print "WTF" + if member is None: raise Exception('membre inconnu') #end if @@ -484,6 +484,8 @@ class CotisationDeleteController(AuthenticatedRestController): self.user.ldap_bind.delete_entry_subtree(cotisation.dn) + print("[LOG] suppression cotisation (" + cotisation.get('x-amountPaid').first() + "EUR) pour l'utilisateur "+ member.dn + " par l'admin "+ self.user.attrs.dn) + redirect("/edit/member/"+residence+"/"+member_uid) #end def diff --git a/Brie/brie/templates/edit/member.html b/Brie/brie/templates/edit/member.html index 848fe6d..3762387 100644 --- a/Brie/brie/templates/edit/member.html +++ b/Brie/brie/templates/edit/member.html @@ -42,7 +42,7 @@
- ${cotisation.cn.first()} - ${cotisation.get('x-action-user-info').first()} + ${cotisation.cn.first()} - ${cotisation.get('x-action-user-info').first()} (${cotisation.get('x-amountPaid').first()})
@@ -52,7 +52,7 @@
- ${cotisation.cn.first()} - ${cotisation.get('x-action-user-info').first()} + ${cotisation.cn.first()} - ${cotisation.get('x-action-user-info').first()} (${cotisation.get('x-amountPaid').first()})