Idem for account_update

This commit is contained in:
Ludovic Stephan 2017-03-30 21:31:16 -03:00
parent c1b8849cb8
commit 20561eb515
2 changed files with 10 additions and 2 deletions

View file

@ -74,8 +74,10 @@ class AccountRestrictForm(AccountForm):
class AccountPwdForm(forms.Form):
pwd1 = forms.CharField(
label="Mot de passe K-Fêt",
widget=forms.PasswordInput)
pwd2 = forms.CharField(
label="Confirmer le mot de passe",
widget=forms.PasswordInput)
def clean(self):
@ -128,6 +130,7 @@ class UserRestrictTeamForm(UserForm):
class UserGroupForm(forms.ModelForm):
groups = forms.ModelMultipleChoiceField(
Group.objects.filter(name__icontains='K-Fêt'),
label='Statut équipe',
required=False)
def clean_groups(self):

View file

@ -40,7 +40,7 @@ class Account(models.Model):
balance = models.DecimalField(
max_digits = 6, decimal_places = 2,
default = 0)
is_frozen = models.BooleanField(default = False)
is_frozen = models.BooleanField("est gelé", default = False)
created_at = models.DateTimeField(auto_now_add = True, null = True)
# Optional
PROMO_CHOICES = [(r,r) for r in range(1980, date.today().year+1)]
@ -48,6 +48,7 @@ class Account(models.Model):
choices = PROMO_CHOICES,
blank = True, null = True, default = default_promo())
nickname = models.CharField(
"surnom(s)",
max_length = 255,
blank = True, default = "")
password = models.CharField(
@ -224,14 +225,18 @@ class AccountNegative(models.Model):
start = models.DateTimeField(
blank = True, null = True, default = None)
balance_offset = models.DecimalField(
"décalage de balance",
help_text="Montant non compris dans l'autorisation de négatif",
max_digits = 6, decimal_places = 2,
blank = True, null = True, default = None)
authz_overdraft_amount = models.DecimalField(
"négatif autorisé",
max_digits = 6, decimal_places = 2,
blank = True, null = True, default = None)
authz_overdraft_until = models.DateTimeField(
"expiration du négatif",
blank = True, null = True, default = None)
comment = models.CharField(max_length = 255, blank = True)
comment = models.CharField("commentaire", max_length = 255, blank = True)
@python_2_unicode_compatible
class Checkout(models.Model):