2019-02-02 15:01:18 +00:00
|
|
|
from django import forms
|
|
|
|
|
|
|
|
from .models import Organization
|
|
|
|
|
|
|
|
class NetworkForm(forms.Form):
|
|
|
|
name = forms.CharField(label="Common Name", max_length=64)
|
|
|
|
intip = forms.GenericIPAddressField(label="Internal IP Address", protocol="ipv4")
|
|
|
|
extip = forms.GenericIPAddressField(label="External IP Address", protocol="ipv4")
|
|
|
|
orgas = forms.MultipleChoiceField(label="Assigned Organizations", choices=[(orga.id, str(orga)) for orga in Organization.objects.all()])
|
2019-02-03 09:51:02 +00:00
|
|
|
|
|
|
|
class OrgaForm(forms.Form):
|
|
|
|
name = forms.CharField(label="Common Name", max_length=64)
|
|
|
|
users = forms.IntegerField(label="User Limit", required=False)
|