File diff eb5dd5903697 → 5debbb2ac82e
registrasion/forms.py
Show inline comments
...
 
@@ -44,13 +44,16 @@ class _QuantityBoxProductsForm(_ProductsForm):
 
    ''' Products entry form that allows users to enter quantities
 
    of desired products. '''
 

	
 
    @classmethod
 
    def set_fields(cls, category, products):
 
        for product in products:
 
            help_text = "$%d -- %s" % (product.price, product.description)
 
            if product.description:
 
                help_text = "$%d each -- %s" % (product.price, product.description)
 
            else:
 
                help_text = "$%d each" % product.price
 

	
 
            field = forms.IntegerField(
 
                label=product.name,
 
                help_text=help_text,
 
            )
 
            cls.base_fields[cls.field_name(product)] = field