. -------------------------------------------------------------------------- */ class PluginRemotesupportConfig extends CommonDBTM { static protected $notable = true; function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate) { if ($item->getType() == 'Config') { return __('Remote Support plugin'); } } return ''; } static function configUpdate($input) { $input['configuration'] = 1 - $input['configuration']; return $input; } function showFormRemotesupport() { global $CFG_GLPI; if (!Session::haveRight("config", UPDATE)) { return false; } $my_config = Config::getConfigurationValues('plugin:Remotesupport'); echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
" . __('Remote support setup') . "
" . __('Run Mode:') . ""; Dropdown::showFromArray('run_mode', array('None' => __('None'),'Serial'=>__('Serial'),'Parallel' => __('Parallel')), array('value' => $my_config['run_mode'])); echo "" . __('EasyNoVNC Installed:') . ""; Dropdown::showYesNo("easy_novnc", $my_config['easy_novnc']); echo "
" . __('Show in Computers:') . ""; Dropdown::showYesNo("show_in_computers", $my_config['show_in_computers']); echo "" . __('Show in Tickets:') . ""; Dropdown::showYesNo("show_in_tickets", $my_config['show_in_tickets']); echo "
" . __('Threads:') . ""; Dropdown::showNumber("threads", [ 'value' => 100, 'min' => 1, 'max' => 100 ]); echo "" . __('Fusion inventory:') . ""; Dropdown::showYesNo("fusion", $my_config['fusion']); echo "
"; echo ""; echo "
"; Html::closeForm(); } static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Config') { $config = new self(); $config->showFormRemotesupport(); } } }