summaryrefslogtreecommitdiff
path: root/coip/apps/name/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'coip/apps/name/forms.py')
-rw-r--r--coip/apps/name/forms.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/coip/apps/name/forms.py b/coip/apps/name/forms.py
index 62c6fb5..47c7795 100644
--- a/coip/apps/name/forms.py
+++ b/coip/apps/name/forms.py
@@ -4,7 +4,8 @@ Created on Jun 24, 2010
@author: leifj
'''
from django import forms
-from coip.apps.name.models import Name, Attribute
+from coip.apps.name.models import Name, Attribute, NameLink
+from django.forms.fields import BooleanField
class NameForm(forms.ModelForm):
class Meta:
@@ -17,4 +18,21 @@ class AttributeForm(forms.ModelForm):
class NameEditForm(forms.ModelForm):
class Meta:
model = Name
- fields = ['short','description'] \ No newline at end of file
+ fields = ['short','description']
+
+class NewNameForm(forms.ModelForm):
+ class Meta:
+ model = Name
+ fields = ['type','value','short','description']
+
+class NameDeleteForm(forms.Form):
+ recursive = BooleanField(label="Also delete all nodes below this node?",required=False)
+ confirm = BooleanField(label="Confirm")
+
+class NameLinkForm(forms.ModelForm):
+ class Meta:
+ model = NameLink
+ fields = ['dst','type','data']
+
+class NameLinkDeleteForm(forms.Form):
+ confirm = BooleanField(label="Confirm") \ No newline at end of file