c9cab82738ef594edf6f32dd17f3ba4115aff78f
[myslice.git] / portal / forms.py
1 # -*- coding: utf-8 -*-
2 #
3 # portal/forms.py: forms for the portal application
4 # This file is part of the Manifold project.
5 #
6 # Authors:
7 #   Jordan AugĂ© <jordan.auge@lip6.fr>
8 # Copyright 2013, UPMC Sorbonne UniversitĂ©s / LIP6
9 #
10 # This program is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 3, or (at your option) any later version.
13
14 # This program is distributed in the hope that it will be useful, but WITHOUT
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17 # details.
18
19 # You should have received a copy of the GNU General Public License along with
20 # this program; see the file COPYING.  If not, write to the Free Software
21 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 from django import forms
24 from portal.models import PendingUser
25 #from crispy_forms.helper import FormHelper
26 #from crispy_forms.layout import Submit
27
28 class RegisterUserForm(forms.ModelForm):
29 # DEPRECATED #    def __init__(self, *args, **kwargs):
30 # DEPRECATED #        self.helper = FormHelper()
31 # DEPRECATED #        self.helper.form_tag = False
32 # DEPRECATED #        #self.helper.form_id = 'id-exampleForm'
33 # DEPRECATED #        self.helper.form_class = 'blueForms'
34 # DEPRECATED #        self.helper.form_method = 'post'
35 # DEPRECATED #        #self.helper.form_action = 'submit_survey'
36 # DEPRECATED #        self.helper.add_input(Submit('submit', 'Submit'))
37 # DEPRECATED #        super(RegisterUserForm, self).__init__(*args, **kwargs)
38
39     first_name = forms.CharField( widget=forms.TextInput )
40     last_name  = forms.CharField( widget=forms.TextInput )
41     email      = forms.CharField( widget=forms.TextInput )
42     password   = forms.CharField( widget=forms.PasswordInput )
43     password2  = forms.CharField( widget=forms.PasswordInput )
44     keypair    = forms.CharField( widget=forms.FileInput )
45     class Meta:
46         model = PendingUser
47
48 class RegisterUserStep2Form(forms.ModelForm):
49     class Meta:
50         model = PendingUser