AddNodeForm: show next when not completed

This commit is contained in:
Thomas Gelf 2016-12-08 10:12:43 +01:00
parent 0380e46552
commit 9712065a6b

View file

@ -52,6 +52,8 @@ class AddNodeForm extends QuickForm
protected function addNewProcess()
{
$this->addHtml('<h2>Add a new node</h2>');
$this->addElement('text', 'name', array(
'label' => $this->translate('Name'),
'required' => true,
@ -159,6 +161,8 @@ class AddNodeForm extends QuickForm
$this->addHostElement();
if ($host = $this->getSentValue('host')) {
$this->addServicesElement($host);
} else {
$this->setSubmitLabel($this->translate('Next'));
}
}