当前位置: 首页>>代码示例>>PHP>>正文


PHP CFormList::addRow方法代码示例

本文整理汇总了PHP中CFormList::addRow方法的典型用法代码示例。如果您正苦于以下问题:PHP CFormList::addRow方法的具体用法?PHP CFormList::addRow怎么用?PHP CFormList::addRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFormList的用法示例。


在下文中一共展示了CFormList::addRow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CCheckBox

foreach ($titles as $key => $title) {
    $cbExist = $cbMissed = SPACE;
    if (isset($rules[$key]['updateExisting'])) {
        $cbExist = new CCheckBox('rules[' . $key . '][updateExisting]', $rules[$key]['updateExisting'], null, 1);
        if ($key == 'images') {
            if (CWebUser::$data['type'] != USER_TYPE_SUPER_ADMIN) {
                continue;
            }
            $cbExist->setAttribute('onclick', 'if (this.checked) return confirm(\'' . _('Images for all maps will be updated!') . '\')');
        }
    }
    if (isset($rules[$key]['createMissing'])) {
        $cbMissed = new CCheckBox('rules[' . $key . '][createMissing]', $rules[$key]['createMissing'], null, 1);
    }
    $rulesTable->addRow(array($title, new CCol($cbExist, 'center'), new CCol($cbMissed, 'center')));
}
// form list
$importFormList = new CFormList('proxyFormList');
$importFormList->addRow(_('Import file'), new CFile('import_file'));
$importFormList->addRow(_('Rules'), new CDiv($rulesTable, 'border_dotted objectgroup inlineblock'));
// tab
$importTab = new CTabView();
$importTab->addTab('importTab', _('Import'), $importFormList);
// form
$importForm = new CForm('post', null, 'multipart/form-data');
$importForm->addItem($importTab);
$importForm->addItem(makeFormFooter(new CSubmit('import', _('Import')), new CButtonCancel()));
// widget
$importWidget = new CWidget();
$importWidget->addItem($importForm);
return $importWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:conf.import.php

示例2: CForm

    $itemWidget->addItem(get_header_host_table('items', $this->data['hostid']));
}
$itemWidget->addPageHeader(_('CONFIGURATION OF ITEMS'));
// create form
$itemForm = new CForm();
$itemForm->setName('itemForm');
$itemForm->addVar('group_itemid', $this->data['group_itemid']);
$itemForm->addVar('hostid', $this->data['hostid']);
$itemForm->addVar('go', 'copy_to');
// create form list
$itemFormList = new CFormList('itemFormList');
// append type to form list
$copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()');
$copyTypeComboBox->addItem(0, _('Hosts'));
$copyTypeComboBox->addItem(1, _('Host groups'));
$itemFormList->addRow(_('Target type'), $copyTypeComboBox);
// append targets to form list
$targetList = array();
if ($this->data['copy_type'] == 0) {
    $groupComboBox = new CComboBox('copy_groupid', $this->data['copy_groupid'], 'submit()');
    foreach ($this->data['groups'] as $group) {
        $groupComboBox->addItem($group['groupid'], $group['name']);
    }
    $itemFormList->addRow(_('Group'), $groupComboBox);
    foreach ($this->data['hosts'] as $host) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $host['hostid'] . ']', uint_in_array($host['hostid'], $this->data['copy_targetid']), null, $host['hostid']), SPACE, $host['name'], BR()));
    }
} else {
    foreach ($this->data['groups'] as $group) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $group['groupid'] . ']', uint_in_array($group['groupid'], $this->data['copy_targetid']), null, $group['groupid']), SPACE, $group['name'], BR()));
    }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.item.copy.php

示例3: CWidget

**/
$proxyWidget = new CWidget();
$proxyWidget->addPageHeader(_('CONFIGURATION OF PROXIES'));
// create form
$proxyForm = new CForm();
$proxyForm->setName('proxyForm');
$proxyForm->addVar('form', $this->data['form']);
$proxyForm->addVar('form_refresh', $this->data['form_refresh']);
if (!empty($this->data['proxyid'])) {
    $proxyForm->addVar('proxyid', $this->data['proxyid']);
}
// create form list
$proxyFormList = new CFormList('proxyFormList');
$nameTextBox = new CTextBox('host', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, 'no', 64);
$nameTextBox->attr('autofocus', 'autofocus');
$proxyFormList->addRow(_('Proxy name'), $nameTextBox);
// append status to form list
$statusBox = new CComboBox('status', $this->data['status'], 'submit()');
$statusBox->addItem(HOST_STATUS_PROXY_ACTIVE, _('Active'));
$statusBox->addItem(HOST_STATUS_PROXY_PASSIVE, _('Passive'));
$proxyFormList->addRow(_('Proxy mode'), $statusBox);
if ($this->data['status'] == HOST_STATUS_PROXY_PASSIVE) {
    if (isset($this->data['interface']['interfaceid'])) {
        $proxyForm->addVar('interface[interfaceid]', $this->data['interface']['interfaceid']);
        $proxyForm->addVar('interface[hostid]', $this->data['interface']['hostid']);
    }
    $interfaceTable = new CTable(null, 'formElementTable');
    $interfaceTable->addRow(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
    $connectByComboBox = new CRadioButtonList('interface[useip]', $this->data['interface']['useip']);
    $connectByComboBox->addValue(_('IP'), 1);
    $connectByComboBox->addValue(_('DNS'), 0);
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.proxy.edit.php

示例4: dirname

** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
require_once dirname(__FILE__) . '/js/configuration.slideconf.edit.js.php';
$slideWidget = new CWidget();
$slideWidget->addPageHeader(_('CONFIGURATION OF SLIDE SHOWS'));
// create form
$slideForm = new CForm();
$slideForm->setName('slideForm');
$slideForm->addVar('form', $this->data['form']);
$slideForm->addVar('slides', $this->data['slides_without_delay']);
if (!empty($this->data['slideshowid'])) {
    $slideForm->addVar('slideshowid', $this->data['slideshowid']);
}
// create slide form list
$slideFormList = new CFormList('slideFormList');
$slideFormList->addRow(_('Name'), new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE));
$slideFormList->addRow(_('Default delay (in seconds)'), new CNumericBox('delay', $this->data['delay'], 5, 'no', false, false));
// append slide table
$slideTable = new CTableInfo(_('No slides defined.'), 'formElementTable');
$slideTable->setAttribute('style', 'min-width: 500px;');
$slideTable->setAttribute('id', 'slideTable');
$slideTable->setHeader(array(new CCol(SPACE, null, null, '15'), new CCol(SPACE, null, null, '15'), new CCol(_('Screen'), null, null, '140'), new CCol(_('Delay'), null, null, '70'), new CCol(_('Action'), null, null, '50')));
$i = 1;
foreach ($this->data['slides'] as $step => $slides) {
    $name = '';
    if (!empty($slides['screenid'])) {
        $screen = get_screen_by_screenid($slides['screenid']);
        if (!empty($screen['name'])) {
            $name = $screen['name'];
        }
    }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.slideconf.edit.php

示例5: CTextBox

    case CONDITION_TYPE_HOST_METADATA:
        $condition = new CTextBox('new_condition[value]', '', ZBX_TEXTBOX_STANDARD_SIZE);
        break;
    default:
        $condition = null;
}
$conditionTable = new CTable(null, 'newActionConditionTable');
$conditionTable->addRow(array($conditionTypeComboBox, $conditionOperatorsComboBox, $condition));
$conditionTable->addRow(array(new CSubmit('add_condition', _('Add'), null, 'link_menu'), SPACE, SPACE));
$conditionFormList->addRow(_('New condition'), new CDiv($conditionTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
/*
 * Operation tab
 */
$operationFormList = new CFormList('operationlist');
if ($this->data['eventsource'] == EVENT_SOURCE_TRIGGERS || $this->data['eventsource'] == EVENT_SOURCE_INTERNAL) {
    $operationFormList->addRow(_('Default operation step duration'), array(new CNumericBox('esc_period', $this->data['action']['esc_period'], 6, 'no'), ' (' . _('minimum 60 seconds') . ')'));
}
// create operation table
$operationsTable = new CTable(_('No operations defined.'), 'formElementTable');
$operationsTable->attr('style', 'min-width: 600px;');
if ($this->data['action']['eventsource'] == EVENT_SOURCE_TRIGGERS || $this->data['eventsource'] == EVENT_SOURCE_INTERNAL) {
    $operationsTable->setHeader(array(_('Steps'), _('Details'), _('Start in'), _('Duration (sec)'), _('Action')));
    $delay = count_operations_delay($this->data['action']['operations'], $this->data['action']['esc_period']);
} else {
    $operationsTable->setHeader(array(_('Details'), _('Action')));
}
foreach ($this->data['action']['operations'] as $operationid => $operation) {
    if (!str_in_array($operation['operationtype'], $this->data['allowedOperations'])) {
        continue;
    }
    if (!isset($operation['opconditions'])) {
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例6: dirname

** 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.
**/
require_once dirname(__FILE__) . '/js/monitoring.triggerComment.js.php';
$commentWidget = new CWidget('triggerComment');
$commentWidget->addPageHeader(_('TRIGGER DESCRIPTION'));
// create form
$commentForm = new CForm();
$commentForm->setName('commentForm');
$commentForm->addVar('triggerid', $this->data['triggerid']);
// create form list
$commentFormList = new CFormList('commentFormList');
$commentTextArea = new CTextArea('comments', CMacrosResolverHelper::resolveTriggerDescription($this->data['trigger']), array('rows' => 25, 'width' => ZBX_TEXTAREA_BIG_WIDTH, 'readonly' => $this->data['isCommentExist']));
$commentTextArea->attr('autofocus', 'autofocus');
$commentFormList->addRow(_('Description'), $commentTextArea);
// append tabs to form
$commentTab = new CTabView();
$commentTab->addTab('commentTab', _s('Description for "%s".', $this->data['trigger']['description']), $commentFormList);
$commentForm->addItem($commentTab);
// append buttons to form
$updateButton = new CSubmit('update', _('Update'));
$updateButton->setEnabled(!$this->data['isCommentExist']);
if ($this->data['isCommentExist']) {
    $editButton = new CButton('edit', _('Edit'));
    $editButton->setEnabled($this->data['isTriggerEditable']);
} else {
    $editButton = null;
}
$commentForm->addItem(makeFormFooter($updateButton, array($editButton, new CButtonCancel('&triggerid=' . $this->data['triggerid']))));
$commentWidget->addItem($commentForm);
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:monitoring.triggerComment.php

示例7: CForm

if (isset($_REQUEST['save']) && $result) {
    if (!isset($_REQUEST['stepid'])) {
        insert_js('add_httpstep(' . zbx_jsvalue($_REQUEST['dstfrm']) . ',' . zbx_jsvalue($_REQUEST['name']) . ',' . zbx_jsvalue($_REQUEST['timeout']) . ',' . zbx_jsvalue($_REQUEST['url']) . ',' . zbx_jsvalue($_REQUEST['posts']) . ',' . zbx_jsvalue($_REQUEST['variables']) . ',' . zbx_jsvalue($_REQUEST['required']) . ',' . zbx_jsvalue($_REQUEST['status_codes']) . ");\n");
    } else {
        insert_js('update_httpstep(' . zbx_jsvalue($_REQUEST['dstfrm']) . ',' . zbx_jsvalue($_REQUEST['list_name']) . ',' . zbx_jsvalue($_REQUEST['stepid']) . ',' . zbx_jsvalue($_REQUEST['name']) . ',' . zbx_jsvalue($_REQUEST['timeout']) . ',' . zbx_jsvalue($_REQUEST['url']) . ',' . zbx_jsvalue($_REQUEST['posts']) . ',' . zbx_jsvalue($_REQUEST['variables']) . ',' . zbx_jsvalue($_REQUEST['required']) . ',' . zbx_jsvalue($_REQUEST['status_codes']) . ");\n");
    }
} else {
    $httpPopupForm = new CForm();
    $httpPopupForm->addVar('dstfrm', get_request('dstfrm', null));
    $httpPopupForm->addVar('stepid', get_request('stepid', null));
    $httpPopupForm->addVar('list_name', get_request('list_name', null));
    $httpPopupForm->addVar('templated', get_request('templated', null));
    $httpPopupForm->addVar('old_name', get_request('old_name', null));
    $httpPopupForm->addVar('steps_names', get_request('steps_names', null));
    $httpPopupFormList = new CFormList('httpPopupFormList');
    $httpPopupFormList->addRow(_('Name'), new CTextBox('name', get_request('name', ''), ZBX_TEXTBOX_STANDARD_SIZE, get_request('templated', null), 64));
    $httpPopupFormList->addRow(_('URL'), new CTextBox('url', get_request('url', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    $httpPopupFormList->addRow(_('Post'), new CTextArea('posts', get_request('posts', '')));
    $httpPopupFormList->addRow(_('Variables'), new CTextArea('variables', get_request('variables', '')));
    $httpPopupFormList->addRow(_('Timeout'), new CNumericBox('timeout', get_request('timeout', 15), 5));
    $httpPopupFormList->addRow(_('Required string'), new CTextBox('required', get_request('required', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    $httpPopupFormList->addRow(_('Required status codes'), new CTextBox('status_codes', get_request('status_codes', ''), ZBX_TEXTBOX_STANDARD_SIZE));
    // append tabs to form
    $httpPopupTab = new CTabView();
    $httpPopupTab->addTab('scenarioStepTab', _('Step of scenario'), $httpPopupFormList);
    $httpPopupForm->addItem($httpPopupTab);
    // append buttons to form
    $stepid = get_request('stepid', null);
    $httpPopupForm->addItem(makeFormFooter(new CSubmit('save', isset($stepid) ? _('Update') : _('Add')), new CButtonCancel(null, 'close_window();')));
    $httpPopupWidget->addItem($httpPopupForm);
}
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.httpconf.popup.php

示例8: CWidget

** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
$widget = (new CWidget())->setTitle(_('Discovery rules'))->addItem(get_header_host_table('discoveries', $this->data['hostid'], isset($this->data['parent_discoveryid']) ? $this->data['parent_discoveryid'] : 0));
// create form
$itemForm = (new CForm())->setName('itemForm')->addVar('form', $this->data['form'])->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['parent_discoveryid'])) {
    $itemForm->addVar('parent_discoveryid', $this->data['parent_discoveryid']);
}
if (!empty($this->data['itemid'])) {
    $itemForm->addVar('itemid', $this->data['itemid']);
}
// create form list
$itemFormList = new CFormList('itemFormList');
if (!empty($this->data['templates'])) {
    $itemFormList->addRow(_('Parent discovery rules'), $this->data['templates']);
}
$itemFormList->addRow(_('Name'), (new CTextBox('name', $this->data['name'], $this->data['limited']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('autofocus', 'autofocus'));
// append type to form list
if ($this->data['limited']) {
    $itemForm->addVar('type', $this->data['type']);
    $itemFormList->addRow(_('Type'), (new CTextBox('typename', item_type2str($this->data['type']), true))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH));
} else {
    $typeComboBox = (new CComboBox('type', $this->data['type']))->addItems($this->data['types']);
    $itemFormList->addRow(_('Type'), $typeComboBox);
}
// append key to form list
$itemFormList->addRow(_('Key'), [(new CTextBox('key', $this->data['key'], $this->data['limited']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)]);
// append interfaces to form list
if (!empty($this->data['interfaces'])) {
    $interfacesComboBox = new CComboBox('interfaceid', $this->data['interfaceid']);
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.host.discovery.edit.php

示例9: CWidget

** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
$hostGroupWidget = new CWidget();
$hostGroupWidget->addPageHeader(_('CONFIGURATION OF HOST GROUPS'));
// create form
$hostGroupForm = new CForm();
$hostGroupForm->setName('hostgroupForm');
$hostGroupForm->addVar('form', $this->data['form']);
if (isset($this->data['groupid'])) {
    $hostGroupForm->addVar('groupid', $this->data['groupid']);
}
// create hostgroup form list
$hostGroupFormList = new CFormList('hostgroupFormList');
$nameTextBox = new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, $this->data['groupid'] && $this->data['group']['flags'] == ZBX_FLAG_DISCOVERY_CREATED, 64);
$nameTextBox->attr('autofocus', 'autofocus');
$hostGroupFormList->addRow(_('Group name'), $nameTextBox);
// append groups and hosts to form list
$groupsComboBox = new CComboBox('twb_groupid', $this->data['twb_groupid'], 'submit()');
$groupsComboBox->addItem('0', _('All'));
foreach ($this->data['db_groups'] as $group) {
    $groupsComboBox->addItem($group['groupid'], $group['name']);
}
$hostsComboBox = new CTweenBox($hostGroupForm, 'hosts', $this->data['hosts'], 25);
foreach ($this->data['db_hosts'] as $host) {
    if (!isset($this->data['hosts'][$host['hostid']])) {
        $hostsComboBox->addItem($host['hostid'], $host['name']);
    }
}
foreach ($this->data['r_hosts'] as $host) {
    if ($host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
        $hostsComboBox->addItem($host['hostid'], $host['name']);
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.hostgroups.edit.php

示例10: CForm

// append host summary to widget header
if (!empty($this->data['hostid'])) {
    $widget->addItem(get_header_host_table('web', $this->data['hostid']));
}
// create form
$httpForm = (new CForm())->setName('httpForm')->addVar('form', $this->data['form'])->addVar('hostid', $this->data['hostid'])->addVar('steps', $this->data['steps'])->addVar('templated', $this->data['templated']);
if (!empty($this->data['httptestid'])) {
    $httpForm->addVar('httptestid', $this->data['httptestid']);
}
/*
 * Scenario tab
 */
$httpFormList = new CFormList('httpFormList');
// Parent http tests
if (!empty($this->data['templates'])) {
    $httpFormList->addRow(_('Parent web scenarios'), $this->data['templates']);
}
// Name
$nameTextBox = (new CTextBox('name', $this->data['name'], $this->data['templated'], 64))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH);
if (!$this->data['templated']) {
    $nameTextBox->setAttribute('autofocus', 'autofocus');
}
$httpFormList->addRow(_('Name'), $nameTextBox);
// Application
if ($this->data['application_list']) {
    $applications = zbx_array_merge([''], $this->data['application_list']);
    $httpFormList->addRow(_('Application'), new CComboBox('applicationid', $this->data['applicationid'], null, $applications));
} else {
    $httpFormList->addRow(_('Application'), new CSpan(_('No applications found.')));
}
// New application
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.httpconf.edit.php

示例11: CWidget

** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
$proxyWidget = new CWidget();
$proxyWidget->addPageHeader(_('CONFIGURATION OF PROXIES'));
// create form
$proxyForm = new CForm();
$proxyForm->setName('proxyForm');
$proxyForm->addVar('form', $this->data['form']);
$proxyForm->addVar('form_refresh', $this->data['form_refresh']);
if (!empty($this->data['proxyid'])) {
    $proxyForm->addVar('proxyid', $this->data['proxyid']);
}
// create form list
$proxyFormList = new CFormList('proxyFormList');
$proxyFormList->addRow(_('Proxy name'), new CTextBox('host', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE, 'no', 64));
// append status to form list
$statusBox = new CComboBox('status', $this->data['status'], 'submit()');
$statusBox->addItem(HOST_STATUS_PROXY_ACTIVE, _('Active'));
$statusBox->addItem(HOST_STATUS_PROXY_PASSIVE, _('Passive'));
$proxyFormList->addRow(_('Proxy mode'), $statusBox);
if ($this->data['status'] == HOST_STATUS_PROXY_PASSIVE) {
    if (isset($this->data['interface']['interfaceid'])) {
        $proxyForm->addVar('interfaces[0][interfaceid]', $this->data['interface']['interfaceid']);
        $proxyForm->addVar('interfaces[0][hostid]', $this->data['interface']['hostid']);
    }
    $interfaceTable = new CTable(_('No interfaces defined.'), 'formElementTable');
    $interfaceTable->addRow(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
    $connectByComboBox = new CRadioButtonList('interfaces[0][useip]', $this->data['interface']['useip']);
    $connectByComboBox->addValue(_('IP'), 1);
    $connectByComboBox->addValue(_('DNS'), 0);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:administration.proxy.edit.php

示例12: CForm

if (!empty($this->data['title'])) {
    $triggersWidget->addPageHeader($this->data['title']);
}
// create form
$triggersForm = new CForm();
$triggersForm->setName('triggersForm');
$triggersForm->addVar($this->data['elements_field'], $this->data['elements']);
$triggersForm->addVar('hostid', $this->data['hostid']);
$triggersForm->addVar('go', 'copy_to');
// create form list
$triggersFormList = new CFormList('triggersFormList');
// append copy types to form list
$copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()');
$copyTypeComboBox->addItem(0, _('Hosts'));
$copyTypeComboBox->addItem(1, _('Host groups'));
$triggersFormList->addRow(_('Target type'), $copyTypeComboBox);
// append groups to form list
if ($this->data['copy_type'] == 0) {
    $groupComboBox = new CComboBox('filter_groupid', $this->data['filter_groupid'], 'submit()');
    foreach ($this->data['groups'] as $group) {
        if (empty($this->data['filter_groupid'])) {
            $this->data['filter_groupid'] = $group['groupid'];
        }
        $groupComboBox->addItem($group['groupid'], $group['name']);
    }
    $triggersFormList->addRow(_('Group'), $groupComboBox);
}
// append targets to form list
$targets = array();
if ($this->data['copy_type'] == 0) {
    foreach ($this->data['hosts'] as $host) {
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.copy.elements.php

示例13: dirname

** 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.
**/
require_once dirname(__FILE__) . '/js/monitoring.triggerComment.js.php';
$commentWidget = new CWidget('triggerComment');
$commentWidget->addPageHeader(_('TRIGGER COMMENTS'));
// create form
$commentForm = new CForm();
$commentForm->setName('commentForm');
$commentForm->addVar('triggerid', $this->data['triggerid']);
// create form list
$commentFormList = new CFormList('commentFormList');
$commentTextArea = new CTextArea('comments', CMacrosResolverHelper::resolveTriggerDescription($this->data['trigger']), array('rows' => 25, 'width' => ZBX_TEXTAREA_BIG_WIDTH, 'readonly' => $this->data['isCommentExist']));
$commentTextArea->attr('autofocus', 'autofocus');
$commentFormList->addRow(_('Comments'), $commentTextArea);
// append tabs to form
$commentTab = new CTabView();
$commentTab->addTab('commentTab', _s('Comments for "%s".', $this->data['trigger']['description']), $commentFormList);
$commentForm->addItem($commentTab);
// append buttons to form
$saveButton = new CSubmit('save', _('Save'));
$saveButton->setEnabled(!$this->data['isCommentExist']);
if ($this->data['isCommentExist']) {
    $editButton = new CButton('edit', _('Edit'));
    $editButton->setEnabled($this->data['isTriggerEditable']);
} else {
    $editButton = null;
}
$commentForm->addItem(makeFormFooter($saveButton, array($editButton, new CButtonCancel('&triggerid=' . $this->data['triggerid']))));
$commentWidget->addItem($commentForm);
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:monitoring.triggerComment.php

示例14: CTextBox

    $text2 = new CTextBox('macros[' . $i . '][value]', $macro['value'], 40, $readonly, 255);
    $text2->setAttribute('placeholder', _('value'));
    $span = new CSpan('⇒');
    $span->addStyle('vertical-align:top;');
    $deleteButtonCell = null;
    if (!$readonly) {
        $deleteButtonCell = array(new CButton('macros_' . $i . '_remove', _('Remove'), null, 'link_menu element-table-remove'));
        if (isset($macro['globalmacroid'])) {
            $deleteButtonCell[] = new CVar('macros[' . $i . '][globalmacroid]', $macro['globalmacroid'], 'macros_' . $i . '_id');
        }
        if (isset($macro['hostmacroid'])) {
            $deleteButtonCell[] = new CVar('macros[' . $i . '][hostmacroid]', $macro['hostmacroid'], 'macros_' . $i . '_id');
        }
    }
    $row = array($text1, $span, $text2, $deleteButtonCell);
    $macrosTable->addRow($row, 'form_row');
}
// buttons
if (!$readonly) {
    $addButton = new CButton('macro_add', _('Add'), null, 'link_menu element-table-add');
    $buttonColumn = new CCol($addButton);
    $buttonColumn->setAttribute('colspan', 5);
    $buttonRow = new CRow();
    $buttonRow->setAttribute('id', 'row_new_macro');
    $buttonRow->addItem($buttonColumn);
    $macrosTable->addRow($buttonRow);
}
// form list
$macrosFormList = new CFormList('macrosFormList');
$macrosFormList->addRow($macrosTable);
return $macrosFormList;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:common.macros.php

示例15: CWidget

** 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.
**/
$widget = (new CWidget())->setTitle(_('Authentication'));
// create form
$authenticationForm = (new CForm())->setName('authenticationForm');
// create form list
$authenticationFormList = new CFormList('authenticationList');
// append config radio buttons to form list
$authenticationFormList->addRow(_('Default authentication'), (new CRadioButtonList('config', (int) $this->data['config']['authentication_type']))->addValue(_x('Internal', 'authentication'), ZBX_AUTH_INTERNAL, null, 'submit()')->addValue(_('LDAP'), ZBX_AUTH_LDAP, null, 'submit()')->addValue(_('HTTP'), ZBX_AUTH_HTTP, null, 'submit()')->setModern(true));
// append LDAP fields to form list
if ($this->data['config']['authentication_type'] == ZBX_AUTH_LDAP) {
    if ($this->data['user_list']) {
        $userComboBox = new CComboBox('user', $this->data['user']);
        foreach ($this->data['user_list'] as $user) {
            if (check_perm2login($user['userid']) && check_perm2system($user['userid'])) {
                $userComboBox->addItem($user['alias'], $user['alias']);
            }
        }
    } else {
        $userComboBox = (new CTextBox('user', $this->data['user'], true))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH);
    }
    $authenticationFormList->addRow(_('LDAP host'), (new CTextBox('ldap_host', $this->data['config']['ldap_host']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH));
    $authenticationFormList->addRow(_('Port'), (new CNumericBox('ldap_port', $this->data['config']['ldap_port'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH));
    $authenticationFormList->addRow(_('Base DN'), (new CTextBox('ldap_base_dn', $this->data['config']['ldap_base_dn']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH));
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:administration.authentication.edit.php


注:本文中的CFormList::addRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。