mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 09:58:23 +02:00
RecurrentTransaction amount history
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
from django import forms
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from note_kfet.inputs import Autocomplete
|
||||
from note_kfet.inputs import Autocomplete, AmountInput
|
||||
|
||||
from .models import TransactionTemplate, NoteClub
|
||||
|
||||
@ -24,11 +24,6 @@ class TransactionTemplateForm(forms.ModelForm):
|
||||
model = TransactionTemplate
|
||||
fields = '__all__'
|
||||
|
||||
# Le champ de destination est remplacé par un champ d'auto-complétion.
|
||||
# Quand des lettres sont tapées, une requête est envoyée sur l'API d'auto-complétion
|
||||
# et récupère les aliases valides
|
||||
# Pour force le type d'une note, il faut rajouter le paramètre :
|
||||
# forward=(forward.Const('TYPE', 'note_type') où TYPE est dans {user, club, special}
|
||||
widgets = {
|
||||
'destination':
|
||||
Autocomplete(
|
||||
@ -41,4 +36,5 @@ class TransactionTemplateForm(forms.ModelForm):
|
||||
'placeholder': 'Note ...',
|
||||
},
|
||||
),
|
||||
'amount': AmountInput(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user