From: Jordan Augé Date: Wed, 3 Jul 2013 08:42:28 +0000 (+0200) Subject: portal: updated forms and templates X-Git-Tag: myslice-0.2-1~112 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=ccfbca0b86db1fcc23aa65402f4b56d87d016f6e portal: updated forms and templates --- diff --git a/portal/forms.py b/portal/forms.py index 2b304cc5..9d700017 100644 --- a/portal/forms.py +++ b/portal/forms.py @@ -2,27 +2,26 @@ from django import forms from portal.models import PendingUser -from crispy_forms.helper import FormHelper -from crispy_forms.layout import Submit +#from crispy_forms.helper import FormHelper +#from crispy_forms.layout import Submit class RegisterUserForm(forms.ModelForm): - def __init__(self, *args, **kwargs): - self.helper = FormHelper() - self.helper.form_tag = False - #self.helper.form_id = 'id-exampleForm' - self.helper.form_class = 'blueForms' - self.helper.form_method = 'post' - #self.helper.form_action = 'submit_survey' - self.helper.add_input(Submit('submit', 'Submit')) - super(RegisterUserForm, self).__init__(*args, **kwargs) +# DEPRECATED # def __init__(self, *args, **kwargs): +# DEPRECATED # self.helper = FormHelper() +# DEPRECATED # self.helper.form_tag = False +# DEPRECATED # #self.helper.form_id = 'id-exampleForm' +# DEPRECATED # self.helper.form_class = 'blueForms' +# DEPRECATED # self.helper.form_method = 'post' +# DEPRECATED # #self.helper.form_action = 'submit_survey' +# DEPRECATED # self.helper.add_input(Submit('submit', 'Submit')) +# DEPRECATED # super(RegisterUserForm, self).__init__(*args, **kwargs) first_name = forms.CharField( widget=forms.TextInput ) last_name = forms.CharField( widget=forms.TextInput ) email = forms.CharField( widget=forms.TextInput ) password = forms.CharField( widget=forms.PasswordInput ) password2 = forms.CharField( widget=forms.PasswordInput ) - keypair = forms.CharField( widget=forms.PasswordInput ) - #keypair = forms.CharField( widget=forms.FileInput ) + keypair = forms.CharField( widget=forms.FileInput ) class Meta: model = PendingUser diff --git a/portal/templates/register_user.html b/portal/templates/register_user.html index cc3fce0b..4c730757 100644 --- a/portal/templates/register_user.html +++ b/portal/templates/register_user.html @@ -1,7 +1,5 @@ {% extends "layout-unfold1.html" %} {% load i18n %} -{% load crispy_forms_tags %} - {% block head %} {{ wizard.form.media }}