Changeset - 0b7ccfc82719
[Not reviewed]
0 1 0
Christopher Neugebauer - 8 years ago 2016-04-06 12:59:00
chrisjrn@gmail.com
Enforces minimum quantity of 0 for quantity boxes
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
registrasion/forms.py
Show inline comments
...
 
@@ -52,12 +52,13 @@ class _QuantityBoxProductsForm(_ProductsForm):
 
            else:
 
                help_text = "$%d each" % product.price
 

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

	
 
    @classmethod
 
    def initial_data(cls, product_quantities):
 
        initial = {}
0 comments (0 inline, 0 general)