diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index a65d10997..0c1e1f969 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -433,8 +433,8 @@ class AssignmentPDF(PDFView): candidate_string = candidate.clean_name if candidate in elected_candidates: candidate_string = "* " + candidate_string - if candidate.category: - candidate_string += "\n(%s)" % candidate.category + if candidate.name_suffix: + candidate_string += "\n(%s)" % candidate.name_suffix row.append(candidate_string) for vote in poll_list: if vote == None: @@ -594,7 +594,7 @@ class AssignmentPollPDF(PDFView): cell.append(Paragraph(circle + candidate.clean_name, stylesheet['Ballot_option_name'])) if candidate.name_suffix: - cell.append(Paragraph("(%s)" % candidate.category, + cell.append(Paragraph("(%s)" % candidate.name_suffix, stylesheet['Ballot_option_group_right'])) else: cell.append(Paragraph(" ", diff --git a/openslides/participant/forms.py b/openslides/participant/forms.py index 4687432fe..153285d8f 100644 --- a/openslides/participant/forms.py +++ b/openslides/participant/forms.py @@ -27,7 +27,7 @@ class UserCreateForm(forms.ModelForm, CssClassMixin): class Meta: model = User - fields = ('first_name', 'last_name', 'is_active', 'groups', 'category', + fields = ('first_name', 'last_name', 'is_active', 'groups', 'detail', 'gender', 'type', 'committee', 'comment', 'default_password') @@ -35,7 +35,7 @@ class UserUpdateForm(UserCreateForm): class Meta: model = User fields = ('username', 'first_name', 'last_name', 'is_active', 'groups', - 'category', 'gender', 'type', 'committee', 'comment', + 'detail', 'gender', 'type', 'committee', 'comment', 'default_password') diff --git a/openslides/participant/models.py b/openslides/participant/models.py index 2cce07709..cabb54b7a 100644 --- a/openslides/participant/models.py +++ b/openslides/participant/models.py @@ -37,8 +37,8 @@ class User(DjangoUser, PersonMixin, Person): ) django_user = models.OneToOneField(DjangoUser, editable=False, parent_link=True) - category = models.CharField( - max_length=100, null=True, blank=True, verbose_name=_("Category"), + detail = models.CharField( + max_length=100, blank=True, default='', verbose_name=_("Detail"), help_text=_('Will be shown behind the name.')) gender = models.CharField( max_length=50, choices=GENDER_CHOICES, blank=True, @@ -47,13 +47,13 @@ class User(DjangoUser, PersonMixin, Person): max_length=100, choices=TYPE_CHOICES, blank=True, verbose_name=_("Typ"), help_text=_('Only for filter the userlist.')) committee = models.CharField( - max_length=100, null=True, blank=True, verbose_name=_("Committee"), + max_length=100, blank=True, default='', verbose_name=_("Committee"), help_text=_('Only for filter the userlist.')) comment = models.TextField( - null=True, blank=True, verbose_name=_('Comment'), + blank=True, default='', verbose_name=_('Comment'), help_text=_('Only for notes.')) default_password = models.CharField( - max_length=100, null=True, blank=True, + max_length=100, blank=True, default='', verbose_name=_("Default password")) @property @@ -61,10 +61,10 @@ class User(DjangoUser, PersonMixin, Person): return self.get_full_name() or self.username def get_name_suffix(self): - return self.category + return self.detail def set_name_suffix(self, value): - self.category = value + self.detail = value name_suffix = property(get_name_suffix, set_name_suffix) diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index 452bdcb53..f950bc302 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -26,11 +26,11 @@ - + + {% for detail in details %} + {% endfor %}