Ejemplo n.º 1
0
$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);
$confForm->setRequired('uuid', _('Disk unique identifier'));
$confForm->setRequired('fsmount', _('Service mount point'));
$confForm->startWrapper('saveservices');
$saveClick = "onclick=callApply('#confform')";
$confForm->setField('savecfg', 'submit', $saveClick . '|class=startjob|disabled=disabled|value=' . _('Save'), false);
$confForm->exitWrapper();
// hold form data in a session variable
$_SESSION[$cfgSvcName] = $confForm->serialize();
//
// variables for messages populated later from js code
$msgStartPartion = escapeStr(_('Creating new partition') . ' ' . $_POST['par'] . ' ' . _('on') . ' ' . $_POST['dev'] . '... ');
$msgStartFormat = escapeStr(_('Formatting partition') . ' ' . $_POST['par'] . ' ' . _('on') . ' ' . $_POST['dev'] . '... ');
$msgAskReboot = escapeStr(_('Reboot required'));
$msgDone = escapeStr(_('done.'));
// render main layout
require 'fbegin.inc';
$initForm->renderForm();
$confForm->renderForm();
// end layout
require 'fend.inc';
?>
Ejemplo n.º 2
0
$form->setInputText('spoofmac', $cfgPtr['spoofmac']);
$form->setBlockHint('hint-spoofmac', _('This field can be used to modify (&quot;spoof&quot;) the MAC address of the network interface<br>Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank'));
//
$form->exitBlock();
$form->exitFieldSet();
$form->startFieldset('fset_dns', _('DNS Servers'));
// dns servers
$form->startBlock('rw_dnsserver');
$form->setLabel(null, _('IP Addresses'), 'dnsserver', 'class=labelcol');
$form->startBlock('rw_dnsserver', 'right');
$form->startWrapper('rw_dnsopts', 'controls');
$form->startWrapper('dnstpl', 'cloneable', 'class=cloneable');
$form->setField('dnsremove', 'button', 'class=dnsremove removeitem|value=', false);
$form->setField('dnsserver', 'text', 'disabled=disabled|size=15|maxlength=15', false);
$form->setValidationFunc('dnsserver', 'validIpAddr');
$form->exitWrapper();
$form->clonePrevWrapper('dnsserver', $cfgPtr['dnsserver'], 'class=dnsclone');
$form->exitWrapper();
$form->startWrapper('rw_adddnsbtn', 'controls');
$form->setField('adddns', 'button', 'class=additem|value=');
$form->exitWrapper();
//
$form->exitBlock();
$form->exitFieldSet();
$form->exitWrapper();
$form->startWrapper('tab-2');
$form->startFieldset('fset_topo', _('Topology'));
// network topology
$form->startBlock('rw_topology');
$form->setLabel(null, _('Topology'), 'topology', 'class=labelcol');
$form->startBlock('rw_topology', 'right');