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


PHP CTabView::addTab方法代码示例

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


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

示例1: CFormList

$valueMappingForm->addVar('form_refresh', $this->data['form_refresh'] + 1);
$valueMappingForm->addVar('valuemapid', $this->data['valuemapid']);
// create form list
$valueMappingFormList = new CFormList('valueMappingFormList');
// name
$nameTextBox = new CTextBox('mapname', $this->data['mapname'], 40, null, 64);
$nameTextBox->attr('autofocus', 'autofocus');
$valueMappingFormList->addRow(_('Name'), $nameTextBox);
// mappings
$mappingsTable = new CTable(SPACE, 'formElementTable');
$mappingsTable->setAttribute('id', 'mappingsTable');
$mappingsTable->addRow(array(_('Value'), SPACE, _('Mapped to'), SPACE));
$mappingsTable->addRow(new CCol(new CButton('addMapping', _('Add'), '', 'link_menu'), null, 4));
$valueMappingFormList->addRow(_('Mappings'), new CDiv($mappingsTable, 'border_dotted inlineblock objectgroup'));
// add mappings to form by js
if (empty($this->data['mappings'])) {
    zbx_add_post_js('mappingsManager.addNew();');
} else {
    zbx_add_post_js('mappingsManager.addExisting(' . zbx_jsvalue($this->data['mappings']) . ');');
}
// append tab
$valueMappingTab = new CTabView();
$valueMappingTab->addTab('valuemapping', _('Value mapping'), $valueMappingFormList);
$valueMappingForm->addItem($valueMappingTab);
// append buttons
if (!empty($this->data['valuemapid'])) {
    $valueMappingForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CButtonDelete($this->data['confirmMessage'], url_param('valuemapid')), new CButtonCancel())));
} else {
    $valueMappingForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
}
return $valueMappingForm;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.general.valuemapping.edit.php

示例2: CWidget

<?php

/*
** Zabbix
** Copyright (C) 2001-2013 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.
**/
$scriptWidget = new CWidget();
// create form
$scriptForm = new CForm();
$scriptForm->setName('scriptForm');
// append tabs to form
$scriptTab = new CTabView();
$scriptTab->addTab('scriptTab', _s('Result of "%s"', $this->data['info']['name']), new CSpan($this->data['message'], 'pre fixedfont'));
$scriptForm->addItem($scriptTab);
$scriptWidget->addItem($scriptForm);
return $scriptWidget;
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:30,代码来源:general.script.execute.php

示例3: CRadioButtonList

    $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);
    $connectByComboBox->useJQueryStyle();
    $interfaceTable->addRow(array(new CTextBox('interface[ip]', $this->data['interface']['ip'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), new CTextBox('interface[dns]', $this->data['interface']['dns'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), $connectByComboBox, new CTextBox('interface[port]', $this->data['interface']['port'], 18, 'no', 64)));
    $proxyFormList->addRow(_('Interface'), new CDiv($interfaceTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append hosts to form list
$hostsTweenBox = new CTweenBox($proxyForm, 'hosts', $this->data['hosts']);
foreach ($this->data['dbHosts'] as $host) {
    // show only normal hosts, and discovered hosts monitored by the current proxy
    // for new proxies display only normal hosts
    if ($this->data['proxyid'] && idcmp($this->data['proxyid'], $host['proxy_hostid']) || $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
        $hostsTweenBox->addItem($host['hostid'], $host['name'], null, empty($host['proxy_hostid']) || !empty($this->data['proxyid']) && bccomp($host['proxy_hostid'], $this->data['proxyid']) == 0 && $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL);
    }
}
$proxyFormList->addRow(_('Hosts'), $hostsTweenBox->get(_('Proxy hosts'), _('Other hosts')));
// append tabs to form
$proxyTab = new CTabView();
$proxyTab->addTab('proxyTab', _('Proxy'), $proxyFormList);
$proxyForm->addItem($proxyTab);
// append buttons to form
if (!empty($this->data['proxyid'])) {
    $proxyForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete proxy?'), url_param('form') . url_param('proxyid')), new CButtonCancel())));
} else {
    $proxyForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
}
// append form to widget
$proxyWidget->addItem($proxyForm);
return $proxyWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.proxy.edit.php

示例4: CNumericBox

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'];
        }
    }
    $delay = new CNumericBox('slides[' . $step . '][delay]', !empty($slides['delay']) ? $slides['delay'] : '', 5, 'no', true, false);
    $delay->setAttribute('placeholder', _('default'));
    $removeButton = new CButton('remove_' . $step, _('Remove'), 'javascript: removeSlide(this);', 'link_menu');
    $removeButton->setAttribute('remove_slide', $step);
    $row = new CRow(array(new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move'), new CSpan($i++ . ':', 'rowNum', 'current_slide_' . $step), $name, $delay, $removeButton), 'sortable', 'slides_' . $step);
    $slideTable->addRow($row);
}
$addButtonColumn = new CCol(empty($this->data['work_slide']) ? new CButton('add', _('Add'), 'return PopUp("popup.php?srctbl=screens&srcfld1=screenid&dstfrm=' . $slideForm->getName() . '&multiselect=1", 450, 450)', 'link_menu') : null, null, 5);
$addButtonColumn->setAttribute('style', 'vertical-align: middle;');
$slideTable->addRow(new CRow($addButtonColumn, null, 'screenListFooter'));
$slideFormList->addRow(_('Slides'), new CDiv($slideTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
// append tabs to form
$slideTab = new CTabView();
$slideTab->addTab('slideTab', _('Slide'), $slideFormList);
$slideForm->addItem($slideTab);
// append buttons to form
if (empty($this->data['slideshowid'])) {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
} else {
    $slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete slide show?'), url_param('form') . url_param('slideshowid') . url_param('config')), new CButtonCancel())));
}
$slideWidget->addItem($slideForm);
return $slideWidget;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.slideconf.edit.php

示例5: array

            $operationConditionValueComboBox->addItem(0, _('Not Ack'));
            $operationConditionValueComboBox->addItem(1, _('Ack'));
            $rowCondition[] = $operationConditionValueComboBox;
        }
        $newOperationConditionTable->addRow($rowCondition);
        $newOperationConditionFooter = array(new CSubmit('add_opcondition', _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_opcondition', _('Cancel'), null, 'link_menu'));
        $newOperationsTable->addRow(array(_('Operation condition'), new CDiv(array($newOperationConditionTable, $newOperationConditionFooter), 'objectgroup inlineblock border_dotted ui-corner-all')));
    }
    $footer = array(new CSubmit('add_operation', $this->data['new_operation']['action'] == 'update' ? _('Update') : _('Add'), null, 'link_menu'), SPACE . SPACE, new CSubmit('cancel_new_operation', _('Cancel'), null, 'link_menu'));
    $operationFormList->addRow(_('Operation details'), new CDiv(array($newOperationsTable, $footer), 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append tabs to form
$actionTabs = new CTabView();
if (!isset($_REQUEST['form_refresh'])) {
    $actionTabs->setSelected(0);
}
$actionTabs->addTab('actionTab', _('Action'), $actionFormList);
$actionTabs->addTab('conditionTab', _('Conditions'), $conditionFormList);
$actionTabs->addTab('operationTab', _('Operations'), $operationFormList);
$actionForm->addItem($actionTabs);
// append buttons to form
$others = array();
if (!empty($this->data['actionid'])) {
    $others[] = new CButton('clone', _('Clone'));
    $others[] = new CButtonDelete(_('Delete current action?'), url_param('form') . url_param('eventsource') . url_param('actionid'));
}
$others[] = new CButtonCancel(url_param('actiontype'));
$actionForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), $others));
// append form to widget
$actionWidget->addItem($actionForm);
return $actionWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.action.edit.php

示例6: elseif

                    } elseif ($pf['M'] == PARAM_TYPE_COUNTS) {
                        $expressionForm->addVar('paramtype', PARAM_TYPE_COUNTS);
                        $paramTypeElement = SPACE . _('Count');
                    }
                } else {
                    $expressionForm->addVar('paramtype', PARAM_TYPE_SECONDS);
                    $paramTypeElement = SPACE . _('Seconds');
                }
            }
            if ($pid == 1 && (substr($this->data['expr_type'], 0, 3) != 'str' || substr($this->data['expr_type'], 0, 6) == 'strlen') && substr($this->data['expr_type'], 0, 6) != 'regexp' && substr($this->data['expr_type'], 0, 7) != 'iregexp') {
                $paramTypeElement = SPACE . _('Seconds');
            }
            $expressionFormList->addRow($pf['C'] . ' ', array(new CNumericBox('param[' . $pid . ']', $paramValue, 10, $paramIsReadonly), $paramTypeElement));
        } else {
            $expressionFormList->addRow($pf['C'], new CTextBox('param[' . $pid . ']', $paramValue, 30));
            $expressionForm->addVar('paramtype', PARAM_TYPE_SECONDS);
        }
    }
} else {
    $expressionForm->addVar('paramtype', PARAM_TYPE_SECONDS);
    $expressionForm->addVar('param', 0);
}
$expressionFormList->addRow('N', new CTextBox('value', $this->data['value'], 10));
// append tabs to form
$expressionTab = new CTabView();
$expressionTab->addTab('expressionTab', _('Trigger expression condition'), $expressionFormList);
$expressionForm->addItem($expressionTab);
// append buttons to form
$expressionForm->addItem(makeFormFooter(array(new CSubmit('insert', _('Insert'))), array(new CButtonCancel(url_param('parent_discoveryid') . url_param('dstfrm') . url_param('dstfld1')))));
$expressionWidget->addItem($expressionForm);
return $expressionWidget;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.triggers.expression.php

示例7: CForm

    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);
}
return $httpPopupWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.httpconf.popup.php

示例8: CForm

/*
** 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;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:30,代码来源:administration.general.macros.edit.php

示例9: foreach

    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) {
        array_push($targets, 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($targets, array(new CCheckBox('copy_targetid[' . $group['groupid'] . ']', uint_in_array($group['groupid'], $this->data['copy_targetid']), null, $group['groupid']), SPACE, $group['name'], BR()));
    }
}
if (empty($targets)) {
    array_push($targets, BR());
}
$triggersFormList->addRow(_('Target'), $targets);
// append tabs to form
$triggersTab = new CTabView();
$triggersTab->addTab('triggersTab', count($this->data['elements']) . SPACE . _('elements copy to ...'), $triggersFormList);
$triggersForm->addItem($triggersTab);
// append buttons to form
$triggersForm->addItem(makeFormFooter(new CSubmit('copy', _('Copy')), new CButtonCancel(url_param('groupid') . url_param('hostid') . url_param('config'))));
$triggersWidget->addItem($triggersForm);
return $triggersWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.copy.elements.php

示例10: array

    }
    // web scenarios
    $httpTests = API::HttpTest()->get(array('output' => array('httptestid', 'name'), 'hostids' => $templateid, 'inherited' => false));
    if ($httpTests) {
        $httpTestList = array();
        foreach ($httpTests as $httpTest) {
            $httpTestList[$httpTest['httptestid']] = $httpTest['name'];
        }
        order_result($httpTestList);
        $listBox = new CListBox('httpTests', null, 8);
        $listBox->setAttribute('disabled', 'disabled');
        $listBox->addItems($httpTestList);
        $templateList->addRow(_('Web scenarios'), $listBox);
    }
}
$divTabs->addTab('templateTab', _('Template'), $templateList);
// FULL CLONE }
// } TEMPLATE WIDGET
// TEMPLATES{
$tmplList = new CFormList('tmpllist');
// create linked template table
$linkedTemplateTable = new CTable(_('No templates linked.'), 'formElementTable');
$linkedTemplateTable->attr('id', 'linkedTemplateTable');
$linkedTemplateTable->attr('style', 'min-width: 400px;');
$linkedTemplateTable->setHeader(array(_('Name'), _('Action')));
$ignoredTemplates = array();
foreach ($this->data['linkedTemplates'] as $template) {
    $tmplList->addVar('templates[]', $template['templateid']);
    $linkedTemplateTable->addRow(array($template['name'], array(new CSubmit('unlink[' . $template['templateid'] . ']', _('Unlink'), null, 'link_menu'), SPACE, SPACE, isset($this->data['original_templates'][$template['templateid']]) ? new CSubmit('unlink_and_clear[' . $template['templateid'] . ']', _('Unlink and clear'), null, 'link_menu') : SPACE)), null, 'conditions_' . $template['templateid']);
    $ignoredTemplates[$template['templateid']] = $template['name'];
}
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.template.edit.php

示例11: 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

示例12: CLink

    $discoveryLink = new CLink(_('Discovery'), 'host_discovery.php?hostid=' . $this->data['host']['hostid'] . url_param('groupid'));
    $webLink = new CLink(_('Web'), 'httpconf.php?hostid=' . $this->data['host']['hostid'] . url_param('groupid'));
} else {
    $hostLink = _('Host');
    $applicationsLink = _('Application');
    $itemsLink = _('Items');
    $triggersLink = _('Triggers');
    $graphsLink = _('Graphs');
    $discoveryLink = _('Discovery');
    $webLink = _('Web');
}
$configurationArray = array($hostLink, new CSpan(array($applicationsLink, SPACE, '(' . $this->data['host']['applications'] . ')'), 'overview-link'), new CSpan(array($itemsLink, SPACE, '(' . $this->data['host']['items'] . ')'), 'overview-link'), new CSpan(array($triggersLink, SPACE, '(' . $this->data['host']['triggers'] . ')'), 'overview-link'), new CSpan(array($graphsLink, SPACE, '(' . $this->data['host']['graphs'] . ')'), 'overview-link'), new CSpan(array($discoveryLink, SPACE, '(' . $this->data['host']['discoveries'] . ')'), 'overview-link'), new CSpan(array($webLink, SPACE, '(' . $this->data['host']['httpTests'] . ')'), 'overview-link'));
$overviewFormList->addRow(_('Configuration'), $configurationArray);
$hostInventoriesTab = new CTabView(array('remember' => true));
$hostInventoriesTab->setSelected(0);
$hostInventoriesTab->addTab('overviewTab', _('Overview'), $overviewFormList);
/*
 * Details tab
 */
$detailsFormList = new CFormList();
$inventoryValues = false;
if ($this->data['host']['inventory']) {
    foreach ($this->data['host']['inventory'] as $key => $value) {
        if (!zbx_empty($value)) {
            $detailsFormList->addRow($this->data['tableTitles'][$key]['title'], new CSpan(zbx_str2links($value), 'text-field'));
            $inventoryValues = true;
        }
    }
}
if (!$inventoryValues) {
    $hostInventoriesTab->setDisabled(array(1));
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:inventory.host.view.php

示例13: array

} else {
    $screenFormList->addVar('width', 500);
    $screenFormList->addVar('height', 100);
}
if (in_array($resourceType, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_MAP, SCREEN_RESOURCE_CLOCK, SCREEN_RESOURCE_URL))) {
    $hightAlignRadioButton = array(new CRadioButton('halign', HALIGN_LEFT, null, 'halign_' . HALIGN_LEFT, $halign == HALIGN_LEFT), new CLabel(_('Left'), 'halign_' . HALIGN_LEFT), new CRadioButton('halign', HALIGN_CENTER, null, 'halign_' . HALIGN_CENTER, $halign == HALIGN_CENTER), new CLabel(_('Center'), 'halign_' . HALIGN_CENTER), new CRadioButton('halign', HALIGN_RIGHT, null, 'halign_' . HALIGN_RIGHT, $halign == HALIGN_RIGHT), new CLabel(_('Right'), 'halign_' . HALIGN_RIGHT));
    $screenFormList->addRow(_('Horizontal align'), new CDiv($hightAlignRadioButton, 'jqueryinputset'));
} else {
    $screenFormList->addVar('halign', 0);
}
$verticalAlignRadioButton = array(new CRadioButton('valign', VALIGN_TOP, null, 'valign_' . VALIGN_TOP, $valign == VALIGN_TOP), new CLabel(_('Top'), 'valign_' . VALIGN_TOP), new CRadioButton('valign', VALIGN_MIDDLE, null, 'valign_' . VALIGN_MIDDLE, $valign == VALIGN_MIDDLE), new CLabel(_('Middle'), 'valign_' . VALIGN_MIDDLE), new CRadioButton('valign', VALIGN_BOTTOM, null, 'valign_' . VALIGN_BOTTOM, $valign == VALIGN_BOTTOM), new CLabel(_('Bottom'), 'valign_' . VALIGN_BOTTOM));
$screenFormList->addRow(_('Vertical align'), new CDiv($verticalAlignRadioButton, 'jqueryinputset'));
$screenFormList->addRow(_('Column span'), new CNumericBox('colspan', $colspan, 3));
$screenFormList->addRow(_('Row span'), new CNumericBox('rowspan', $rowspan, 3));
// dynamic addon
if ($this->data['screen']['templateid'] == 0 && in_array($resourceType, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_PLAIN_TEXT))) {
    $screenFormList->addRow(_('Dynamic item'), new CCheckBox('dynamic', $dynamic, null, 1));
}
// append tabs to form
$screenTab = new CTabView();
$screenTab->setAttribute('style', 'text-align: left;');
$screenTab->addTab('screenTab', _('Screen cell configuration'), $screenFormList);
$screenForm->addItem($screenTab);
// append buttons to form
$buttons = array();
if (isset($_REQUEST['screenitemid'])) {
    array_push($buttons, new CButtonDelete(null, url_param('form') . url_param('screenid') . url_param('screenitemid')));
}
array_push($buttons, new CButtonCancel(url_param('screenid')));
$screenForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), $buttons));
return $screenForm;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.screen.constructor.edit.php

示例14: foreach

        foreach ($zbxSounds as $filename => $file) {
            $soundList->addItem($file, $filename);
        }
        $triggersTable->addRow(array(new CCheckBox('messages[triggers.severities][' . $severity . ']', isset($this->data['messages']['triggers.severities'][$severity]), null, 1), getSeverityCaption($severity), SPACE, $soundList, new CButton('start', _('Play'), "javascript: testUserSound('messages_sounds." . $severity . "');", 'formlist'), new CButton('stop', _('Stop'), 'javascript: AudioControl.stop();', 'formlist')));
        zbx_subarray_push($msgVisibility, 1, 'messages[triggers.severities][' . $severity . ']');
        zbx_subarray_push($msgVisibility, 1, 'messages[sounds.' . $severity . ']');
    }
    $userMessagingFormList->addRow(_('Trigger severity'), $triggersTable, false, 'triggers_row');
    zbx_add_post_js("\n\t\tjQuery('#messages_enabled').bind('click', function() {\n\t\t\tif (this.checked\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.recovery']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_0']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_1']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_2']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_3']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_4']\").is(':checked')\n\t\t\t\t\t&& !jQuery(\"input[id='messages_triggers.severities_5']\").is(':checked')) {\n\t\t\t\tjQuery(\"input[id='messages_triggers.recovery']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_0']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_1']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_2']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_3']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_4']\").attr('checked', true);\n\t\t\t\tjQuery(\"input[id='messages_triggers.severities_5']\").attr('checked', true);\n\t\t\t}\n\n\t\t\t// enable/disable childs fields\n\t\t\tif (this.checked) {\n\t\t\t\tjQuery('#messagingTab input, #messagingTab select').removeAttr('disabled');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tjQuery('#messagingTab input, #messagingTab select').attr('disabled', 'disabled');\n\t\t\t\tjQuery('#messages_enabled').removeAttr('disabled');\n\t\t\t}\n\t\t});\n\n\t\t// initial state: enable/disable childs fields\n\t\tif (jQuery('#messages_enabled').is(':checked')) {\n\t\t\tjQuery('#messagingTab input, #messagingTab select').removeAttr('disabled');\n\t\t}\n\t\telse {\n\t\t\tjQuery('#messagingTab input, #messagingTab select').attr('disabled', 'disabled');\n\t\t\tjQuery('#messages_enabled').removeAttr('disabled');\n\t\t}");
}
// append form lists to tab
$userTab = new CTabView();
if (!$this->data['form_refresh']) {
    $userTab->setSelected(0);
}
$userTab->addTab('userTab', _('User'), $userFormList);
if (isset($userMediaFormList)) {
    $userTab->addTab('mediaTab', _('Media'), $userMediaFormList);
}
if (!$this->data['is_profile']) {
    /*
     * Permissions tab
     */
    $permissionsFormList = new CFormList('permissionsFormList');
    $userTypeComboBox = new CComboBox('user_type', $this->data['user_type'], 'submit();');
    $userTypeComboBox->addItem(USER_TYPE_ZABBIX_USER, user_type2str(USER_TYPE_ZABBIX_USER));
    $userTypeComboBox->addItem(USER_TYPE_ZABBIX_ADMIN, user_type2str(USER_TYPE_ZABBIX_ADMIN));
    $userTypeComboBox->addItem(USER_TYPE_SUPER_ADMIN, user_type2str(USER_TYPE_SUPER_ADMIN));
    if (isset($this->data['userid']) && bccomp(CWebUser::$data['userid'], $this->data['userid']) == 0) {
        $userTypeComboBox->setEnabled('disabled');
        $permissionsFormList->addRow(_('User type'), array($userTypeComboBox, SPACE, new CSpan(_('User can\'t change type for himself'))));
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:administration.users.edit.php

示例15: CForm

$screenWidget->addPageHeader(_('CONFIGURATION OF SCREENS'));
if (!empty($this->data['templateid'])) {
    $screenWidget->addItem(get_header_host_table('screens', $this->data['templateid']));
}
// create form
$screenForm = new CForm();
$screenForm->setName('screenForm');
$screenForm->addVar('form', $this->data['form']);
if (!empty($this->data['screenid'])) {
    $screenForm->addVar('screenid', $this->data['screenid']);
}
$screenForm->addVar('templateid', $this->data['templateid']);
// create screen form list
$screenFormList = new CFormList('screenFormList');
$nameTextBox = new CTextBox('name', $this->data['name'], ZBX_TEXTBOX_STANDARD_SIZE);
$nameTextBox->attr('autofocus', 'autofocus');
$screenFormList->addRow(_('Name'), $nameTextBox);
$screenFormList->addRow(_('Columns'), new CNumericBox('hsize', $this->data['hsize'], 3));
$screenFormList->addRow(_('Rows'), new CNumericBox('vsize', $this->data['vsize'], 3));
// append tabs to form
$screenTab = new CTabView();
$screenTab->addTab('screenTab', _('Screen'), $screenFormList);
$screenForm->addItem($screenTab);
// append buttons to form
if (isset($this->data['screenid'])) {
    $screenForm->addItem(makeFormFooter(new CSubmit('update', _('Update')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete screen?'), url_param('form') . url_param('screenid') . url_param('templateid')), new CButtonCancel(url_param('templateid')))));
} else {
    $screenForm->addItem(makeFormFooter(new CSubmit('add', _('Add')), new CButtonCancel(url_param('templateid'))));
}
$screenWidget->addItem($screenForm);
return $screenWidget;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:configuration.screen.edit.php


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