add discount input on customer form

This commit is contained in:
Manuel Raynaud
2014-04-28 10:51:24 +02:00
parent 7b826796f1
commit c4320f0ada
4 changed files with 25 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ class CustomerController extends AbstractCrudController
'lastname' => $object->getLastname(),
'email' => $object->getEmail(),
'title' => $object->getTitleId(),
'discount' => $object->getDiscount(),
);
if ($address !== null) {

View File

@@ -158,6 +158,12 @@ class CustomerUpdateForm extends BaseForm
"for" => "title"
)
))
->add('discount', 'text', array(
'label' => Translator::getInstance()->trans('permanent discount'),
'label_attr' => array(
'for' => 'discount'
)
))
;
}

View File

@@ -143,6 +143,15 @@ class Customer extends BaseCustomer implements UserInterface
->findOne();
}
public function setRef($v)
{
if (null !== $v) {
parent::setRef($v);
}
return $this;
}
/**
* create hash for plain password and set it in Customer object
*