Ejemplo n.º 1
0
$form->setLabel(null, _('Static Public IP'), 'extipaddr', 'class=labelcol');
$form->startBlock('rw_extipaddr', 'right');
$form->setField('extipaddr', 'text', 'size=15|maxlength=15');
$form->setInputText('extipaddr', $cfgPtr['extipaddr']);
//
$form->exitBlock();
// public host name
$form->startBlock('rw_exthostname');
$form->setLabel(null, _('Public Hostname'), 'exthostname', 'class=labelcol');
$form->startBlock('rw_exthostname', 'right');
$form->setField('exthostname', 'text', 'size=32', true);
$form->setInputText('exthostname', $cfgPtr['exthostname']);
$form->setLabel(null, _('This information should be updated by:'), null, null, true);
$form->setField('hostnameupdatesrc', 'radio', null, false, 'router');
$form->setRadioItems('hostnameupdatesrc', 'router=' . _('My Router') . '|' . 'local=' . _('This system'), true);
$form->setCbState('hostnameupdatesrc', $cfgPtr['hostnameupdatesrc']);
//
$form->exitBlock();
$form->exitFieldSet();
$form->startFieldset('fset_dyndns', _('Dynamic DNS Client'));
// dynamic dns
$form->startBlock('rw_service');
$form->setLabel(null, _('Service Type'), 'dyndnstype', 'class=labelcol');
$form->startBlock('rw_service', 'right');
$form->setField('dyndnstype', 'select', 'name=dyndnstype');
$form->setSelectOptFill('dyndnstype', $ddnsProviders);
$form->setFieldOptionsState('dyndnstype', $cfgPtr['dyndnstype']);
//
$form->exitBlock();
// ddns username
$form->startBlock('rw_dyndnsusername');
Ejemplo n.º 2
0
    $confForm->setLabel(null, $svcAvail[$svc]['fld_label_se'], null, 'class=labelcol');
    $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');
Ejemplo n.º 3
0
$form->startWrapper('loadfile');
$form->setField('restore_file', 'file', 'name=restore_file');
$form->setField('doload', 'button', 'class=startjob|disabled=disabled|value=' . _('Load'), false);
$form->setBlockHint('hint-file', _('Select a backup file, then click the above Load button to check the file content.'));
$form->exitWrapper();
//
$form->exitBlock();
$form->exitFieldSet();
$form->startFieldset('fset_what', _('Backup subsets'));
// core system configuration
$form->startBlock('rw_what');
$form->setLabel(null, _('System'), 'bck_system', 'class=labelcol');
$form->startBlock('rw_what', 'right');
$form->setField('bck_system', 'checkbox', 'name=bck_system');
$form->setCbItems('bck_system', 'system=' . _('System core configuration'), true);
$form->setCbState('bck_system', 'system', 1);
//
$form->exitBlock();
// appliance specific configuration sets
foreach (array_keys($cfgAppliance) as $app) {
    if (isset($cfgAppliance[$app]['config'])) {
        $fieldId = "bck_app_{$app}";
        $form->startBlock("rw_{$app}");
        $form->setLabel(null, $cfgAppliance[$app]['fld_label_bck'], null, 'class=labelcol');
        $form->startBlock("rw_{$app}", 'right');
        $form->setField($fieldId, 'checkbox', 'name=bck_app[]');
        $form->setCbItems($fieldId, "{$app}={$cfgAppliance[$app]['fld_desc_bck']}", true);
        $form->setCbState($fieldId, $app, 1);
        //
        $form->exitBlock();
    }