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


PHP CButton::setEnabled方法代码示例

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


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

示例1: BodyToString

 function BodyToString($destroy = true)
 {
     $table = new CTable(null, 'setup_wizard');
     $table->setAlign('center');
     $table->setHeader(array(new CCol(S_ZABBIX_VER, 'left'), SPACE), 'header');
     $table->addRow(array(SPACE, new CCol($this->stage[$this->getStep()]['title'], 'right')), 'title');
     $table->addRow(array(new CCol($this->getList(), 'left'), new CCol($this->getState(), 'right')), 'center');
     $next = new CButton('next[' . $this->getStep() . ']', S_NEXT . ' >>');
     if ($this->DISABLE_NEXT_BUTTON) {
         $next->setEnabled(false);
     }
     $table->setFooter(array(new CCol(new CButton('cancel', S_CANCEL), 'left'), new CCol(array(isset($this->stage[$this->getStep() - 1]) ? new CButton('back[' . $this->getStep() . ']', '<< ' . S_PREVIOUS) : null, isset($this->stage[$this->getStep() + 1]) ? $next : new CButton('finish', S_FINISH)), 'right')), 'footer');
     return parent::BodyToString($destroy) . $table->ToString();
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:14,代码来源:setup.inc.php

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

示例3: foreach

    foreach ($groups as &$group) {
        $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);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:dashconf.php

示例4: array

$_REQUEST['steps'] = array_merge(get_request('steps', array()));
/* reinitialize keys */
if (!isset($_REQUEST['form'])) {
    //creating button "Create scenario"
    $form_button = new CForm(null, 'get');
    $form_button->addVar('hostid', $_REQUEST['hostid']);
    //if host is selected
    if (!isset($_REQUEST['form']) && $_REQUEST['hostid'] > 0) {
        //allowing to press button
        $create_scenario_button = new CButton('form', S_CREATE_SCENARIO);
        $create_scenario_button->setEnabled('yes');
    } else {
        //adding additional hint to button
        $create_scenario_button = new CButton('form', S_CREATE_SCENARIO . ' ' . S_SELECT_HOST_FIRST);
        //and disabling it
        $create_scenario_button->setEnabled('no');
    }
    $form_button->addItem($create_scenario_button);
} else {
    $form_button = null;
}
$http_wdgt = new CWidget();
$http_wdgt->addPageHeader(S_CONFIGURATION_OF_WEB_MONITORING_BIG, $form_button);
$db_hosts = DBselect('select hostid from hosts where ' . DBin_node('hostid'));
if (isset($_REQUEST['form']) && isset($_REQUEST['hostid']) && DBfetch($db_hosts)) {
    $form = new CFormTable(S_SCENARIO);
    $form->setName('form_scenario');
    if ($_REQUEST['groupid'] > 0) {
        $form->addVar('groupid', $_REQUEST['groupid']);
    }
    $form->addVar('hostid', $_REQUEST['hostid']);
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:httpconf.php


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