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
This commit is contained in:
parent
7fef69daa5
commit
bcc14cb0d1
|
@ -328,7 +328,7 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
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'.",
|
||||
required=False)
|
||||
|
||||
fieldsets = [('Candidate Nomination', ('position', 'candidate_name',
|
||||
fieldsets = [('Candidate Nomination', ('share_nominator','position', 'candidate_name',
|
||||
'candidate_email', 'candidate_phone', 'comments', 'confirmation'))]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -338,7 +338,8 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
|
||||
super(NominateForm, self).__init__(*args, **kwargs)
|
||||
|
||||
fieldset = ['position',
|
||||
fieldset = ['share_nominator',
|
||||
'position',
|
||||
'candidate_name',
|
||||
'candidate_email', 'candidate_phone',
|
||||
'comments']
|
||||
|
@ -357,6 +358,9 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
nomination wishes to be anonymous. The confirmation email will be sent to the address given here,
|
||||
and the address will also be captured as part of the registered nomination.)"""
|
||||
self.fields['nominator_email'].help_text = help_text
|
||||
self.fields['share_nominator'].help_text = """(Nomcom Chair/Member: Check this box if the person providing this nomination
|
||||
has indicated they will allow NomCom to share their name as one of the people
|
||||
nominating this candidate."""
|
||||
else:
|
||||
fieldset.append('confirmation')
|
||||
|
||||
|
@ -371,6 +375,7 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
position = self.cleaned_data['position']
|
||||
comments = self.cleaned_data['comments']
|
||||
confirmation = self.cleaned_data['confirmation']
|
||||
share_nominator = self.cleaned_data['share_nominator']
|
||||
nomcom_template_path = '/nomcom/%s/' % self.nomcom.group.acronym
|
||||
|
||||
author = None
|
||||
|
@ -397,6 +402,7 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
|
||||
nomination.nominee = nominee
|
||||
nomination.comments = feedback
|
||||
nomination.share_nominator = share_nominator
|
||||
nomination.user = self.user
|
||||
|
||||
if commit:
|
||||
|
@ -418,7 +424,7 @@ class NominateForm(BaseNomcomForm, forms.ModelForm):
|
|||
|
||||
class Meta:
|
||||
model = Nomination
|
||||
fields = ('position', 'nominator_email', 'candidate_name',
|
||||
fields = ('share_nominator', 'position', 'nominator_email', 'candidate_name',
|
||||
'candidate_email', 'candidate_phone')
|
||||
|
||||
|
||||
|
|
|
@ -77,6 +77,12 @@ class Nomination(models.Model):
|
|||
nominator_email = models.EmailField(verbose_name='Nominator Email', blank=True)
|
||||
user = models.ForeignKey(User, editable=False)
|
||||
time = models.DateTimeField(auto_now_add=True)
|
||||
share_nominator = models.BooleanField(verbose_name='Share nominator name with candidate', default=False,
|
||||
help_text='Check this box to allow the NomCom to let the '
|
||||
'person you are nominating know that you were '
|
||||
'one of the people who nominated them. If you '
|
||||
'do not check this box, your name will be confidential '
|
||||
'and known only within NomCom.')
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = 'Nominations'
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
{% if forloop.first %}<p></p>{% else %}<hr>{% endif %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>From</dt>
|
||||
<dd>{{ feedback.author|formatted_email|default:"Anonymous" }}</dd>
|
||||
<dd>{{ feedback.author|formatted_email|default:"Anonymous" }}
|
||||
{% if ft.slug == "nomina" and feedback.nomination_set.first.share_nominator %}
|
||||
<span class="bg-info"> OK to share name with nominee</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt>Date</dt>
|
||||
<dd>{{ feedback.time|date:"Y-m-d" }})</dd>
|
||||
|
||||
|
|
Loading…
Reference in a new issue