From b033927cf90652a52ce2d71d95a4572527602d8f Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Sat, 23 Feb 2013 00:19:54 +0000 Subject: add new roa creation form allowing multiple roas to be entered add links for creating roas for IP ranges by automatically splitting the range into prefixes closes #399 closes #420 svn path=/trunk/; revision=5055 --- rpkid/rpki/gui/app/forms.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 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 355f9d2c..1d354521 100644 --- a/rpkid/rpki/gui/app/forms.py +++ b/rpkid/rpki/gui/app/forms.py @@ -159,11 +159,24 @@ class ROARequest(forms.Form): Handles both IPv4 and IPv6.""" prefix = forms.CharField( - widget=forms.TextInput(attrs={'autofocus': 'true', 'size': '50'}) + widget=forms.TextInput(attrs={ + 'autofocus': 'true', 'placeholder': 'Prefix', + 'class': 'span4' + }) + ) + max_prefixlen = forms.CharField( + required=False, + widget=forms.TextInput(attrs={ + 'placeholder': 'Max len', + 'class': 'span1' + }) + ) + asn = forms.IntegerField( + widget=forms.TextInput(attrs={ + 'placeholder': 'ASN', + 'class': 'span1' + }) ) - max_prefixlen = forms.CharField(required=False, - label='Max Prefix Length') - asn = forms.IntegerField(label='AS') confirmed = forms.BooleanField(widget=forms.HiddenInput, required=False) def __init__(self, *args, **kwargs): @@ -173,8 +186,11 @@ class ROARequest(forms.Form): """ conf = kwargs.pop('conf', None) + kwargs['auto_id'] = False super(ROARequest, self).__init__(*args, **kwargs) self.conf = conf + self.inline = True + self.use_table = False def _as_resource_range(self): """Convert the prefix in the form to a -- cgit v1.2.3