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

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))) { if (empty($panes) || ((isset($formData['create_new_pane']) && $formData['create_new_pane'] != false))) {
$this->addElement( $this->addElement(
'text', 'text',
'pane', 'pane',
array( array(
'required' => true, 'required' => true,
'label' => $this->translate("New Dashboard Title"), 'label' => $this->translate('New Dashboard Title'),
'description' => $this->translate('Enter a title for the new dashboard') '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')
)
);
} }
/** /**