Participant edit/new form: Changed default value of gender and type to blank/not specified.

This commit is contained in:
Emanuel Schuetze 2011-11-24 19:51:16 +01:00
parent 72de1dce74
commit 8d21b8d831
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,6 @@ from participant.api import gen_password
class Profile(models.Model):
GENDER_CHOICES = (
('none', _('Not specified')),
('male', _('Male')),
('female', _('Female')),
)
@ -31,9 +30,9 @@ class Profile(models.Model):
)
user = models.OneToOneField(User, unique=True, editable=False)
gender = models.CharField(max_length=50, choices=GENDER_CHOICES, default='none', verbose_name = _("Gender"))
gender = models.CharField(max_length=50, choices=GENDER_CHOICES, blank=True, verbose_name = _("Gender"))
group = models.CharField(max_length=100, null=True, blank=True, verbose_name = _("Group"))
type = models.CharField(max_length=100, choices=TYPE_CHOICE, default='guest', verbose_name = _("Typ"))
type = models.CharField(max_length=100, choices=TYPE_CHOICE, blank=True, verbose_name = _("Typ"))
committee = models.CharField(max_length=100, null=True, blank=True, verbose_name = _("Committee"))
firstpassword = models.CharField(max_length=100, null=True, blank=True, verbose_name = _("First Password"))

View File

@ -11,7 +11,7 @@
<option value="---">-- {%trans "Gender" %}--</option>
<option value="male" {% if 'male' in sortfilter.gender %}selected{% endif %}>{%trans "Male" %}</option>
<option value="female" {% if 'female' in sortfilter.gender %}selected{% endif %}>{%trans "Female" %}</option>
<option value="none" {% if 'none' in sortfilter.gender %}selected{% endif %}>{%trans "Not specified" %}</option>
<option value="" {% if '' in sortfilter.gender %}selected{% endif %}>{%trans "Not specified" %}</option>
</select>
<select class="default-input" name="group" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Group" %}--</option>
@ -26,6 +26,7 @@
<option value="observer" {% if 'observer' in sortfilter.type %}selected{% endif %}>{%trans "Observer" %}</option>
<option value="staff" {% if 'staff' in sortfilter.type %}selected{% endif %}>{%trans "Staff" %}</option>
<option value="guest" {% if 'guest' in sortfilter.type %}selected{% endif %}>{%trans "Guest" %}</option>
<option value="" {% if '' in sortfilter.type %}selected{% endif %}>{%trans "Not specified" %}</option>
</select>
<select class="default-input" name="committee" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Committee" %}--</option>