Esempio n. 1
0
 function addExpertButton($name, $value)
 {
     $d = new DivExpertMode();
     $b = new Button();
     $this->buttons[] = $d->begin() . $b->getButtonString($name, $value) . $d->end();
 }
Esempio n. 2
0
    $input = new InputTpl("shareName");
} else {
    $input = new HiddenTpl("shareName");
}
$t->add(new TrFormElement(_T("Name"), $input), array("value" => $share));
$t->add(new TrFormElement(_T("Comment"), new InputTpl("shareDesc")), array("value" => $shareDesc));
if (hasAv()) {
    $checked = "";
    if ($av) {
        $checked = "checked";
    }
    $param = array("value" => $checked);
    $t->add(new TrFormElement(_T("AntiVirus on this share"), new CheckboxTpl("hasAv")), $param);
}
$t->display();
$d = new DivExpertMode();
$d->push(new Table());
/* As long as we have no own modShare() (Ticket #96), the sharePath is readonly in edit mode */
if ($_GET["action"] == "add") {
    $sharePath = "";
    $sharePathText = sprintf(_T("Share path (leave empty for a default path in %s)"), default_shares_path());
    $input = new IA5InputTpl("sharePath");
} else {
    $sharePath = $shareInfos["sharePath"];
    $sharePathText = "Path";
    $input = new IA5InputTpl("sharePath");
}
$d->add(new TrFormElement(_T($sharePathText), $input), array("value" => $sharePath));
if ($browseable) {
    $param = array("value" => "CHECKED");
} else {