weight is not mandatory anymore

This commit is contained in:
Manuel Raynaud
2014-03-14 11:19:23 +01:00
parent 613aac093e
commit 0e21cb7b82
4 changed files with 9 additions and 11 deletions

View File

@@ -65,8 +65,7 @@ class ProductDefaultSaleElementUpdateForm extends ProductSaleElementUpdateForm
"label_attr" => array("for" => "tax_rule_field")
))
->add("weight", "number", array(
"constraints" => array(new NotBlank()),
"label" => Translator::getInstance()->trans("Weight *"),
"label" => Translator::getInstance()->trans("Weight"),
"label_attr" => array("for" => "weight_field")
))
->add("quantity", "number", array(

View File

@@ -91,13 +91,10 @@ class ProductSaleElementUpdateForm extends BaseForm
))
->add('weight', 'collection', array(
'type' => 'number',
'label' => Translator::getInstance()->trans('Weight *'),
'label' => Translator::getInstance()->trans('Weight'),
'label_attr' => array('for' => 'weight_field'),
'allow_add' => true,
'allow_delete' => true,
'options' => array(
'constraints' => array(new NotBlank()),
)
'allow_delete' => true
))
->add('quantity', 'collection', array(
'type' => 'number',