Utilisation de CotisationComputes.is_old_member pour getemails et déplacement de getemails dans l'onglet membres.
This commit is contained in:
parent
11c212be38
commit
13ec71ac2f
@ -22,9 +22,8 @@ class GetEmailsController(AuthenticatedBaseController):
|
||||
residence_dn = Residences.get_dn_by_name(self.user, residence_name)
|
||||
members = Member.get_all(self.user, residence_dn)
|
||||
emails = []
|
||||
current_year = CotisationComputes.current_year()
|
||||
for member in members:
|
||||
if len(Cotisation.cotisations_of_member(self.user, member.dn, current_year)) > 0:
|
||||
if not CotisationComputes.is_old_member(member, self.user, residence_dn):
|
||||
emails.append(member.mail.first())
|
||||
#end if
|
||||
#end for
|
||||
|
@ -60,6 +60,7 @@ def disconnect_members_from_residence(admin_user, residence_dn):
|
||||
if ip is not None:
|
||||
taken_attribute = ip.get("x-taken").first()
|
||||
if taken_attribute is not None:
|
||||
print ("[LOG] deleting taken_attribute")
|
||||
admin_user.ldap_bind.delete_attr(ip.dn, IpReservation.taken_attr(taken_attribute))
|
||||
#end if
|
||||
#end if
|
||||
|
@ -38,11 +38,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<form action="/getemails/" method="post" class="inline_block">
|
||||
<input type="hidden" name="residence" value="${residence}"/>
|
||||
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<body>
|
||||
<xi:include href="navbar.html" />
|
||||
<div class="section" >
|
||||
<span class="section_name show_section_name">Adresses mails des adhérents de ${residence}</span>
|
||||
<span class="section_name show_section_name">Adresses mails des adhérents ${residence}</span>
|
||||
<div py:for="email in emails">
|
||||
${email}<br />
|
||||
</div>
|
||||
|
@ -8,7 +8,13 @@
|
||||
</head>
|
||||
<body>
|
||||
<xi:include href="navbar.html" />
|
||||
<table class="table table-hover">
|
||||
<div class="section">
|
||||
<form action="/getemails/" method="post" class="inline_block">
|
||||
<input type="hidden" name="residence" value="${residence}"/>
|
||||
<input type="submit" value="Récupérer toutes les adresses mails" class="button"/>
|
||||
</form>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>membre</th>
|
||||
<th>chambre</th>
|
||||
|
Loading…
Reference in New Issue
Block a user