Participant edit/new form: Changed default value of gender and type to blank/not specified.
This commit is contained in:
parent
72de1dce74
commit
8d21b8d831
@ -19,7 +19,6 @@ from participant.api import gen_password
|
|||||||
|
|
||||||
class Profile(models.Model):
|
class Profile(models.Model):
|
||||||
GENDER_CHOICES = (
|
GENDER_CHOICES = (
|
||||||
('none', _('Not specified')),
|
|
||||||
('male', _('Male')),
|
('male', _('Male')),
|
||||||
('female', _('Female')),
|
('female', _('Female')),
|
||||||
)
|
)
|
||||||
@ -31,9 +30,9 @@ class Profile(models.Model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
user = models.OneToOneField(User, unique=True, editable=False)
|
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"))
|
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"))
|
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"))
|
firstpassword = models.CharField(max_length=100, null=True, blank=True, verbose_name = _("First Password"))
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<option value="---">-- {%trans "Gender" %}--</option>
|
<option value="---">-- {%trans "Gender" %}--</option>
|
||||||
<option value="male" {% if 'male' in sortfilter.gender %}selected{% endif %}>{%trans "Male" %}</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="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>
|
||||||
<select class="default-input" name="group" onchange="document.forms['filter'].submit()">
|
<select class="default-input" name="group" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {%trans "Group" %}--</option>
|
<option value="---">-- {%trans "Group" %}--</option>
|
||||||
@ -26,6 +26,7 @@
|
|||||||
<option value="observer" {% if 'observer' in sortfilter.type %}selected{% endif %}>{%trans "Observer" %}</option>
|
<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="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="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>
|
||||||
<select class="default-input" name="committee" onchange="document.forms['filter'].submit()">
|
<select class="default-input" name="committee" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {%trans "Committee" %}--</option>
|
<option value="---">-- {%trans "Committee" %}--</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user