weight is not mandatory anymore
This commit is contained in:
@@ -157,13 +157,15 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
|||||||
/**
|
/**
|
||||||
* Update SEO modification, and either go back to the object list, or stay on the edition page.
|
* Update SEO modification, and either go back to the object list, or stay on the edition page.
|
||||||
*
|
*
|
||||||
* @return Thelia\Core\HttpFoundation\Response the response
|
* @return \Thelia\Core\HttpFoundation\Response the response
|
||||||
*/
|
*/
|
||||||
public function processUpdateSeoAction()
|
public function processUpdateSeoAction()
|
||||||
{
|
{
|
||||||
// Check current user authorization
|
// Check current user authorization
|
||||||
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE))
|
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
|
||||||
return $response;
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Error (Default: false)
|
// Error (Default: false)
|
||||||
$error_msg = false;
|
$error_msg = false;
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ class ProductDefaultSaleElementUpdateForm extends ProductSaleElementUpdateForm
|
|||||||
"label_attr" => array("for" => "tax_rule_field")
|
"label_attr" => array("for" => "tax_rule_field")
|
||||||
))
|
))
|
||||||
->add("weight", "number", array(
|
->add("weight", "number", array(
|
||||||
"constraints" => array(new NotBlank()),
|
"label" => Translator::getInstance()->trans("Weight"),
|
||||||
"label" => Translator::getInstance()->trans("Weight *"),
|
|
||||||
"label_attr" => array("for" => "weight_field")
|
"label_attr" => array("for" => "weight_field")
|
||||||
))
|
))
|
||||||
->add("quantity", "number", array(
|
->add("quantity", "number", array(
|
||||||
|
|||||||
@@ -91,13 +91,10 @@ class ProductSaleElementUpdateForm extends BaseForm
|
|||||||
))
|
))
|
||||||
->add('weight', 'collection', array(
|
->add('weight', 'collection', array(
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => Translator::getInstance()->trans('Weight *'),
|
'label' => Translator::getInstance()->trans('Weight'),
|
||||||
'label_attr' => array('for' => 'weight_field'),
|
'label_attr' => array('for' => 'weight_field'),
|
||||||
'allow_add' => true,
|
'allow_add' => true,
|
||||||
'allow_delete' => true,
|
'allow_delete' => true
|
||||||
'options' => array(
|
|
||||||
'constraints' => array(new NotBlank()),
|
|
||||||
)
|
|
||||||
))
|
))
|
||||||
->add('quantity', 'collection', array(
|
->add('quantity', 'collection', array(
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||||
|
|
||||||
<div class="input-group">
|
<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>
|
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -411,7 +411,7 @@
|
|||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
{form_field form=$form field='weight' value_key=$idx}
|
{form_field form=$form field='weight' value_key=$idx}
|
||||||
<td {if $error}class="has-error"{/if}><input required class="form-control text-right" required type="text" name="{$name}" value="{$value}" /></td>
|
<td {if $error}class="has-error"{/if}><input required class="form-control text-right" type="text" name="{$name}" value="{$value}" /></td>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user