Use option name instead of slug as field label
When building the AddToBasketForm for a product with options, Oscar
didn't specify a label for the form field. Hence the field name was
used, which is the rather human-unfriendly slug. Options have a name
field, so we can just use that.
@@ -199,8 +199,8 @@ class AddToBasketForm(forms.Form):
This is designed to be overridden so that specific widgets can be used
for certain types of options.
"""
- kwargs = {'required': option.is_required}
- self.fields[option.code] = forms.CharField(**kwargs)
+ self.fields[option.code] = forms.CharField(
+ label=option.name, required=option.is_required)
# Cleaning
