|
|
@ -21,13 +21,23 @@ class DateInput(forms.DateInput): |
|
|
|
|
|
|
|
|
|
|
|
class PosliReseniForm(forms.Form): |
|
|
|
#FIXME jen podproblémy daného problému |
|
|
|
problem = forms.ModelChoiceField(label='Problém',queryset=m.Problem.objects.all()) |
|
|
|
problem = forms.ModelMultipleChoiceField( |
|
|
|
queryset=m.Problem.objects.all(), |
|
|
|
label="Problémy", |
|
|
|
widget=autocomplete.ModelSelect2Multiple( |
|
|
|
url='autocomplete_problem_odevzdatelny', |
|
|
|
attrs={ |
|
|
|
'data-placeholder--id': '-1', |
|
|
|
'data-placeholder--text': '---', |
|
|
|
'data-allow-clear': 'true' |
|
|
|
}, |
|
|
|
), |
|
|
|
) |
|
|
|
# to_field_name |
|
|
|
#problem = models.ManyToManyField(Problem, verbose_name='problém', help_text='Problém', |
|
|
|
# through='Hodnoceni') |
|
|
|
|
|
|
|
resitel = forms.ModelChoiceField(label="Řešitel", |
|
|
|
resitel = forms.ModelMultipleChoiceField(label="Řešitelé", |
|
|
|
queryset=Resitel.objects.all(), |
|
|
|
widget=autocomplete.ModelSelect2Multiple( |
|
|
|
url='autocomplete_resitel', |
|
|
|