aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui/app/forms.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2012-02-07 14:20:19 +0000
committerMichael Elkins <melkins@tislabs.com>2012-02-07 14:20:19 +0000
commit8fb287710d11618fe638f7ff5ab0e00d1ede2989 (patch)
tree800003f541f4dc696e25029acf9810cbc51c6a19 /rpkid/rpki/gui/app/forms.py
parentde15ee76f0186d06ffad05bdc313315a4b21879b (diff)
make selection of parent in the user creation form optional, with the default being the current user
renamed ChildWizardForm to UserCreateForm renamed template for user creation form svn path=/branches/tk161/; revision=4306
Diffstat (limited to 'rpkid/rpki/gui/app/forms.py')
-rw-r--r--rpkid/rpki/gui/app/forms.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rpkid/rpki/gui/app/forms.py b/rpkid/rpki/gui/app/forms.py
index 2c20ee0f..a2940989 100644
--- a/rpkid/rpki/gui/app/forms.py
+++ b/rpkid/rpki/gui/app/forms.py
@@ -113,14 +113,16 @@ class ImportClientForm(forms.Form):
widget=forms.FileInput(attrs={'class': 'input-file'}))
-class ChildWizardForm(forms.Form):
+class UserCreateForm(forms.Form):
handle = forms.CharField(max_length=30, help_text='handle for new child')
email = forms.CharField(max_length=30,
help_text='email address for new user')
password = forms.CharField(widget=forms.PasswordInput)
password2 = forms.CharField(widget=forms.PasswordInput,
label='Confirm Password')
- parent = forms.ModelChoiceField(queryset=models.Conf.objects.all())
+ parent = forms.ModelChoiceField(required=False,
+ queryset=models.Conf.objects.all(),
+ help_text='optionally make a child of')
def clean_handle(self):
handle = self.cleaned_data.get('handle')