|
@ -21,13 +21,23 @@ class DateInput(forms.DateInput): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PosliReseniForm(forms.Form): |
|
|
class PosliReseniForm(forms.Form): |
|
|
#FIXME jen podproblémy daného problému |
|
|
problem = forms.ModelMultipleChoiceField( |
|
|
problem = forms.ModelChoiceField(label='Problém',queryset=m.Problem.objects.all()) |
|
|
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 |
|
|
# to_field_name |
|
|
#problem = models.ManyToManyField(Problem, verbose_name='problém', help_text='Problém', |
|
|
#problem = models.ManyToManyField(Problem, verbose_name='problém', help_text='Problém', |
|
|
# through='Hodnoceni') |
|
|
# through='Hodnoceni') |
|
|
|
|
|
|
|
|
resitel = forms.ModelChoiceField(label="Řešitel", |
|
|
resitel = forms.ModelMultipleChoiceField(label="Řešitelé", |
|
|
queryset=Resitel.objects.all(), |
|
|
queryset=Resitel.objects.all(), |
|
|
widget=autocomplete.ModelSelect2Multiple( |
|
|
widget=autocomplete.ModelSelect2Multiple( |
|
|
url='autocomplete_resitel', |
|
|
url='autocomplete_resitel', |
|
|