From 90a048eb442a2eb257ad492c79367dbf425fd4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20A=2E=20S=C3=A1nchez=20L=C3=B3pez?= Date: Mon, 29 Nov 2010 18:34:19 +0000 Subject: [PATCH] Added the diferent emails when a delegate does not have a system user/password. Fixes #557 - Legacy-Id: 2692 --- .../wgchairs/notexistsdelegate_delegate_email.txt | 9 +++++++++ .../notexistsdelegate_secretariat_email.txt | 14 ++++++++++++++ .../wgchairs/notexistsdelegate_wgchairs_email.txt | 11 +++++++++++ ietf/wgchairs/forms.py | 8 ++++++-- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 ietf/templates/wgchairs/notexistsdelegate_delegate_email.txt create mode 100644 ietf/templates/wgchairs/notexistsdelegate_secretariat_email.txt create mode 100644 ietf/templates/wgchairs/notexistsdelegate_wgchairs_email.txt diff --git a/ietf/templates/wgchairs/notexistsdelegate_delegate_email.txt b/ietf/templates/wgchairs/notexistsdelegate_delegate_email.txt new file mode 100644 index 000000000..a79680663 --- /dev/null +++ b/ietf/templates/wgchairs/notexistsdelegate_delegate_email.txt @@ -0,0 +1,9 @@ +{{ chair }} as a WG Chair of {{ wg }} wants to add you as a {{ wg }} WG Delegate. + +You don't have an user/password to log into the datatracker so you must contact +the Secretariat at iesg-secretary@ietf.org in order to get your credentials. + +When you get your credentials, please inform {{ chair }} at +{{ chair.email.1 }} so he/she can finish the designate process. + +Thank you. diff --git a/ietf/templates/wgchairs/notexistsdelegate_secretariat_email.txt b/ietf/templates/wgchairs/notexistsdelegate_secretariat_email.txt new file mode 100644 index 000000000..d3d2b3d91 --- /dev/null +++ b/ietf/templates/wgchairs/notexistsdelegate_secretariat_email.txt @@ -0,0 +1,14 @@ +{{ chair }} as a WG Chair of {{ wg }} wants to add a person with email +{{ delegate_email }} as a WG Delegate. + +This person don't have an user/password to log into the datatracker so +an email has been seent to {{ delegate_email }} in order to he/she contacs the +Secretariat to request his/her credentials. + +{% if delegate_persons %} +Please, note that the following persons with {{ delegate_email }} email address +already exists in the system but they can not log in. +{% for person in delegate_persons %} +{{ person.pk }} - {{ person }} +{% endfor %} +{% endif %} diff --git a/ietf/templates/wgchairs/notexistsdelegate_wgchairs_email.txt b/ietf/templates/wgchairs/notexistsdelegate_wgchairs_email.txt new file mode 100644 index 000000000..fc9a19022 --- /dev/null +++ b/ietf/templates/wgchairs/notexistsdelegate_wgchairs_email.txt @@ -0,0 +1,11 @@ +{{ chair }} as a WG Chair of {{ wg }} wants to add a person with email +{{ delegate_email }} as a WG Delegate. + +This person don't have an user/password to log into the datatracker so +an email has been seent to {{ delegate_email }} in order to he/she contacs the +Secretariat to request his/her credentials. + +When he/she gets her credentials then he/she will send an email to +{{ chair }} at {{ chair.email.1 }}. + +{{ chair }} could then assign this person as WG Delegate. diff --git a/ietf/wgchairs/forms.py b/ietf/wgchairs/forms.py index 39903e73b..b41960c19 100644 --- a/ietf/wgchairs/forms.py +++ b/ietf/wgchairs/forms.py @@ -116,6 +116,7 @@ class NotExistDelegateForm(MultipleDelegateForm): def __init__(self, *args, **kwargs): super(NotExistDelegateForm, self).__init__(*args, **kwargs) self.email_list = [] + del(self.fields['persons']) def get_email_list(self): if self.email_list: @@ -128,7 +129,8 @@ class NotExistDelegateForm(MultipleDelegateForm): def as_p(self): email_list = self.get_email_list() - return render_to_string('wgchairs/notexistdelegate.html', {'email_list': email_list}) + info = render_to_string('wgchairs/notexistdelegate.html', {'email_list': email_list}) + return info + super(NotExistDelegateForm, self).as_p() def send_email(self, email, template): subject = 'WG Delegate needs system credentials' @@ -137,12 +139,14 @@ class NotExistDelegateForm(MultipleDelegateForm): {'chair': get_person_for_user(self.user), 'delegate_email': self.email, 'delegate_persons': persons, + 'wg': self.wg, }) mail = EmailMessage(subject=subject, body=body, to=email, from_email=settings.DEFAULT_FROM_EMAIL) - return mail + mail.send() + def send_email_to_delegate(self, email): self.send_email(email, 'wgchairs/notexistsdelegate_delegate_email.txt')