} } else { // prepare the configuration form $form->startFieldSet('fset_local', _('Local log')); if (($logPath = getSvcState($config, 'systemlog')) == !false) { $form->startBlock('rw_localmode'); $form->setLabel(null, _('Mode'), 'mode', 'class=labelcol'); $form->startBlock('rw_localmode', 'right'); $form->setField('mode', 'select', 'name=mode'); // $modeOptions = array('membuffer' => _('Shared memory circular buffer'), 'disk' => _('Disk') . " ({$logPath}/messages)"); $form->setSelectOptFill('mode', $modeOptions); $form->setFieldOptionsState('mode', $cfgPtr['mode'], 'membuffer'); $form->setBlockHint('hint-syslogmode', _('Choose where log application writes the log messages it receives.') . '<br>' . _('Messages written to shared memory will not survive across reboots.')); // $form->exitBlock(); } $form->startBlock('rw_buffer'); $form->setLabel(null, _('Buffer size'), 'buffer', 'class=labelcol'); $form->startBlock('rw_buffer', 'right'); $form->setField('buffer', 'select', 'name=buffer'); // $modeOptions = array('16' => '16 KB', '32' => '32 KB', '64' => '64 KB', '128' => '128 KB', '256' => '256 KB', '512' => '512 KB', '1024' => '1024 KB', '2048' => '2048 KB', '4096' => '4096 KB'); $form->setSelectOptFill('buffer', $modeOptions); $form->setFieldOptionsState('buffer', $cfgPtr['buffer'], '512'); // $form->exitBlock(); $form->exitFieldSet(); // $form->startFieldSet('fset_remote', _('Remote log')); $form->startBlock('rw_remote');
$confForm->startBlock("rw_{$svc}", 'right'); $svcAttrib = null; $cbState = 0; if (isset($cfgPtr['services'][$svc]['fsmount'], $cfgPtr['services'][$svc]['active'])) { if ($cfgPtr['services'][$svc]['active'] == 1) { if ($cfgPtr['services'][$svc]['fsmount'] != $mntDir) { $svcAttrib = 'disabled=disabled'; } elseif ($cfgPtr['services'][$svc]['fsmount'] == $mntDir) { $cbState = 1; } } } $confForm->setField($svc, 'checkbox', $svcAttrib); $confForm->setCbItems($svc, "yes={$svcAvail[$svc]['fld_desc_se']}", true); $confForm->setCbState($svc, 'yes', $cbState); $confForm->exitBlock(); } $confForm->exitFieldSet(); $confForm->setField('label', 'hidden'); $confForm->setField('desc', 'hidden'); $confForm->setField('fsmount', 'hidden'); $confForm->setInputText('fsmount', $mntDir); $confForm->setField('uuid', 'hidden'); // set fs type to a constant value until a choice will be available $fsType = 'vfat'; $confForm->setField('filesystem', 'hidden'); $confForm->setInputText('filesystem', $fsType); // set the active flag to a constant value until editing will be available $devActive = '1'; $confForm->setField('active', 'hidden'); $confForm->setInputText('active', $devActive);