X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fforms.py;h=dc30299970ab7f8a976de0e6b593b4c4e9d2ee50;hb=70e029436057b8a734c2b943ab2de8069b1fbd6a;hp=c02d11ef98a7e09d6aca3a83f160f0fa70eba3be;hpb=05d26756d7e7f254d5631a0649aeac5fd3a58ca8;p=patchwork diff --git a/apps/patchwork/forms.py b/apps/patchwork/forms.py index c02d11e..dc30299 100644 --- a/apps/patchwork/forms.py +++ b/apps/patchwork/forms.py @@ -44,6 +44,11 @@ class RegistrationForm(RegistrationFormUniqueEmail): user.first_name = self.cleaned_data.get('first_name', '') user.last_name = self.cleaned_data.get('last_name', '') user.save() + + # saving the userprofile causes the firstname/lastname to propagate + # to the person objects. + user.get_profile().save() + return user def clean(self): @@ -75,6 +80,11 @@ class CreateBundleForm(forms.ModelForm): % name) return name +class DeleteBundleForm(forms.Form): + name = 'deletebundleform' + form_name = forms.CharField(initial = name, widget = forms.HiddenInput) + bundle_id = forms.IntegerField(widget = forms.HiddenInput) + class DelegateField(forms.ModelChoiceField): def __init__(self, project, *args, **kwargs): queryset = User.objects.filter(userprofile__in = \