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


PHP CSubmit类代码示例

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


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

示例1: bodyToString

 function bodyToString($destroy = true)
 {
     $left = new CDiv(null, 'left');
     $left->addItem(new CDiv($this->getList(), 'left_menu'));
     $link1 = new CLink('www.zabbix.com', 'http://www.zabbix.com/', null, null, true);
     $link1->setAttribute('target', '_blank');
     $link2 = new CLink('GPL v2', 'http://www.zabbix.com/license.php', null, null, true);
     $link2->setAttribute('target', '_blank');
     $licence = new CDiv(array($link1, BR(), ' Licensed under ', $link2), 'setup_wizard_licence');
     $left->addItem($licence);
     $right = new CDiv(null, 'right');
     if ($this->getStep() == 0) {
         $right->addItem(new CDiv(null, 'blank_title'));
         $right->addItem(new CDiv($this->getState(), 'blank_under_title'));
         $container = new CDiv(array($left, $right), 'setup_wizard setup_wizard_welcome');
     } else {
         $right->addItem(new CDiv($this->stage[$this->getStep()]['title'], 'setup_title'));
         $right->addItem(new CDiv($this->getState(), 'under_title'));
         $container = new CDiv(array($left, $right), 'setup_wizard');
     }
     if (isset($this->stage[$this->getStep() + 1])) {
         $next = new CSubmit('next[' . $this->getStep() . ']', _('Next') . SPACE . '»');
     } else {
         $next = new CSubmit('finish', _('Finish'));
     }
     if (isset($this->HIDE_CANCEL_BUTTON) && $this->HIDE_CANCEL_BUTTON) {
         $cancel = null;
     } else {
         $cancel = new CDiv(new CSubmit('cancel', _('Cancel')), 'footer_left');
     }
     if ($this->DISABLE_NEXT_BUTTON) {
         $next->setEnabled(false);
     }
     // if the user is not logged in (first setup run) hide the "previous" button on the final step
     if ($this->getStep() && (CWebUser::$data && CWebUser::getType() == USER_TYPE_SUPER_ADMIN || $this->getStep() < 5)) {
         $back = new CSubmit('back[' . $this->getStep() . ']', '&laquo;' . SPACE . _('Previous'));
     } else {
         $back = null;
     }
     $footer = new CDiv(array($cancel, new CDiv(array($back, $next), 'footer_right')), 'footer');
     $container->addItem($footer);
     return parent::bodyToString($destroy) . $container->ToString();
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:43,代码来源:setup.inc.php

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

示例3: foreach

    $lstGroups->attributes['style'] = 'width: 320px';
    foreach ($this->data['groups'] as $group) {
        $lstGroups->addItem($group['usrgrpid'], $group['name']);
    }
    $userFormList->addRow(_('Groups'), array($lstGroups, new CButton('add_group', _('Add'), 'return PopUp("popup_usrgrp.php?dstfrm=' . $userForm->getName() . '&list_name=user_groups_to_del[]&var_name=user_groups", 450, 450);', 'formlist'), BR(), count($this->data['user_groups']) > 0 ? new CSubmit('del_user_group', _('Delete selected'), null, 'formlist') : null));
}
// append password to form list
if ($data['auth_type'] == ZBX_AUTH_INTERNAL) {
    if (!$this->data['userid'] || isset($this->data['change_password'])) {
        $userFormList->addRow(_('Password'), new CPassBox('password1', $this->data['password1'], ZBX_TEXTBOX_SMALL_SIZE));
        $userFormList->addRow(_('Password (once again)'), new CPassBox('password2', $this->data['password2'], ZBX_TEXTBOX_SMALL_SIZE));
        if (isset($this->data['change_password'])) {
            $userForm->addVar('change_password', $this->data['change_password']);
        }
    } else {
        $passwdButton = new CSubmit('change_password', _('Change password'), null, 'formlist');
        if ($this->data['alias'] == ZBX_GUEST_USER) {
            $passwdButton->setAttribute('disabled', 'disabled');
        }
        $userFormList->addRow(_('Password'), $passwdButton);
    }
} else {
    $userFormList->addRow(_('Password'), new CSpan(_s('Unavailable for users with %1$s.', authentication2str($data['auth_type']))));
}
// append languages to form list
$languageComboBox = new CComboBox('lang', $this->data['lang']);
$allLocalesAvailable = true;
foreach (getLocales() as $localeId => $locale) {
    if ($locale['display']) {
        // checking if this locale exists in the system. The only way of doing it is to try and set one
        // trying to set only the LC_MONETARY locale to avoid changing LC_NUMERIC
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:administration.users.edit.php

示例4: CWidget

 * Display
 */
$latestWidget = new CWidget(null, 'latest-mon');
$latestWidget->addHeader(_('Items'));
$filterForm = new CForm('get');
$filterForm->setAttribute('name', ' zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterTable = new CTable(null, 'filter');
$filterTable->setCellPadding(0);
$filterTable->setCellSpacing(0);
$filterTable->addRow(array(new CCol(bold(_('Host groups') . ':'), 'label'), new CCol(new CMultiSelect(array('name' => 'groupids[]', 'objectName' => 'hostGroup', 'data' => $multiSelectHostGroupData, 'popup' => array('parameters' => 'srctbl=host_groups&dstfrm=' . $filterForm->getName() . '&dstfld1=groupids_' . '&srcfld1=groupid&multiselect=1', 'width' => 450, 'height' => 450, 'buttonClass' => 'input filter-multiselect-select-button'))), 'inputcol'), new CCol(bold(_('Name') . ':'), 'label'), new CCol(new CTextBox('select', $filter['select'], 40), 'inputcol')));
$filterTable->addRow(array(new CCol(bold(_('Hosts') . ':'), 'label'), new CCol(new CMultiSelect(array('name' => 'hostids[]', 'objectName' => 'hosts', 'data' => $multiSelectHostData, 'popup' => array('parameters' => 'srctbl=hosts&dstfrm=' . $filterForm->getName() . '&dstfld1=hostids_&srcfld1=hostid' . '&real_hosts=1&multiselect=1', 'width' => 450, 'height' => 450, 'buttonClass' => 'input filter-multiselect-select-button'))), 'inputcol'), new CCol(bold(_('Show items without data') . ':'), 'label'), new CCol(new CCheckBox('show_without_data', $filter['showWithoutData'], null, 1), 'inputcol')));
$filterTable->addRow(array(new CCol(bold(_('Application') . ':'), 'label'), new CCol(array(new CTextBox('application', $filter['application']), new CButton('application_name', _('Select'), 'return PopUp("popup.php?srctbl=applications&srcfld1=name&real_hosts=1&dstfld1=application' . '&with_applications=1&dstfrm=' . $filterForm->getName() . '");', 'filter-select-button')), 'inputcol'), new CCol(bold(_('Show details') . ':'), 'label'), new CCol(new CCheckBox('show_details', $filter['showDetails'], null, 1), 'inputcol')));
$filterButton = new CSubmit('filter_set', _('Filter'), 'chkbxRange.clearSelectedOnFilterChange();');
$filterButton->useJQueryStyle();
$resetButton = new CSubmit('filter_rst', _('Reset'), 'chkbxRange.clearSelectedOnFilterChange();');
$resetButton->useJQueryStyle();
$divButtons = new CDiv(array($filterButton, SPACE, $resetButton));
$divButtons->setAttribute('style', 'padding: 4px 0px;');
$filterTable->addRow(new CCol($divButtons, 'controls', 4));
$filterForm->addItem($filterTable);
$latestWidget->addFlicker($filterForm, CProfile::get('web.latest.filter.state', 0));
$latestWidget->addPageHeader(_('LATEST DATA'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])));
$form = new CForm('GET', 'history.php');
$form->setName('items');
// set an ID for the hidden input so that it wouldn't conflict with the ID of the "Go" button list
$form->addItem(new CVar('action', HISTORY_BATCH_GRAPH, 'action-hidden'));
// table
$table = new CTableInfo($filterSet ? _('No values found.') : _('Specify some filter condition to see the values.'));
if ($singleHostSelected) {
    $hostHeader = null;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:latest.php

示例5: get_node_name_by_elid

        $group['nodename'] = get_node_name_by_elid($group['groupid'], true, ': ');
    }
    unset($group);
    $sortFields = array(array('field' => 'nodename', 'order' => ZBX_SORT_UP), array('field' => 'name', 'order' => ZBX_SORT_UP));
    CArrayHelper::sort($groups, $sortFields);
    $lstGroups = new CListBox('del_groups[]', null, 15);
    $lstGroups->setAttribute('style', 'width: 200px;');
    foreach ($groups as $gnum => $group) {
        $lstGroups->addItem($group['groupid'], $group['nodename'] . $group['name']);
    }
    if (!$filterEnable) {
        $lstGroups->setAttribute('disabled', 'disabled');
    }
    $addButton = new CButton('add', _('Add'), "return PopUp('popup_right.php?dstfrm=" . $dashForm->getName() . "&permission=" . PERM_READ_WRITE . "',450,450);");
    $addButton->setEnabled($filterEnable);
    $delButton = new CSubmit('delete', _('Delete selected'));
    $delButton->setEnabled($filterEnable);
    $dashList->addRow(_('Groups'), array($lstGroups, BR(), $addButton, $delButton));
}
//HOSTS
// SPACE added to extend CB width in Chrome
$cbMain = new CCheckBox('maintenance', $maintenance, null, '1');
if (!$filterEnable) {
    $cbMain->setAttribute('disabled', 'disabled');
}
$dashList->addRow(_('Hosts'), array($cbMain, _('Show hosts in maintenance')));
// Trigger
$severity = zbx_toHash($severity);
$trgSeverities = array();
$severities = array(TRIGGER_SEVERITY_NOT_CLASSIFIED, TRIGGER_SEVERITY_INFORMATION, TRIGGER_SEVERITY_WARNING, TRIGGER_SEVERITY_AVERAGE, TRIGGER_SEVERITY_HIGH, TRIGGER_SEVERITY_DISASTER);
foreach ($severities as $snum => $sever) {
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:dashconf.php

示例6: CTable

$hostInventoryWidget->addHeader(_('Hosts'), $rForm);
$filterTable = new CTable('', 'filter filter-center');
// getting inventory fields to make a drop down
$inventoryFields = getHostInventories(true);
// 'true' means list should be ordered by title
$inventoryFieldsComboBox = new CComboBox('filter_field', $this->data['filterField']);
foreach ($inventoryFields as $inventoryField) {
    $inventoryFieldsComboBox->addItem($inventoryField['db_field'], $inventoryField['title']);
}
$exactComboBox = new CComboBox('filter_exact', $this->data['filterExact']);
$exactComboBox->addItem('0', _('like'));
$exactComboBox->addItem('1', _('exactly'));
$filterTable->addRow(array(array(array(bold(_('Field')), SPACE, $inventoryFieldsComboBox), array($exactComboBox, new CTextBox('filter_field_value', $this->data['filterFieldValue'], 20)))), 'host-inventories');
$filter = new CSubmit('filter_set', _('Filter'));
$filter->useJQueryStyle('main');
$reset = new CSubmit('filter_rst', _('Reset'));
$reset->useJQueryStyle();
$divButtons = new CDiv(array($filter, SPACE, $reset));
$divButtons->setAttribute('style', 'padding: 4px 0px;');
$footerCol = new CCol($divButtons, 'controls');
$filterTable->addRow($footerCol);
$filterForm = new CForm('get');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->addItem($filterTable);
$hostInventoryWidget->addFlicker($filterForm, CProfile::get('web.hostinventories.filter.state', 0));
$hostInventoryWidget->addHeaderRowNumber();
$table = new CTableInfo(_('No hosts found.'));
$table->setHeader(array(make_sorting_header(_('Host'), 'name', $this->data['sort'], $this->data['sortorder']), _('Group'), make_sorting_header(_('Name'), 'pr_name', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Type'), 'pr_type', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('OS'), 'pr_os', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Serial number A'), 'pr_serialno_a', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('Tag'), 'pr_tag', $this->data['sort'], $this->data['sortorder']), make_sorting_header(_('MAC address A'), 'pr_macaddress_a', $this->data['sort'], $this->data['sortorder'])));
foreach ($this->data['hosts'] as $host) {
    $hostGroups = array();
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:inventory.host.list.php

示例7: dirname

** 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);
return $commentWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:monitoring.triggerComment.php

示例8: CDiv

}
$graphFormList->addRow(_('Items'), (new CDiv($itemsTable))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR));
// append tabs to form
$graphTab = new CTabView();
if (!$this->data['form_refresh']) {
    $graphTab->setSelected(0);
}
$graphTab->addTab('graphTab', empty($this->data['parent_discoveryid']) ? _('Graph') : _('Graph prototype'), $graphFormList);
/*
 * Preview tab
 */
$graphPreviewTable = (new CTable())->addStyle('width: 100%;')->addRow((new CRow((new CDiv())->setId('previewChar')))->addClass(ZBX_STYLE_CENTER));
$graphTab->addTab('previewTab', _('Preview'), $graphPreviewTable);
// append buttons to form
if (!empty($this->data['graphid'])) {
    $updateButton = new CSubmit('update', _('Update'));
    $deleteButton = new CButtonDelete($this->data['parent_discoveryid'] ? _('Delete graph prototype?') : _('Delete graph?'), url_params(['graphid', 'parent_discoveryid', 'hostid']));
    if (!empty($this->data['templateid'])) {
        $updateButton->setEnabled(false);
        $deleteButton->setEnabled(false);
    }
    $graphTab->setFooter(makeFormFooter($updateButton, [new CSubmit('clone', _('Clone')), $deleteButton, new CButtonCancel(url_param('parent_discoveryid') . url_param('hostid', $this->data['hostid']))]));
} else {
    $graphTab->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_param('parent_discoveryid') . url_param('hostid', $this->data['hostid']))]));
}
// insert js (depended from some variables inside the file)
insert_show_color_picker_javascript();
require_once dirname(__FILE__) . '/js/configuration.graph.edit.js.php';
$graphForm->addItem($graphTab);
// append form to widget
$widget->addItem($graphForm);
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.graph.edit.php

示例9: CTabView

$graphTab = new CTabView();
if (!$this->data['form_refresh']) {
    $graphTab->setSelected(0);
}
$graphTab->addTab('graphTab', empty($this->data['parent_discoveryid']) ? _('Graph') : _('Graph prototype'), $graphFormList);
/*
 * Preview tab
 */
$chartImage = new CImg('chart3.php?period=3600');
$chartImage->preload();
$graphPreviewTable = new CTable(null, 'graph');
$graphPreviewTable->addRow(new CDiv($chartImage, null, 'previewChar'));
$graphTab->addTab('previewTab', _('Preview'), $graphPreviewTable);
$graphForm->addItem($graphTab);
// append buttons to form
$saveButton = new CSubmit('save', _('Save'));
$cancelButton = new CButtonCancel(url_param('parent_discoveryid'));
if (!empty($this->data['graphid'])) {
    $deleteButton = new CButtonDelete($this->data['parent_discoveryid'] ? _('Delete graph prototype?') : _('Delete graph?'), url_params(array('graphid', 'parent_discoveryid', 'hostid')));
    $cloneButton = new CSubmit('clone', _('Clone'));
    if (!empty($this->data['templateid'])) {
        $saveButton->setEnabled(false);
        $deleteButton->setEnabled(false);
    }
    $graphForm->addItem(makeFormFooter($saveButton, array($cloneButton, $deleteButton, $cancelButton)));
} else {
    $graphForm->addItem(makeFormFooter($saveButton, $cancelButton));
}
// insert js (depended from some variables inside the file)
insert_show_color_picker_javascript();
require_once dirname(__FILE__) . '/js/configuration.graph.edit.js.php';
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.graph.edit.php

示例10: CCol

        }
    }
    $col = new CCol($result);
    $col->setAttribute('style', $style);
    $resultTable->addRow(new CRow(array($e['list'], $col)));
}
$result = '-';
$style = 'text-align: center;';
if ($allowedTesting && $test) {
    if (evalExpressionData($expression, $macrosData)) {
        $result = 'TRUE';
        $style = 'background-color: #ccf; color: #00f;';
    } else {
        $result = 'FALSE';
        $style = 'background-color: #fcc; color: #f00;';
    }
}
$col = new CCol($result);
$col->setAttribute('style', $style);
$resultTable->setFooter(array($outline, $col), $resultTable->headerClass);
$testForm->addRow(_('Result'), $resultTable);
// action buttons
$testButton = new CSubmit('test_expression', _('Test'));
if (!$allowedTesting) {
    $testButton->setAttribute('disabled', 'disabled');
}
$testForm->addItemToBottomRow($testButton);
$testForm->addItemToBottomRow(SPACE);
$testForm->addItemToBottomRow(new CButton('close', _('Close'), 'javascript: self.close();'));
$testForm->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:tr_testexpr.php

示例11: array_push

        array_push($expressionRow, $addExpressionButton);
    } else {
        // add button
        $addExpressionButton = new CSubmit('and_expression', _('And'), null, 'formlist');
        if ($this->data['limited']) {
            $addExpressionButton->setAttribute('disabled', 'disabled');
        }
        array_push($expressionRow, $addExpressionButton);
        // or button
        $orExpressionButton = new CSubmit('or_expression', _('Or'), null, 'formlist');
        if ($this->data['limited']) {
            $orExpressionButton->setAttribute('disabled', 'disabled');
        }
        array_push($expressionRow, $orExpressionButton);
        // replace button
        $replaceExpressionButton = new CSubmit('replace_expression', _('Replace'), null, 'formlist');
        if ($this->data['limited']) {
            $replaceExpressionButton->setAttribute('disabled', 'disabled');
        }
        array_push($expressionRow, $replaceExpressionButton);
    }
} elseif ($this->data['input_method'] != IM_FORCED) {
    $inputMethodToggle = new CSpan(_('Expression constructor'), 'link');
    $inputMethodToggle->setAttribute('onclick', 'javascript: ' . 'document.getElementById("toggle_input_method").value=1;' . 'document.getElementById("input_method").value=' . ($this->data['input_method'] == IM_TREE ? IM_ESTABLISHED : IM_TREE) . ';' . 'document.forms["' . $triggersForm->getName() . '"].submit();');
    $expressionRow[] = array(BR(), $inputMethodToggle);
}
$triggersFormList->addRow(_('Expression'), $expressionRow);
// append expression table to form list
if ($this->data['input_method'] == IM_TREE) {
    $expressionTable = new CTable(null, 'formElementTable');
    $expressionTable->setAttribute('style', 'min-width: 500px;');
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.triggers.edit.php

示例12: CPassBox

    if (isset($this->data['change_bind_password']) || zbx_empty($this->data['config']['ldap_bind_password'])) {
        $authenticationForm->addVar('change_bind_password', 1);
        $authenticationFormList->addRow(_('Bind password'), new CPassBox('ldap_bind_password', null, ZBX_TEXTBOX_SMALL_SIZE));
    } else {
        $authenticationFormList->addRow(_('Bind password'), new CSubmit('change_bind_password', _('Change password'), null, 'formlist'));
    }
    $authenticationFormList->addRow(_('Test authentication'), ' [' . _('must be a valid LDAP user') . ']');
    $authenticationFormList->addRow(_('Login'), $userComboBox);
    $authenticationFormList->addRow(_('User password'), new CPassBox('user_password', null, ZBX_TEXTBOX_SMALL_SIZE));
}
// append form list to tab
$authenticationTab = new CTabView();
$authenticationTab->addTab('authenticationTab', $this->data['title'], $authenticationFormList);
// append tab to form
$authenticationForm->addItem($authenticationTab);
// create save button
$saveButton = new CSubmit('save', _('Save'));
if ($this->data['is_authentication_type_changed']) {
    $saveButton->addAction('onclick', 'javascript: ' . 'if (Confirm("' . _('Switching authentication method will reset all except this session! Continue?') . '")) {' . 'jQuery("#authenticationForm").submit(); return true; } else { return false; }');
} elseif ($this->data['config']['authentication_type'] != ZBX_AUTH_LDAP) {
    $saveButton->setAttribute('disabled', 'true');
}
// append buttons to form
if ($this->data['config']['authentication_type'] == ZBX_AUTH_LDAP) {
    $authenticationForm->addItem(makeFormFooter($saveButton, new CSubmit('test', _('Test'))));
} else {
    $authenticationForm->addItem(makeFormFooter($saveButton));
}
// append form to widget
$authenticationWidget->addItem($authenticationForm);
return $authenticationWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:administration.authentication.edit.php

示例13: bodyToString

 function bodyToString($destroy = true)
 {
     $left = new CDiv(null, 'left');
     $left->addItem(new CDiv(null, 'setup_logo'));
     $left->addItem(new CDiv(ZABBIX_VERSION, 'setup_version'));
     $left->addItem(new CDiv($this->getList(), 'left_menu'));
     $link1 = new CLink('www.zabbix.com', 'http://www.zabbix.com/', null, null, true);
     $link1->setAttribute('target', '_blank');
     $link2 = new CLink('GPL v2', 'http://www.zabbix.com/license.php', null, null, true);
     $link2->setAttribute('target', '_blank');
     $licence = new CDiv(array($link1, BR(), ' Licensed under ', $link2), 'setup_wizard_licence');
     $left->addItem($licence);
     $right = new CDiv(null, 'right');
     if ($this->getStep() == 0) {
         $right->addItem(new CDiv(null, 'blank_title'));
         $right->addItem(new CDiv($this->getState(), 'blank_under_title'));
         $container = new CDiv(array($left, $right), 'setup_wizard setup_wizard_welcome');
     } else {
         $right->addItem(new CDiv($this->stage[$this->getStep()]['title'], 'setup_title'));
         $right->addItem(new CDiv($this->getState(), 'under_title'));
         $container = new CDiv(array($left, $right), 'setup_wizard');
     }
     if (isset($this->stage[$this->getStep() + 1])) {
         $next = new CSubmit('next[' . $this->getStep() . ']', _('Next') . ' >>');
     } else {
         $next = new CSubmit('finish', _('Finish'));
     }
     if (isset($this->HIDE_CANCEL_BUTTON) && $this->HIDE_CANCEL_BUTTON) {
         $cancel = null;
     } else {
         $cancel = new CDiv(new CSubmit('cancel', _('Cancel')), 'footer_left');
     }
     if ($this->DISABLE_NEXT_BUTTON) {
         $next->setEnabled(false);
     }
     $footer = new CDiv(array($cancel, new CDiv(array($this->getStep() != 0 ? new CSubmit('back[' . $this->getStep() . ']', '<< ' . _('Previous')) : null, $next), 'footer_right')), 'footer');
     $container->addItem($footer);
     return parent::bodyToString($destroy) . $container->ToString();
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:39,代码来源:setup.inc.php

示例14: CLink

        $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;
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.graph.list.php

示例15: CPassBox

    // bind password
    if (isset($this->data['change_bind_password']) || zbx_empty($this->data['config']['ldap_bind_password'])) {
        $authenticationForm->addVar('change_bind_password', 1);
        $authenticationFormList->addRow(_('Bind password'), (new CPassBox('ldap_bind_password'))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH));
    } else {
        $authenticationFormList->addRow(_('Bind password'), (new CSubmit('change_bind_password', _('Change password')))->addClass(ZBX_STYLE_BTN_GREY));
    }
    $authenticationFormList->addRow(_('Test authentication'), ' [' . _('must be a valid LDAP user') . ']');
    $authenticationFormList->addRow(_('Login'), $userComboBox);
    $authenticationFormList->addRow(_('User password'), (new CPassBox('user_password'))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH));
}
// append form list to tab
$authenticationTab = new CTabView();
$authenticationTab->addTab('authenticationTab', $this->data['title'], $authenticationFormList);
// create save button
$saveButton = new CSubmit('update', _('Update'));
if ($this->data['is_authentication_type_changed']) {
    $saveButton->onClick('javascript: if (confirm(' . CJs::encodeJson(_('Switching authentication method will reset all except this session! Continue?')) . ')) {' . 'jQuery("#authenticationForm").submit(); return true; } else { return false; }');
} elseif ($this->data['config']['authentication_type'] != ZBX_AUTH_LDAP) {
    $saveButton->setAttribute('disabled', 'true');
}
// append buttons to form
if ($this->data['config']['authentication_type'] == ZBX_AUTH_LDAP) {
    $authenticationTab->setFooter(makeFormFooter($saveButton, [new CSubmit('test', _('Test'))]));
} else {
    $authenticationTab->setFooter(makeFormFooter($saveButton));
}
// append tab to form
$authenticationForm->addItem($authenticationTab);
// append form to widget
$widget->addItem($authenticationForm);
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:administration.authentication.edit.php


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