DirectorObjectForm: no default object_type
This commit is contained in:
parent
8da2991e76
commit
aa53d57ec8
|
@ -858,14 +858,13 @@ print_r($object);
|
|||
|
||||
protected function addObjectTypeElement()
|
||||
{
|
||||
$default = 'object';
|
||||
$object = $this->object();
|
||||
|
||||
if ($this->object()->supportsImports()) {
|
||||
if ($object->supportsImports()) {
|
||||
$templates = $this->enumAllowedTemplates();
|
||||
|
||||
// TODO: getObjectname is a confusing method name
|
||||
if (empty($templates) && $this->getObjectname() !== 'Command') {
|
||||
$default = 'template';
|
||||
$types = array('template' => $this->translate('Template'));
|
||||
} else {
|
||||
$types = array(
|
||||
|
@ -883,10 +882,6 @@ print_r($object);
|
|||
$types['apply'] = $this->translate('Apply rule');
|
||||
}
|
||||
|
||||
if (! $this->hasObject()) {
|
||||
$this->object()->object_type = $default;
|
||||
}
|
||||
|
||||
$this->addElement('select', 'object_type', array(
|
||||
'label' => $this->translate('Object type'),
|
||||
'description' => $this->translate(
|
||||
|
|
Loading…
Reference in New Issue