portal: added slice request forms
[unfold.git] / portal / forms.py
index 9d70001..43be698 100644 (file)
@@ -1,11 +1,31 @@
-#-*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
+#
+# portal/forms.py: forms for the portal application
+# This file is part of the Manifold project.
+#
+# Authors:
+#   Jordan AugĂ© <jordan.auge@lip6.fr>
+# Copyright 2013, UPMC Sorbonne UniversitĂ©s / LIP6
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3, or (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+# 
+# You should have received a copy of the GNU General Public License along with
+# this program; see the file COPYING.  If not, write to the Free Software
+# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 from django import forms
-from portal.models import PendingUser
+from portal.models import PendingUser, PendingSlice
 #from crispy_forms.helper import FormHelper
 #from crispy_forms.layout import Submit
 
-class RegisterUserForm(forms.ModelForm):
+class UserRegisterForm(forms.ModelForm):
 # DEPRECATED #    def __init__(self, *args, **kwargs):
 # DEPRECATED #        self.helper = FormHelper()
 # DEPRECATED #        self.helper.form_tag = False
@@ -25,6 +45,11 @@ class RegisterUserForm(forms.ModelForm):
     class Meta:
         model = PendingUser
 
-class RegisterUserStep2Form(forms.ModelForm):
+class SliceRequestForm(forms.ModelForm):
+    slice_name = forms.CharField( widget=forms.TextInput )
     class Meta:
-        model = PendingUser
+        model = PendingSlice
+
+# DEPRECATED #class RegisterUserStep2Form(forms.ModelForm):
+# DEPRECATED #    class Meta:
+# DEPRECATED #        model = PendingUser