Form UX: Add more helpful placeholders

This commit is contained in:
Raphael Michel
2017-10-06 11:05:24 +02:00
parent 29b1a3dca3
commit 3eeb70ae36
4 changed files with 74 additions and 7 deletions

View File

@@ -268,6 +268,11 @@ class ItemUpdateForm(I18nModelForm):
super().__init__(*args, **kwargs)
self.fields['category'].queryset = self.instance.event.categories.all()
self.fields['tax_rule'].queryset = self.instance.event.tax_rules.all()
self.fields['description'].widget.attrs['placeholder'] = _(
'e.g. This reduced price is available for full-time students, jobless and people '
'over 65. This ticket includes access to all parts of the event, except the VIP '
'area.'
)
class Meta:
model = Item