forked from DGNum/gestioCOF
Merge branch 'aureplop/194-kfet_edit-account' into 'master'
kfet -- As a kfet staff, remove the requirement to… Closes #194 See merge request cof-geek/gestioCOF!303
This commit is contained in:
commit
e515a55956
1 changed files with 11 additions and 5 deletions
|
@ -75,14 +75,19 @@ class AccountRestrictForm(AccountForm):
|
|||
class Meta(AccountForm.Meta):
|
||||
fields = ['is_frozen']
|
||||
|
||||
|
||||
class AccountPwdForm(forms.Form):
|
||||
pwd1 = forms.CharField(
|
||||
label="Mot de passe K-Fêt",
|
||||
required=False,
|
||||
help_text="Le mot de passe doit contenir au moins huit caractères",
|
||||
widget=forms.PasswordInput)
|
||||
widget=forms.PasswordInput,
|
||||
)
|
||||
pwd2 = forms.CharField(
|
||||
label="Confirmer le mot de passe",
|
||||
widget=forms.PasswordInput)
|
||||
required=False,
|
||||
widget=forms.PasswordInput,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
pwd1 = self.cleaned_data.get('pwd1', '')
|
||||
|
@ -93,6 +98,7 @@ class AccountPwdForm(forms.Form):
|
|||
raise ValidationError("Les mots de passes sont différents")
|
||||
super().clean()
|
||||
|
||||
|
||||
class CofForm(forms.ModelForm):
|
||||
def clean_is_cof(self):
|
||||
instance = getattr(self, 'instance', None)
|
||||
|
|
Loading…
Reference in a new issue