weight and visibility on product are not mandatory anymore

This commit is contained in:
Manuel Raynaud
2014-03-12 16:21:45 +01:00
parent 775160235c
commit d8e1f24fda
3 changed files with 3 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ class Product extends BaseAction implements EventSubscriberInterface
->setRef($event->getRef())
->setLocale($event->getLocale())
->setTitle($event->getTitle())
->setVisible($event->getVisible())
->setVisible($event->getVisible() ? 1 : 0)
// Set the default tax rule to this product
->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true))
@@ -109,7 +109,7 @@ class Product extends BaseAction implements EventSubscriberInterface
->setDescription($event->getDescription())
->setChapo($event->getChapo())
->setPostscriptum($event->getPostscriptum())
->setVisible($event->getVisible())
->setVisible($event->getVisible() ? 1 : 0)
->save()
;

View File

@@ -83,7 +83,6 @@ class ProductCreationForm extends BaseForm
"label_attr" => array("for" => "tax_rule_field")
))
->add("weight", "number", array(
"constraints" => array(new NotBlank()),
"label" => Translator::getInstance()->trans("Weight *"),
"label_attr" => array("for" => "weight_field")
))

View File

@@ -520,7 +520,7 @@
<div class="row">
<div class="col-lg-4">
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
<span class="input-group-addon">{intl l="Kg"}</span>
</div>
</div>