Skip to content

Commit bcc14cb

Browse files
committed
Add a checkbox to the nomination form to indicate permission to nomcom to share the nominator's name with the nominee. Commit ready for merge.
- Legacy-Id: 10002
1 parent 7fef69d commit bcc14cb

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

ietf/nomcom/forms.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
328328
help_text="If you want to get a confirmation mail containing your feedback in cleartext, please check the 'email comments back to me as confirmation'.",
329329
required=False)
330330

331-
fieldsets = [('Candidate Nomination', ('position', 'candidate_name',
331+
fieldsets = [('Candidate Nomination', ('share_nominator','position', 'candidate_name',
332332
'candidate_email', 'candidate_phone', 'comments', 'confirmation'))]
333333

334334
def __init__(self, *args, **kwargs):
@@ -338,7 +338,8 @@ def __init__(self, *args, **kwargs):
338338

339339
super(NominateForm, self).__init__(*args, **kwargs)
340340

341-
fieldset = ['position',
341+
fieldset = ['share_nominator',
342+
'position',
342343
'candidate_name',
343344
'candidate_email', 'candidate_phone',
344345
'comments']
@@ -357,6 +358,9 @@ def __init__(self, *args, **kwargs):
357358
nomination wishes to be anonymous. The confirmation email will be sent to the address given here,
358359
and the address will also be captured as part of the registered nomination.)"""
359360
self.fields['nominator_email'].help_text = help_text
361+
self.fields['share_nominator'].help_text = """(Nomcom Chair/Member: Check this box if the person providing this nomination
362+
has indicated they will allow NomCom to share their name as one of the people
363+
nominating this candidate."""
360364
else:
361365
fieldset.append('confirmation')
362366

@@ -371,6 +375,7 @@ def save(self, commit=True):
371375
position = self.cleaned_data['position']
372376
comments = self.cleaned_data['comments']
373377
confirmation = self.cleaned_data['confirmation']
378+
share_nominator = self.cleaned_data['share_nominator']
374379
nomcom_template_path = '/nomcom/%s/' % self.nomcom.group.acronym
375380

376381
author = None
@@ -397,6 +402,7 @@ def save(self, commit=True):
397402

398403
nomination.nominee = nominee
399404
nomination.comments = feedback
405+
nomination.share_nominator = share_nominator
400406
nomination.user = self.user
401407

402408
if commit:
@@ -418,7 +424,7 @@ def save(self, commit=True):
418424

419425
class Meta:
420426
model = Nomination
421-
fields = ('position', 'nominator_email', 'candidate_name',
427+
fields = ('share_nominator', 'position', 'nominator_email', 'candidate_name',
422428
'candidate_email', 'candidate_phone')
423429

424430

ietf/nomcom/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ class Nomination(models.Model):
7777
nominator_email = models.EmailField(verbose_name='Nominator Email', blank=True)
7878
user = models.ForeignKey(User, editable=False)
7979
time = models.DateTimeField(auto_now_add=True)
80+
share_nominator = models.BooleanField(verbose_name='Share nominator name with candidate', default=False,
81+
help_text='Check this box to allow the NomCom to let the '
82+
'person you are nominating know that you were '
83+
'one of the people who nominated them. If you '
84+
'do not check this box, your name will be confidential '
85+
'and known only within NomCom.')
8086

8187
class Meta:
8288
verbose_name_plural = 'Nominations'

ietf/templates/nomcom/view_feedback_nominee.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ <h2>Feedback about {{ nominee }} </h2>
2424
{% if forloop.first %}<p></p>{% else %}<hr>{% endif %}
2525
<dl class="dl-horizontal">
2626
<dt>From</dt>
27-
<dd>{{ feedback.author|formatted_email|default:"Anonymous" }}</dd>
27+
<dd>{{ feedback.author|formatted_email|default:"Anonymous" }}
28+
{% if ft.slug == "nomina" and feedback.nomination_set.first.share_nominator %}
29+
<span class="bg-info"> OK to share name with nominee</span>
30+
{% endif %}
31+
</dd>
2832
<dt>Date</dt>
2933
<dd>{{ feedback.time|date:"Y-m-d" }})</dd>
3034

0 commit comments

Comments
 (0)