Changed the field type for the Person.consent field.

- Legacy-Id: 15146
This commit is contained in:
Henrik Levkowetz 2018-05-17 16:45:21 +00:00
parent 246c348f1e
commit 70ed611472
3 changed files with 6 additions and 3 deletions

View file

@ -94,6 +94,9 @@ def get_person_form(*args, **kwargs):
class Meta:
model = Person
exclude = exclude_list
widgets = {
'consent': forms.widgets.CheckboxInput,
}
def __init__(self, *args, **kwargs):
super(PersonForm, self).__init__(*args, **kwargs)

View file

@ -100,11 +100,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='historicalperson',
name='consent',
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, ),
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'),
),
migrations.AddField(
model_name='person',
name='consent',
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, ),
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'),
),
]

View file

@ -44,7 +44,7 @@ class Person(models.Model):
photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
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.")
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)
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)
def __unicode__(self):
return self.plain_name()