Skip to content

Commit 90a048e

Browse files
committed
Added the diferent emails when a delegate does not have a system user/password. Fixes ietf-tools#557
- Legacy-Id: 2692
1 parent 0821250 commit 90a048e

4 files changed

Lines changed: 40 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ chair }} as a WG Chair of {{ wg }} wants to add you as a {{ wg }} WG Delegate.
2+
3+
You don't have an user/password to log into the datatracker so you must contact
4+
the Secretariat at iesg-secretary@ietf.org in order to get your credentials.
5+
6+
When you get your credentials, please inform {{ chair }} at
7+
{{ chair.email.1 }} so he/she can finish the designate process.
8+
9+
Thank you.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ chair }} as a WG Chair of {{ wg }} wants to add a person with email
2+
{{ delegate_email }} as a WG Delegate.
3+
4+
This person don't have an user/password to log into the datatracker so
5+
an email has been seent to {{ delegate_email }} in order to he/she contacs the
6+
Secretariat to request his/her credentials.
7+
8+
{% if delegate_persons %}
9+
Please, note that the following persons with {{ delegate_email }} email address
10+
already exists in the system but they can not log in.
11+
{% for person in delegate_persons %}
12+
{{ person.pk }} - {{ person }}
13+
{% endfor %}
14+
{% endif %}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ chair }} as a WG Chair of {{ wg }} wants to add a person with email
2+
{{ delegate_email }} as a WG Delegate.
3+
4+
This person don't have an user/password to log into the datatracker so
5+
an email has been seent to {{ delegate_email }} in order to he/she contacs the
6+
Secretariat to request his/her credentials.
7+
8+
When he/she gets her credentials then he/she will send an email to
9+
{{ chair }} at {{ chair.email.1 }}.
10+
11+
{{ chair }} could then assign this person as WG Delegate.

ietf/wgchairs/forms.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class NotExistDelegateForm(MultipleDelegateForm):
116116
def __init__(self, *args, **kwargs):
117117
super(NotExistDelegateForm, self).__init__(*args, **kwargs)
118118
self.email_list = []
119+
del(self.fields['persons'])
119120

120121
def get_email_list(self):
121122
if self.email_list:
@@ -128,7 +129,8 @@ def get_email_list(self):
128129

129130
def as_p(self):
130131
email_list = self.get_email_list()
131-
return render_to_string('wgchairs/notexistdelegate.html', {'email_list': email_list})
132+
info = render_to_string('wgchairs/notexistdelegate.html', {'email_list': email_list})
133+
return info + super(NotExistDelegateForm, self).as_p()
132134

133135
def send_email(self, email, template):
134136
subject = 'WG Delegate needs system credentials'
@@ -137,12 +139,14 @@ def send_email(self, email, template):
137139
{'chair': get_person_for_user(self.user),
138140
'delegate_email': self.email,
139141
'delegate_persons': persons,
142+
'wg': self.wg,
140143
})
141144
mail = EmailMessage(subject=subject,
142145
body=body,
143146
to=email,
144147
from_email=settings.DEFAULT_FROM_EMAIL)
145-
return mail
148+
mail.send()
149+
146150

147151
def send_email_to_delegate(self, email):
148152
self.send_email(email, 'wgchairs/notexistsdelegate_delegate_email.txt')

0 commit comments

Comments
 (0)