SyncPropertyForm: remove late-fixing of elements...
...everything is ready now once we reach setup()
This commit is contained in:
parent
3192700d3a
commit
4a1cdd093c
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue