$isCheckboxEnabled = false; } else { $name[] = new CLink($graph['name'], 'graphs.php?' . 'form=update' . '&graphid=' . $graphid . url_param('parent_discoveryid') . '&hostid=' . $this->data['hostid']); } $checkBox = new CCheckBox('group_graphid[' . $graphid . ']', null, null, $graphid); $checkBox->setEnabled($isCheckboxEnabled); $graphTable->addRow(array($checkBox, $this->data['displayNodes'] ? $graph['nodename'] : null, $hostList, $name, $graph['width'], $graph['height'], $graph['graphtype'])); } // create go buttons $goComboBox = new CComboBox('go'); if (!$this->data['parent_discoveryid']) { $goComboBox->addItem('copy_to', _('Copy selected to ...')); } $goOption = new CComboItem('delete', _('Delete selected')); $goOption->setAttribute('confirm', $this->data['parent_discoveryid'] ? _('Delete selected graph prototypes?') : _('Delete selected graphs?')); $goComboBox->addItem($goOption); $goButton = new CSubmit('goButton', _('Go') . ' (0)'); $goButton->attr('id', 'goButton'); zbx_add_post_js('chkbxRange.pageGoName = "group_graphid";'); if ($this->data['parent_discoveryid']) { zbx_add_post_js('chkbxRange.prefix = "' . $this->data['parent_discoveryid'] . '";'); zbx_add_post_js('cookie.prefix = "' . $this->data['parent_discoveryid'] . '";'); } else { zbx_add_post_js('chkbxRange.prefix = "' . $this->data['hostid'] . '";'); zbx_add_post_js('cookie.prefix = "' . $this->data['hostid'] . '";'); } // append table to form $graphForm->addItem(array($this->data['paging'], $graphTable, $this->data['paging'], get_table_header(array($goComboBox, $goButton)))); // append form to widget $graphWidget->addItem($graphForm); return $graphWidget;
/* ** Zabbix ** Copyright (C) 2001-2015 Zabbix SIA ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ $macrosForm = new CForm(); $macrosForm->setName('macrosForm'); // tab $macrosTab = new CTabView(); $macrosView = new CView('common.macros', array('macros' => $this->get('macros'))); $macrosTab->addTab('macros', _('Macros'), $macrosView->render()); $saveButton = new CSubmit('save', _('Save')); $saveButton->attr('data-removed-count', 0); $saveButton->addClass('main'); $macrosForm->addItem($macrosTab); $macrosForm->addItem(makeFormFooter(null, array($saveButton))); return $macrosForm;