|
@@ -52,6 +52,11 @@ class KataoProductForm extends BaseKataoProductForm {
|
|
|
if ((bool)$this->getObject()->getIsArchived()) {
|
|
|
$this->widgetSchema['is_archived']->setAttribute('checked', 'checked');
|
|
|
}
|
|
|
+ $this->widgetSchema['authorize_decimal'] = new wpWidgetFormInputCheckbox();
|
|
|
+ $this->widgetSchema['authorize_decimal']->setOption('value_attribute_value', 1);
|
|
|
+ if ((bool)$this->getObject()->getAuthorizeDecimal()) {
|
|
|
+ $this->widgetSchema['authorize_decimal']->setAttribute('checked', 'checked');
|
|
|
+ }
|
|
|
|
|
|
$this->widgetSchema['picture'] = new wpWidgetFormInputFile(array(), array('file_src' => $this->getObject()->getPicture()));
|
|
|
$this->validatorSchema['picture'] = new sfValidatorFile(array('required' => false, 'mime_types' => array('image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png', 'image/gif', 'image/jpeg; charset=binary')), array('mime_types' => 'Merci de choisir une image au format jpg, png ou gif (%mime_type%)'));
|
|
@@ -71,6 +76,7 @@ class KataoProductForm extends BaseKataoProductForm {
|
|
|
'is_archived' => 'Archivé ?',
|
|
|
'accounting_code_purchase' => 'Achat',
|
|
|
'accounting_code_sell' => 'Vente',
|
|
|
+ 'authorize_decimal' => 'Autoriser quantités avec décimales',
|
|
|
));
|
|
|
|
|
|
$this->validatorSchema->setPostValidator(new sfValidatorCallback(array('callback' => array($this, 'checkMaxSolAmount')), array('invalid' => 'Le montant de la monnaie complémentaire est trop important.')));
|