예제 #1
0
파일: edit.php 프로젝트: sebastiendu/mmc
                $result .= _T(" The quota of all users of this mail domain have been reset.") . "<br />";
            }
            // Display result message
            if ($result && !isXMLRPCError()) {
                new NotifyWidgetSuccess($result);
            }
        }
    }
}
$p = new PageGenerator($title);
$p->setSideMenu($sidemenu);
$p->display();
$f = new ValidatingForm();
$f->push(new Table());
if ($mode == "add") {
    $domainTpl = new DomainInputTpl("domainname");
} else {
    $domainTpl = new HiddenTpl("domainname");
}
$f->add(new TrFormElement(_T("Mail domain"), $domainTpl), array("value" => $domainname, "required" => true));
$f->add(new TrFormElement(_T("Description"), new InputTpl("description")), array("value" => $description));
$f->add(new TrFormElement(_T("Default mail quota for users created in this domain (in kB)"), new QuotaTpl("domainquota", '/^[0-9]*$/')), array("value" => $domainquota));
$f->pop();
if ($mode == "add") {
    $f->addButton("badd", _("Create"));
} else {
    $f->addExpertButton("breset", _T("Reset users quota to default", "mail"));
    $f->addButton("bedit", _("Confirm"));
}
$f->pop();
$f->display();
예제 #2
0
파일: index.php 프로젝트: sebastiendu/mmc
$f->pop();
$pathdiv = new Div(array("id" => "profilespath"));
$pathdiv->setVisibility($hasProfiles);
$f->push($pathdiv);
$f->push(new Table());
# default value for profile path
$value = "\\\\%N\\profiles\\%U";
if ($hasProfiles) {
    $value = $smb['logon path'];
}
$f->add(new TrFormElement(_T("Network path for profiles"), new InputTpl("logon path"), array("tooltip" => _T("The share must exist and be world-writable.", "samba"))), array("value" => $value));
$f->pop();
$f->pop();
$f->push(new DivExpertMode());
$f->push(new Table());
$syncTpl = new SelectItem("ldap passwd sync");
$labels = array(_T('Yes'), _T('No'), _T('Only (for smbk5pwd)'));
$values = array('yes', 'no', 'only');
$syncTpl->setElements($labels);
$syncTpl->setElementsVal($values);
$f->add(new TrFormElement(_T("LDAP password sync"), $syncTpl), array("value" => $smb["ldap passwd sync"]));
$d = array(_T("Opening script session") => "logon script", _T("Base directory path") => "logon home", _T("Connect base directory on network drive") => "logon drive");
foreach ($d as $description => $field) {
    $f->add(new TrFormElement($description, new IA5InputTpl($field)), array("value" => $smb[$field]));
}
$f->pop();
$f->pop();
$f->addValidateButton("bsave");
$f->addExpertButton("brestart", _T("Restart SAMBA"));
$f->addButton("breload", _T("Reload SAMBA configuration"));
$f->display();