From 3243ae87f8e7b5816a5981ba8db3192ae8f7b030 Mon Sep 17 00:00:00 2001 From: Romain Beuque Date: Wed, 3 Sep 2014 20:56:01 +0200 Subject: [PATCH] ajout du uid wifi + affichage des batiments sur la liste des chambres --- Brie/brie/controllers/edit.py | 12 ++++++++++++ Brie/brie/plugins/wifi/controller.py | 2 ++ Brie/brie/templates/edit/member.html | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Brie/brie/controllers/edit.py b/Brie/brie/controllers/edit.py index 4a9a2f4..529785d 100644 --- a/Brie/brie/controllers/edit.py +++ b/Brie/brie/controllers/edit.py @@ -154,6 +154,18 @@ class MemberModificationController(AuthenticatedRestController): #end if rooms = sorted(rooms, key=lambda t:t.cn.first()) + areas = Room.get_areas(self.user, residence_dn) + + for room in rooms: + for area in areas: + if area.dn in room.dn: + room.area = area + break + #end if + #end for + #end for + + show_values["rooms"] = rooms cotisations = show_values["cotisations"] diff --git a/Brie/brie/plugins/wifi/controller.py b/Brie/brie/plugins/wifi/controller.py index 58cfb82..2e9cebb 100644 --- a/Brie/brie/plugins/wifi/controller.py +++ b/Brie/brie/plugins/wifi/controller.py @@ -79,6 +79,8 @@ To: """ + member.cn.first().decode("utf-8").encode("ascii", "ignore") + """ <""" Subject: Votre mot de passe WiFi : residence universitaire Bienvenue dans votre residence etudiante de Paris Sud + + Votre nom de connexion est : """ + member_uid + """ Votre mot de passe WiFi est : """ + password message = message.encode("utf-8") diff --git a/Brie/brie/templates/edit/member.html b/Brie/brie/templates/edit/member.html index e8963eb..14b4fd8 100644 --- a/Brie/brie/templates/edit/member.html +++ b/Brie/brie/templates/edit/member.html @@ -34,8 +34,8 @@ - - + +