add: zobrazování max. počtu bodů i v necelkem

This commit is contained in:
Jonas Havelka 2023-02-06 22:09:57 +01:00
parent 50bdb19e14
commit 648084d1f9

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