Skip to content

Commit 70ed611

Browse files
committed
Changed the field type for the Person.consent field.
- Legacy-Id: 15146
1 parent 246c348 commit 70ed611

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

ietf/ietfauth/forms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class PersonForm(forms.ModelForm):
9494
class Meta:
9595
model = Person
9696
exclude = exclude_list
97+
widgets = {
98+
'consent': forms.widgets.CheckboxInput,
99+
}
97100

98101
def __init__(self, *args, **kwargs):
99102
super(PersonForm, self).__init__(*args, **kwargs)

ietf/person/migrations/0003_auto_20180504_1519.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ class Migration(migrations.Migration):
100100
migrations.AddField(
101101
model_name='historicalperson',
102102
name='consent',
103-
field=models.BooleanField(verbose_name=b'I hereby give my consent to the use of the personal details I have provided within the IETF Datatracker', null=True, default=None, ),
103+
field=models.NullBooleanField(default=None, verbose_name=b'I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'),
104104
),
105105
migrations.AddField(
106106
model_name='person',
107107
name='consent',
108-
field=models.BooleanField(verbose_name=b'I hereby give my consent to the use of the personal details I have provided within the IETF Datatracker', null=True, default=None, ),
108+
field=models.NullBooleanField(default=None, verbose_name=b'I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'),
109109
),
110110
]

ietf/person/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Person(models.Model):
4444
photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
4545
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
4646
name_from_draft = models.CharField("Full Name (from submission)", null=True, max_length=255, editable=False, help_text="Name as found in a draft submission.")
47-
consent = models.BooleanField("I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker", null=True, default=None)
47+
consent = models.NullBooleanField("I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker", null=True, default=None)
4848

4949
def __unicode__(self):
5050
return self.plain_name()

0 commit comments

Comments
 (0)