Merge with Bryce sur les generations de password admin + mail reminder

This commit is contained in:
Romain Beuque 2014-09-03 20:57:58 +02:00
commit df490ddabe
3 changed files with 16 additions and 2 deletions

View File

@ -154,6 +154,18 @@ class MemberModificationController(AuthenticatedRestController):
#end if #end if
rooms = sorted(rooms, key=lambda t:t.cn.first()) 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 show_values["rooms"] = rooms
cotisations = show_values["cotisations"] cotisations = show_values["cotisations"]

View File

@ -79,6 +79,8 @@ To: """ + member.cn.first().decode("utf-8").encode("ascii", "ignore") + """ <"""
Subject: Votre mot de passe WiFi : residence universitaire Subject: Votre mot de passe WiFi : residence universitaire
Bienvenue dans votre residence etudiante de Paris Sud Bienvenue dans votre residence etudiante de Paris Sud
Votre nom de connexion est : """ + member_uid + """
Votre mot de passe WiFi est : """ + password Votre mot de passe WiFi est : """ + password
message = message.encode("utf-8") message = message.encode("utf-8")

View File

@ -34,8 +34,8 @@
<py:if test="room_ldap is not None"> <py:if test="room_ldap is not None">
<py:for each="target_room in rooms"> <py:for each="target_room in rooms">
<py:choose test="target_room.uid.first()"> <py:choose test="target_room.uid.first()">
<option value="${target_room.uid.first()}" py:when="room_ldap.uid.first()" selected="selected">${target_room.cn.first()} (actuelle)</option> <option value="${target_room.uid.first()}" py:when="room_ldap.uid.first()" selected="selected">${target_room.cn.first()} [BAT-${target_room.area.cn.first()}] (actuelle)</option>
<option value="${target_room.uid.first()}" py:otherwise="">${target_room.cn.first()}</option> <option value="${target_room.uid.first()}" py:otherwise="">${target_room.cn.first()} [BAT-${target_room.area.cn.first()}]</option>
</py:choose> </py:choose>
</py:for> </py:for>
</py:if> </py:if>