DirectorObjectForm: no automagic hidden id if no such

This commit is contained in:
Alexander Fuhr 2015-06-02 17:29:58 +02:00
parent a130f92d37
commit 0793c1cc55

View File

@ -92,7 +92,9 @@ abstract class DirectorObjectForm extends QuickForm
{
$class = $this->getObjectClassname();
$this->object = $class::load($id, $this->db);
$this->addHidden('id');
if (! is_array($id)) {
$this->addHidden('id');
}
$this->setDefaults($this->object->getProperties());
return $this;
}