From 511ee7298d86d82dcefd1264626fa86e138c8ad4 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Thu, 24 Nov 2011 19:41:07 +0100 Subject: [PATCH 1/3] Changed typo. --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index e24e605c2..f5681cce6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,7 +41,7 @@ PDF: - [Bugfix] Print available candidates in assignment pdf (#14) - [Bugfix] "Show ""undocumented"" for result ""-2"" in application and assignment pdf" (#17) Other: -- [Feature] Rights for anonymous rene enhancement (#45) +- [Feature] Rights for anonymous (#45) - [Feature] Show counter for limited speaking time (#52) - [Feature] Reorderd config tab subpages (#61) - [Localize] i18n German: Use gender-specific strings (#51) From 72de1dce744f993224fbc72ec3fb2daaa1f8111a Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Thu, 24 Nov 2011 19:42:32 +0100 Subject: [PATCH 2/3] Fixed missing form invalid error message. --- openslides/application/views.py | 2 ++ openslides/assignment/views.py | 2 ++ openslides/participant/views.py | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openslides/application/views.py b/openslides/application/views.py index 827f1fcf6..d520e3548 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -176,6 +176,8 @@ def edit(request, application_id=None): return redirect(reverse('application_view', args=[application.id])) if application_id is None: return redirect(reverse('application_edit', args=[application.id])) + else: + messages.error(request, _('Please check the form for errors.')) else: if application_id is None: initial = {'text': config_get('application_preamble')} diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index f8d6047e5..9c06ac1b4 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -114,6 +114,8 @@ def edit(request, assignment_id=None): return redirect(reverse("assignment_overview")) if assignment_id is None: return redirect(reverse('assignment_edit', args=[assignment.id])) + else: + messages.error(request, _('Please check the form for errors.')) else: form = AssignmentForm(instance=assignment) return { diff --git a/openslides/participant/views.py b/openslides/participant/views.py index d6bcb71db..74a076725 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -109,7 +109,7 @@ def get_overview(request): @template('participant/edit.html') def edit(request, user_id=None): """ - View zum editieren und neuanlegen von Usern mit Profile + View to create and edit users with profile. """ if user_id is not None: user = User.objects.get(id=user_id) @@ -124,7 +124,7 @@ def edit(request, user_id=None): userform = UserEditForm(request.POST, instance=user, prefix="user") profileform = ProfileForm(request.POST, instance=user.profile, prefix="profile") - if userform.is_valid and profileform.is_valid: + if userform.is_valid() and profileform.is_valid(): user = userform.save() if user_id is None: user.username = gen_username(user.first_name, user.last_name) From 8d21b8d831e676753da7f52c565a56077e35decb Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Thu, 24 Nov 2011 19:51:16 +0100 Subject: [PATCH 3/3] Participant edit/new form: Changed default value of gender and type to blank/not specified. --- openslides/participant/models.py | 5 ++--- openslides/participant/templates/participant/overview.html | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openslides/participant/models.py b/openslides/participant/models.py index 219fa4f01..32c06d3a3 100644 --- a/openslides/participant/models.py +++ b/openslides/participant/models.py @@ -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")) diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index a6475d2ed..978d2acb7 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -11,7 +11,7 @@ - +