From 6b24f45e97061a7bafa9af1a7efd21311892bcc4 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Sun, 25 Nov 2012 04:21:51 +0000 Subject: do not display part of the vcard that are disallowed by RFC add new roa detail view, displaying covered routes use {% url %} to get the url instead of hardcoding it in templates add some missing title params to buttons remove edit button from generic object detail modify labels for validation statuses to use the label- suffix required by bootstrap 2.2.x don't use object_detail for the repository_detail view remove stub get_absolute_url() methods where they were previously used as placeholders svn path=/branches/tk329/; revision=4900 --- rpkid/rpki/gui/app/forms.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'rpkid/rpki/gui/app/forms.py') diff --git a/rpkid/rpki/gui/app/forms.py b/rpkid/rpki/gui/app/forms.py index 74874d49..1057ee01 100644 --- a/rpkid/rpki/gui/app/forms.py +++ b/rpkid/rpki/gui/app/forms.py @@ -58,11 +58,6 @@ class GhostbusterRequestForm(forms.ModelForm): parent = forms.ModelChoiceField(queryset=None, required=False, help_text='Specify specific parent, or none for all parents') - # override full_name. it is required in the db schema, but we allow the - # user to skip it and default from family+given name - full_name = forms.CharField(max_length=40, required=False, - help_text='automatically generated from family and given names if left blank') - #override issuer = forms.ModelChoiceField(queryset=None, widget=forms.HiddenInput) @@ -77,14 +72,10 @@ class GhostbusterRequestForm(forms.ModelForm): class Meta: model = models.GhostbusterRequest - exclude = ('vcard') + exclude = ('vcard', 'given_name', 'family_name', 'additional_name', + 'honorific_prefix', 'honorific_suffix') def clean(self): - family_name = self.cleaned_data.get('family_name') - given_name = self.cleaned_data.get('given_name') - if not all([family_name, given_name]): - raise forms.ValidationError('Family and Given names must be specified') - email = self.cleaned_data.get('email_address') postal = self.cleaned_data.get('postal_address') telephone = self.cleaned_data.get('telephone') @@ -92,11 +83,6 @@ class GhostbusterRequestForm(forms.ModelForm): raise forms.ValidationError( 'One of telephone, email or postal address must be specified') - # if the full name is not specified, default to given+family - fn = self.cleaned_data.get('full_name') - if not fn: - self.cleaned_data['full_name'] = '%s %s' % (given_name, family_name) - return self.cleaned_data -- cgit v1.2.3