本文整理匯總了PHP中CTextBox::setReadonly方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTextBox::setReadonly方法的具體用法?PHP CTextBox::setReadonly怎麽用?PHP CTextBox::setReadonly使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CTextBox
的用法示例。
在下文中一共展示了CTextBox::setReadonly方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CTweenBox
$hostList->addRow(_('Visible name'), $visiblenameTB);
// groups for normal hosts
if (!$isDiscovered) {
$grp_tb = new CTweenBox($frmHost, 'groups', $host_groups, 10);
$all_groups = API::HostGroup()->get(array('editable' => true, 'output' => API_OUTPUT_EXTEND));
order_result($all_groups, 'name');
foreach ($all_groups as $group) {
$grp_tb->addItem($group['groupid'], $group['name']);
}
$hostList->addRow(_('Groups'), $grp_tb->get(_('In groups'), _('Other groups')));
$newgroupTB = new CTextBox('newgroup', $newgroup, ZBX_TEXTBOX_SMALL_SIZE);
$newgroupTB->setAttribute('maxlength', 64);
$tmp_label = _('New group');
if (CWebUser::$data['type'] != USER_TYPE_SUPER_ADMIN) {
$tmp_label .= SPACE . _('(Only super admins can create groups)');
$newgroupTB->setReadonly(true);
}
$hostList->addRow(SPACE, array(new CLabel($tmp_label, 'newgroup'), BR(), $newgroupTB), null, null, null, 'new');
} else {
$groupBox = new CComboBox('groups');
$groupBox->setAttribute('readonly', true);
$groupBox->setAttribute('size', 10);
foreach ($dbHost['groups'] as $group) {
$groupBox->addItem($group['groupid'], $group['name']);
}
$hostList->addRow(_('Groups'), $groupBox);
}
// interfaces for normal hosts
if (!$isDiscovered) {
if (empty($interfaces)) {
$script = 'hostInterfacesManager.addNew("agent");';