Fix control order in the dashlet form

This commit is contained in:
Eric Lippmann 2016-01-18 12:49:10 +01:00
parent 7a6d61ceaa
commit 92d8ad42e6
1 changed files with 11 additions and 12 deletions

View File

@ -89,13 +89,23 @@ class DashletForm extends Form
)
)
);
$this->addElement(
'checkbox',
'create_new_pane',
array(
'autosubmit' => true,
'required' => false,
'label' => $this->translate('New dashboard'),
'description' => $this->translate('Check this box if you want to add the dashlet to a new dashboard')
)
);
if (empty($panes) || ((isset($formData['create_new_pane']) && $formData['create_new_pane'] != false))) {
$this->addElement(
'text',
'pane',
array(
'required' => true,
'label' => $this->translate("New Dashboard Title"),
'label' => $this->translate('New Dashboard Title'),
'description' => $this->translate('Enter a title for the new dashboard')
)
);
@ -111,17 +121,6 @@ class DashletForm extends Form
)
);
}
$this->addElement(
'checkbox',
'create_new_pane',
array(
'autosubmit' => true,
'required' => false,
'label' => $this->translate('New dashboard'),
'description' => $this->translate('Check this box if you want to add the dashlet to a new dashboard')
)
);
}
/**