Automated merge with ssh://openslides.org/openslides

This commit is contained in:
rene 2011-11-24 20:24:27 +01:00
commit a2db589272
6 changed files with 11 additions and 7 deletions

View File

@ -41,7 +41,7 @@ PDF:
- [Bugfix] Print available candidates in assignment pdf (#14) - [Bugfix] Print available candidates in assignment pdf (#14)
- [Bugfix] "Show ""undocumented"" for result ""-2"" in application and assignment pdf" (#17) - [Bugfix] "Show ""undocumented"" for result ""-2"" in application and assignment pdf" (#17)
Other: Other:
- [Feature] Rights for anonymous rene enhancement (#45) - [Feature] Rights for anonymous (#45)
- [Feature] Show counter for limited speaking time (#52) - [Feature] Show counter for limited speaking time (#52)
- [Feature] Reorderd config tab subpages (#61) - [Feature] Reorderd config tab subpages (#61)
- [Localize] i18n German: Use gender-specific strings (#51) - [Localize] i18n German: Use gender-specific strings (#51)

View File

@ -177,6 +177,8 @@ def edit(request, application_id=None):
return redirect(reverse('application_view', args=[application.id])) return redirect(reverse('application_view', args=[application.id]))
if application_id is None: if application_id is None:
return redirect(reverse('application_edit', args=[application.id])) return redirect(reverse('application_edit', args=[application.id]))
else:
messages.error(request, _('Please check the form for errors.'))
else: else:
if application_id is None: if application_id is None:
initial = {'text': config_get('application_preamble')} initial = {'text': config_get('application_preamble')}

View File

@ -114,6 +114,8 @@ def edit(request, assignment_id=None):
return redirect(reverse("assignment_overview")) return redirect(reverse("assignment_overview"))
if assignment_id is None: if assignment_id is None:
return redirect(reverse('assignment_edit', args=[assignment.id])) return redirect(reverse('assignment_edit', args=[assignment.id]))
else:
messages.error(request, _('Please check the form for errors.'))
else: else:
form = AssignmentForm(instance=assignment) form = AssignmentForm(instance=assignment)
return { return {

View File

@ -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"))

View File

@ -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>

View File

@ -109,7 +109,7 @@ def get_overview(request):
@template('participant/edit.html') @template('participant/edit.html')
def edit(request, user_id=None): 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: if user_id is not None:
user = User.objects.get(id=user_id) 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") userform = UserEditForm(request.POST, instance=user, prefix="user")
profileform = ProfileForm(request.POST, instance=user.profile, prefix="profile") 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() user = userform.save()
if user_id is None: if user_id is None:
user.username = gen_username(user.first_name, user.last_name) user.username = gen_username(user.first_name, user.last_name)