updates. submits lineups. harmonization between bench and lineup still needs work.
changes order of choices in position so EH is on top known issuees: an order of 0 will get over ridden maybe need a "DHd" flag still not harmonized means cannot drag from lineup to bench.
This commit is contained in:
@@ -6,14 +6,13 @@ from django.forms import modelformset_factory, inlineformset_factory, BaseModelF
|
||||
from crispy_forms.helper import FormHelper, Layout
|
||||
|
||||
class PositioningForm(forms.ModelForm):
|
||||
available = forms.TextInput()
|
||||
|
||||
availability = None
|
||||
class Meta:
|
||||
model = Positioning
|
||||
widgets = {
|
||||
'order': forms.NumberInput(attrs={'class':'w-100'}),
|
||||
# 'order': forms.NumberInput(attrs={'class':'w-100'}),
|
||||
# 'player': forms.Select(attrs={'class': 'form-control'}),
|
||||
'position': forms.Select(attrs={'class': 'w-100'}),
|
||||
'position': forms.Select(attrs={'class': 'form-control form-control-sm'}),
|
||||
# 'ordering': forms.NumberInput(attrs={'class':'w-100'})
|
||||
}
|
||||
exclude = ()
|
||||
@@ -22,8 +21,9 @@ PositioningFormSet = modelformset_factory(
|
||||
model=Positioning,
|
||||
form=PositioningForm,
|
||||
# fields=['order', 'position','player'],
|
||||
min_num=9,
|
||||
can_order=True
|
||||
# min_num=9,
|
||||
extra=0
|
||||
|
||||
)
|
||||
|
||||
# class PositioningFormSet(modelformset_factory):
|
||||
|
||||
Reference in New Issue
Block a user