$discovery_ckeck_types = discovery_check_type2str();
order_result($discovery_ckeck_types);
->addVar('action', 'popup.discovery.check')
if (array_key_exists('dcheckid', $data['params']) && $data['params']['dcheckid']) {
$form->addVar('dcheckid', $data['params']['dcheckid']);
$select_type = (new CSelect('type'))
->setValue($data['params']['type'])
->setFocusableElementId('type')
->addOptions(CSelect::createOptionsFromArray($discovery_ckeck_types));
$select_snmpv3_securitylevel = (new CSelect('snmpv3_securitylevel'))
->setId('snmpv3-securitylevel')
->setValue($data['params']['snmpv3_securitylevel'])
->setFocusableElementId('snmpv3-securitylevel-button')
->addOption(new CSelectOption(ITEM_SNMPV3_SECURITYLEVEL_NOAUTHNOPRIV, 'noAuthNoPriv'))
->addOption(new CSelectOption(ITEM_SNMPV3_SECURITYLEVEL_AUTHNOPRIV, 'authNoPriv'))
->addOption(new CSelectOption(ITEM_SNMPV3_SECURITYLEVEL_AUTHPRIV, 'authPriv'));
$form_list = (new CFormList())
->addRow(new CLabel(_('Check type'), $select_type->getFocusableElementId()), $select_type)
->addRow((new CLabel(_('Port range'), 'ports'))->setAsteriskMark(),
(new CTextBox('ports', $data['params']['ports']))
->setWidth(ZBX_TEXTAREA_SMALL_WIDTH)
->addRow((new CLabel(_('Key'), 'key_'))->setAsteriskMark(),
(new CTextBox('key_', $data['params']['key_'], false, DB::getFieldLength('items', 'key_')))