Vylepšení hodnotítka fix #1354 fix #1237 #20

Merged
zelvuska merged 25 commits from vylepseni_odevzdavatka into master 2023-06-12 22:17:08 +02:00
Showing only changes of commit 648084d1f9 - Show all commits

View file

@ -122,7 +122,9 @@ class JednoHodnoceniForm(forms.ModelForm):
del(initial["body_neprepocitane_max"]) del(initial["body_neprepocitane_max"])
super().__init__(*args, initial=initial, **kwargs) super().__init__(*args, initial=initial, **kwargs)
if initial is not None: if initial is not None:
self.fields['body'].widget.attrs['placeholder'] = body_max
self.fields['body_celkem'].widget.attrs['placeholder'] = body_max self.fields['body_celkem'].widget.attrs['placeholder'] = body_max
self.fields['body_neprepocitane'].widget.attrs['placeholder'] = body_neprepocitane_max
self.fields['body_neprepocitane_celkem'].widget.attrs['placeholder'] = body_neprepocitane_max self.fields['body_neprepocitane_celkem'].widget.attrs['placeholder'] = body_neprepocitane_max