fix: Use right date input
This commit is contained in:
parent
eece8763cc
commit
e8249241dd
2 changed files with 14 additions and 2 deletions
|
@ -14,6 +14,13 @@ class ClubBudgetLineForm(forms.ModelForm):
|
||||||
widgets = {"date": forms.DateInput(attrs={"type": "date"}, format="%Y-%m-%d")}
|
widgets = {"date": forms.DateInput(attrs={"type": "date"}, format="%Y-%m-%d")}
|
||||||
|
|
||||||
|
|
||||||
|
class ClubBudgetLineFullForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = ClubBudgetLine
|
||||||
|
fields = ["label", "amount", "date", "posted", "club", "accounting_period"]
|
||||||
|
widgets = {"date": forms.DateInput(attrs={"type": "date"}, format="%Y-%m-%d")}
|
||||||
|
|
||||||
|
|
||||||
class ClubsForm(forms.Form):
|
class ClubsForm(forms.Form):
|
||||||
"""
|
"""
|
||||||
Formulaire d'inscription d'un membre à plusieurs clubs du COF.
|
Formulaire d'inscription d'un membre à plusieurs clubs du COF.
|
||||||
|
|
|
@ -10,7 +10,12 @@ from django.views.generic.edit import CreateView, DeleteView, FormView, UpdateVi
|
||||||
|
|
||||||
from gestioncof.decorators import BuroRequiredMixin
|
from gestioncof.decorators import BuroRequiredMixin
|
||||||
|
|
||||||
from .forms import ClubBudgetLineCommonForm, ClubBudgetLineForm, ClubBudgetLineFormSet
|
from .forms import (
|
||||||
|
ClubBudgetLineCommonForm,
|
||||||
|
ClubBudgetLineForm,
|
||||||
|
ClubBudgetLineFormSet,
|
||||||
|
ClubBudgetLineFullForm,
|
||||||
|
)
|
||||||
from .models import Club, ClubBudgetAccountingPeriod, ClubBudgetLine
|
from .models import Club, ClubBudgetAccountingPeriod, ClubBudgetLine
|
||||||
|
|
||||||
|
|
||||||
|
@ -205,8 +210,8 @@ class BudgetLineUpdate(BudgetLineAccessMixin, UpdateView):
|
||||||
|
|
||||||
|
|
||||||
class BudgetLineFullUpdate(BuroRequiredMixin, UpdateView):
|
class BudgetLineFullUpdate(BuroRequiredMixin, UpdateView):
|
||||||
fields = ["label", "amount", "date", "posted", "club", "accounting_period"]
|
|
||||||
model = ClubBudgetLine
|
model = ClubBudgetLine
|
||||||
|
form_class = ClubBudgetLineFullForm
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
return reverse("cof_clubs:club-detail", kwargs={"pk": self.object.club.id})
|
return reverse("cof_clubs:club-detail", kwargs={"pk": self.object.club.id})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue