diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-02-23 00:19:54 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-02-23 00:19:54 +0000 |
commit | b033927cf90652a52ce2d71d95a4572527602d8f (patch) | |
tree | 4aa1a98ee8ae4777c649b12bfffc0fa4e38bdf28 /rpkid/rpki/gui/app/forms.py | |
parent | 2ccd83627db9c376ad285c0bcea697cbb21b0e09 (diff) |
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
Diffstat (limited to 'rpkid/rpki/gui/app/forms.py')
-rw-r--r-- | rpkid/rpki/gui/app/forms.py | 24 |
1 files changed, 20 insertions, 4 deletions
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 |