forked from DGNum/gestioCOF
Corrige l'ordre des champs du formulaire profil
L'ordre des champs n'était pas définit de façon correcte et donc n'était pas respecté. Fixes #54
This commit is contained in:
parent
7052eaf4b0
commit
fd6b2d68d3
1 changed files with 2 additions and 10 deletions
|
@ -184,14 +184,6 @@ class UserProfileForm(forms.ModelForm):
|
|||
super(UserProfileForm, self).__init__(*args, **kw)
|
||||
self.fields['first_name'].initial = self.instance.user.first_name
|
||||
self.fields['last_name'].initial = self.instance.user.last_name
|
||||
self.fields.keyOrder = [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'phone',
|
||||
'mailing_cof',
|
||||
'mailing_bda',
|
||||
'mailing_bda_revente',
|
||||
]
|
||||
|
||||
def save(self, *args, **kw):
|
||||
super(UserProfileForm, self).save(*args, **kw)
|
||||
|
@ -201,8 +193,8 @@ class UserProfileForm(forms.ModelForm):
|
|||
|
||||
class Meta:
|
||||
model = CofProfile
|
||||
fields = ("phone", "mailing_cof", "mailing_bda",
|
||||
"mailing_bda_revente", )
|
||||
fields = ["first_name", "last_name", "phone", "mailing_cof",
|
||||
"mailing_bda", "mailing_bda_revente"]
|
||||
|
||||
|
||||
class RegistrationUserForm(forms.ModelForm):
|
||||
|
|
Loading…
Reference in a new issue