Example #1
0
            $hostgroup->delete();
            $oPage->redirect('hostgroups.php');
            exit;
        }
        break;
}
$oPage->addItem(new IEPageTop(_('Editace skupiny hostů') . ' ' . $hostgroup->getName()));
$hostgroupEdit = new IECfgEditor($hostgroup);
$form = new EaseTWBForm('Hostgroup', 'hostgroup.php', 'POST', $hostgroupEdit, array('class' => 'form-horizontal'));
$form->setTagID($form->getTagName());
if (!is_null($hostgroup->getMyKey())) {
    $form->addItem(new EaseHtmlInputHiddenTag($hostgroup->getmyKeyColumn(), $hostgroup->getMyKey()));
}
$form->addItem(new EaseTWSubmitButton(_('Uložit'), 'success'));
$oPage->addItem(new IEPageBottom());
$infopanel = new IEInfoBox($hostgroup);
$tools = new EaseTWBPanel(_('Nástroje'), 'warning');
if ($hostgroup->getId()) {
    $tools->addItem($hostgroup->deleteButton());
    $tools->addItem(new EaseTWBPanel(_('Transfer'), 'warning', $hostgroup->transferForm()));
}
$pageRow = new EaseTWBRow();
$pageRow->addColumn(2, $infopanel);
$pageRow->addColumn(6, new EaseTWBPanel(new EaseHtmlH1Tag($hostgroup->getDataValue('alias') . ' <small>' . $hostgroup->getName() . '</small>'), 'default', $form));
$pageRow->addColumn(4, $tools);
$oPage->container->addItem($pageRow);
$operations = $tools->addItem(new EaseTWBPanel(_('Hromadné operace')), 'success');
$operations->addItem(new IEContactAsignForm());
$tools->addItem(new EaseTWBLinkButton('wizard-host.php?hostgroup_id=' . $hostgroup->getId(), EaseTWBPart::GlyphIcon('plus') . _('nový host ve skupině'), 'success'));
//$tools->addItem(new EaseTWBLinkButton('hglayouteditor.php?hostgroup_id=' . $hostgroup->getId(), EaseTWBPart::GlyphIcon('globe') . _('Rozvržení topologie'), 'info'));
$oPage->draw();