SyncPropertyForm: remove late-fixing of elements...

...everything is ready now once we reach setup()
This commit is contained in:
Thomas Gelf 2015-07-28 11:47:37 +02:00
parent 3192700d3a
commit 4a1cdd093c
1 changed files with 10 additions and 25 deletions

View File

@ -11,11 +11,13 @@ class SyncPropertyForm extends DirectorObjectForm
{ {
$this->addElement('select', 'rule_id', array( $this->addElement('select', 'rule_id', array(
'label' => $this->translate('Rule Name'), 'label' => $this->translate('Rule Name'),
'multiOptions' => $this->optionalEnum($this->db->enumSyncRule()),
'required' => true, 'required' => true,
)); ));
$this->addElement('select', 'source_id', array( $this->addElement('select', 'source_id', array(
'label' => $this->translate('Source Name'), 'label' => $this->translate('Source Name'),
'multiOptions' => $this->optionalEnum($this->db->enumImportSource()),
'required' => true, 'required' => true,
)); ));
@ -53,21 +55,4 @@ class SyncPropertyForm extends DirectorObjectForm
)); ));
} }
public function loadObject($id)
{
parent::loadObject($id);
return $this;
}
public function setDb($db)
{
parent::setDb($db);
$this->prepareElements();
$this->getElement('rule_id')->setMultiOptions($this->optionalEnum($db->enumSyncRule()));
$this->getElement('source_id')->setMultiOptions($this->optionalEnum($db->enumImportSource()));
return $this;
}
} }