本文整理汇总了PHP中HTMLForm::setType方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::setType方法的具体用法?PHP HTMLForm::setType怎么用?PHP HTMLForm::setType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLForm
的用法示例。
在下文中一共展示了HTMLForm::setType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formLogin
function formLogin()
{
$T = new HTMLForm("login", array("benutzer", "password", "action"), "Anmeldung");
$T->setValue("action", "login");
$T->setType("action", "hidden");
$T->setType("password", "password");
$T->setLabel("password", "Passwort");
$T->setSaveCustomerPage("Anmelden", "", false, "function(){ document.location.reload(); }");
return $T . OnEvent::script("\$j(function(){ \$j('[name=benutzer]').trigger('focus'); });");
}
示例2: getHTML
public function getHTML($id)
{
$phtml = parent::getHTML($id);
$monate = Datum::getGerMonthArray();
$jahre = array(date("Y") - 1 => date("Y") - 1, date("Y") => date("Y"), date("Y") + 1 => date("Y") + 1);
$f = new HTMLForm("Bericht", array("lightCRMKalBerichtMonth", "lightCRMKalBerichtYear"), "Anzeige:");
$f->getTable()->setColWidth(1, "120px");
$f->setType("lightCRMKalBerichtMonth", "select", ($this->userdata != null and isset($this->userdata["lightCRMKalBerichtMonth"])) ? $this->userdata["lightCRMKalBerichtMonth"] : 0, $monate);
$f->setType("lightCRMKalBerichtYear", "select", ($this->userdata != null and isset($this->userdata["lightCRMKalBerichtYear"])) ? $this->userdata["lightCRMKalBerichtYear"] : 0, $jahre);
$f->setLabel("lightCRMKalBerichtMonth", "Monat");
$f->setLabel("lightCRMKalBerichtYear", "Jahr");
$f->setSaveBericht($this);
return $phtml . $f;
}
示例3: downloadPopup
public function downloadPopup()
{
$J = array();
$AC = anyC::get("JD");
while ($D = $AC->getNextEntry()) {
$J[$D->getID()] = $D->A("JDName");
}
$F = new HTMLForm("tdl", array("link", "JD"));
$F->setType("link", "textarea");
$F->setType("JD", "select", null, $J);
$F->getTable()->setColWidth(1, 60);
$F->setSaveRMEPCR("Download", "", "mJD", -1, "download", "function(t){ \$j('#downloadResult').html(t.responseText); }");
$F->setInputStyle("link", "font-size:10px;height:200px;");
echo $F . "<pre style=\"padding:5px;\" id=\"downloadResult\"></pre>";
}
示例4: testDownloadPopup
public function testDownloadPopup()
{
$F = new HTMLForm("tdl", array("link"));
$F->setType("link", "textarea");
$F->getTable()->setColWidth(1, 60);
$F->setSaveRMEPCR("test download", "", "JD", $this->getID(), "testDownload", "function(t){ \$j('#downloadResult').html(t.responseText); }");
$F->setInputStyle("link", "font-size:10px;height:200px;");
echo $F . "<pre style=\"padding:5px;\" id=\"downloadResult\"></pre>";
}
示例5: getContextMenuHTML
public function getContextMenuHTML($identifier)
{
$F = new HTMLForm("dlSettings", array("dlCover"));
$F->setType("dlCover", "checkbox");
$F->setLabel("dlCover", "DL Cover?");
$F->setValue("dlCover", mUserdata::getGlobalSettingValue("trinityDBdlCover", "0"));
$F->setSaveRMEPCR("save", "./images/i2/save.gif", "Serie", "-1", "saveContextMenu", "function() { phynxContextMenu.stop(); }");
echo $F;
}
示例6: getCMSHTML
function getCMSHTML()
{
if (!$this->loggedIn) {
$T = new HTMLForm("login", array("benutzer", "password", "action"), "Anmeldung");
$T->setValue("action", "login");
$T->setType("action", "hidden");
$T->setType("password", "password");
$T->setLabel("password", "Passwort");
$T->setSaveCustomerPage("Anmelden", "", false, "function(){ document.location.reload(); }");
return $T;
}
$BRL = new Button("Aktualisieren");
$BRL->className("submitFormButton");
$BRL->onclick("document.location.reload();");
$BRL->style("float:right;margin-top:0px;");
$BRA = new Button("Abmelden");
$BRA->className("submitFormButton");
$BRA->onclick("CustomerPage.rme('logout', {}, function(transport){ document.location.reload(); });");
$BRA->style("background-color:#DDD;color:grey;margin-top:0px;float:right;margin-right:20px;");
return "\n\t\t<div style=\"max-width:1200px;\">\n\t\t\t<div style=\"display:inline-block;width:48%;vertical-align:top;margin-right:3%;\" id=\"contentLeft\">\n\t\t\t\t<h1>Auftrag</h1>\n\t\t\t\t<div class=\"content\" style=\"overflow:auto;\">\n\t\t\t\t\t" . $this->getAuftrag(array("GRLBMID" => 0)) . "\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style=\"display:inline-block;width:48%;vertical-align:top;\" id=\"contentRight\">\n\t\t\t\t<h1>{$BRL}{$BRA}Lieferscheine</h1>\n\t\t\t\t<div class=\"content\" style=\"overflow:auto;\">\n\t\t\t\t\t" . $this->getLieferscheine(array()) . "\n\t\t\t\t</div>\n\t\t\t</div>" . OnEvent::script("\n\t\t\t\t\$('#contentRight .content .tableForSelection ').parent().css('max-height', \$(window).height() - \$('h1').outerHeight() - 40 - \$('#contentRight .Tab').outerHeight())\n\t\t\t\t\$('#contentLeft .content ').css('height', \$(window).height() - \$('h1').outerHeight() - 25)");
}
示例7: editInWindow
public function editInWindow($UDID)
{
$T = new HTMLTable(1);
$B = new Button("Desktop-Link\nlöschen", "trash");
$B->onclick("");
$B->style("float:right;");
$B->rmePCR("DesktopLink", "", "delete", $UDID, "if(checkResponse(transport)){ Popup.close('', 'DesktopLinkPopup'); DesktopLink.loadContent(true); }");
$T->addRow($B);
$T->addRowClass("backgroundColor0");
$UD = new Userdata($UDID);
$F = new HTMLForm("DesktopLinkEdit", array("order", "symbol", "name", "UDID"), "Bearbeiten:");
$F->setSaveRMEP("Desktop-Link speichern", "./images/i2/save.gif", "DesktopLink", "{$UDID}", "save", "if(checkResponse(transport)){ Popup.close(\\'\\', \\'DesktopLinkPopup\\'); DesktopLink.loadContent(true); }");
$v = explode(";", $UD->A("wert"));
$F->setValue("order", $v[0]);
$F->setValue("symbol", $v[1]);
$F->setValue("name", $v[2]);
$F->setValue("UDID", $UDID);
$F->setType("UDID", "hidden");
$F->setType("order", "hidden");
$F->setType("symbol", "hidden");
echo $T . $F;
}
示例8: popup
function popup($ibanField, $bicField)
{
$F = new HTMLForm("ibanCalc", array("land", "kontonummer", "bankleitzahl", "ibanField", "bicField"));
$F->getTable()->setColWidth(1, 120);
$I = new IBAN();
$l = array();
foreach ($I->Countries() as $c) {
$IC = new IBANCountry($c);
if (!$IC->IsSEPA()) {
continue;
}
$l[$c] = ISO3166::getCountryToCode($c) . " ({$c})";
}
asort($l);
$F->setType("land", "select", "DE", $l);
$F->setType("ibanField", "hidden");
$F->setType("bicField", "hidden");
$F->setValue("ibanField", $ibanField);
$F->setValue("bicField", $bicField);
$F->setSaveRMEPCR("Berechnen", "", "IBANCalc", "-1", "calc", "function(t){ \$j('#ibanCalcResult').html(t.responseText); }");
echo $F . "<div id=\"ibanCalcResult\"></div>";
}
示例9: getConfigPopup
/**
* Popup zur Konfiguration eines Servers.
*/
public function getConfigPopup($echo = true)
{
// Button
$BCreate = new Button("Server\nhinzufügen", "new");
$BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
$htmlTableButton = new HTMLTable(1);
$htmlTableButton->addRow($BCreate);
// Liste der konfigurierten Server
$userId = $_SESSION["S"]->getCurrentUser()->getID();
$T = new HTMLTable(1, "xCal Server");
$BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
$BDeleteRaw->style("float: right;");
$serverList = anyC::get("xCal", "xCalUserID", $userId);
$counter = 0;
while ($S = $serverList->getNextEntry()) {
$BDelete = clone $BDeleteRaw;
$BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
$F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
$F->getTable()->setColWidth(1, 120);
$F->setValues($S);
$F->setLabel("xCalName", "Bezeichnung");
$F->setLabel("xCalUrl", "URL");
$F->setLabel("xCalServerActive", "Für den Import verwenden");
$F->setType("xCalServerActive", "checkbox");
$F->useRecentlyChanged();
$F->setSaveClass("xCal", $S->getID(), "''");
$display = "none";
if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
$display = "";
}
$div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span> <br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . " </small>\n\t\t\t\t</div>";
$T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
$T->addRowClass("backgroundColor0");
$T->addCellClass(1, "borderColor1");
$counter++;
}
if ($counter == 0) {
$T->addRow("Keine Server eingetragen!");
}
if ($echo == "" || $echo === true) {
echo $htmlTableButton . $T;
} else {
return $htmlTableButton . $T;
}
}
示例10: showRegistration
function showRegistration()
{
$html = "<script type=\"text/javascript\">\n\t\t\$(function() {\n\t\t\t\$('#registrierungAdresse').validate({\n\t\t\t\trules: {\n\t\t\t\t\tfirma: 'required',\n\t\t\t\t\tstrasse: 'required',\n\t\t\t\t\tnr: 'required',\n\t\t\t\t\tplz: 'required',\n\t\t\t\t\tort: 'required',\n\t\t\t\t\t/*email: {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\temail: true\n\t\t\t\t\t},*/\n\t\t\t\t\tblz: 'required',\n\t\t\t\t\tkontonummer: 'required',\n\t\t\t\t\tuserVorNachname: 'required',\n\t\t\t\t\tuserEmail: {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\temail: true\n\t\t\t\t\t},\n\t\t\t\t\tuserUsername: 'required',\n\t\t\t\t\tuserPassword: {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tminlength: 5\n\t\t\t\t\t},\n\t\t\t\t\tconfirmUserPassword: {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tminlength: 5,\n\t\t\t\t\t\tequalTo: '#registrierungAdresse input[name=userPassword]'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmessages: {\n\t\t\t\t\tfirma: 'Bitte geben Sie den Namen Ihrer Firma ein',\n\t\t\t\t\tstrasse: 'Bitte geben Sie die Straße Ihrer Firma ein',\n\t\t\t\t\tnr: 'Bitte geben Sie die Hausnummer Ihrer Firma ein',\n\t\t\t\t\tplz: 'Bitte geben Sie Ihre Postleitzahl Ihrer Firma ein',\n\t\t\t\t\tort: 'Bitte geben Sie Ihren Ort Ihrer Firma ein',\n\t\t\t\t\t//email: {required: 'Bitte geben Sie Ihre gültige E-Mail-Adresse ein', email: 'Bitte geben Sie Ihre gültige E-Mail-Adresse ein'},\n\t\t\t\t\tblz: 'Bitte geben Sie die Bankleitzahl Ihrer Firma ein',\n\t\t\t\t\tkontonummer: 'Bitte geben Sie die Kontonummer Ihrer Firma ein',\n\t\t\t\t\tuserVorNachname: 'Bitte geben Sie Ihren Vor- und Nachnamen ein',\n\t\t\t\t\tuserUsername: 'Bitte geben Sie einen Benutzernamen ein',\n\t\t\t\t\tuserEmail: {required: 'Bitte geben Sie Ihre gültige E-Mail-Adresse ein', email: 'Bitte geben Sie Ihre gültige E-Mail-Adresse ein'},\n\t\t\t\t\tconfirmUserPassword: {required: 'Bitte geben Sie Ihr Passwort ein', minlength: 'Bitte geben Sie mindestens fünf Zeichen ein', equalTo: 'Die Passwörter stimmen nicht überein'},\n\t\t\t\t\tuserPassword: {required: 'Bitte geben Sie Ihr Passwort ein', minlength: 'Bitte geben Sie mindestens fünf Zeichen ein'}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\t\n\t\t\t\$('#registrierungAdresse input[name=userUsername]').focus(function() {\n\t\t\t\tvar vorNachname = \$('#registrierungAdresse input[name=userVorNachname]').val();\n\t\t\t\tif(vorNachname && !this.value) {\n\t\t\t\t\tthis.value = vorNachname.replace(' ', '.').toLowerCase();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t\n\t\t</script>";
$html .= "<h1>Registrierung für PDFix</h1>";
$F = new HTMLForm("registrierungAdresse", array("firma", "strasse", "nr", "plz", "ort", "tel", "blz", "kontonummer", "zahlungsweise", "userVorNachname", "userUsername", "userPassword", "confirmUserPassword", "userEmail", "action"));
#$F->setType("anrede", "select", "3", Adresse::getAnreden());
$F->insertSpaceAbove("vorname");
$F->insertSpaceAbove("strasse", "Adresse");
$F->insertSpaceAbove("email", "Kontakt");
$F->insertSpaceAbove("blz", "Bank");
$F->insertSpaceAbove("firma", "<h2>Abrechnungsdaten</h2>");
$F->insertSpaceAbove("userVorNachname", "<h2 style=\"margin-top:20px;\">Benutzerdaten</h2>");
$F->insertSpaceAbove("zahlungsweise", "<h2 style=\"margin-top:20px;\">Zahlungsweise</h2>");
$F->setSaveCustomerPage("Jetzt registrieren", null, true, "function(){ document.location.href='./index.php?CC=RegistrationPDFix&thankR=1'; }");
$F->setLabel("email", "E-Mail");
$F->setLabel("tel", "Telefon");
$F->setLabel("strasse", "Straße");
$F->setLabel("userVorNachname", "Name");
$F->setLabel("userUsername", "Benutzername");
$F->setLabel("userPassword", "Passwort");
$F->setLabel("confirmUserPassword", "Passwort wiederholen");
$F->setLabel("userEmail", "E-Mail");
$kosten1Monat = Util::CLFormatCurrency(mUserdata::getUDValueS("PDFixKostenProMonat", "0") * 1, true);
$kosten3Monat = Util::CLFormatCurrency(mUserdata::getUDValueS("PDFixKostenPro3Monat", "0") * 1, true);
$kosten6Monat = Util::CLFormatCurrency(mUserdata::getUDValueS("PDFixKostenPro6Monat", "0") * 1, true);
$F->setType("confirmUserPassword", "password");
$F->setType("userPassword", "password");
$F->setType("action", "hidden");
$F->setType("zahlungsweise", "select", "1", array("1" => "Monatlich ({$kosten1Monat} + MwSt)", "3" => "Vierteljährlich ({$kosten3Monat} + MwSt)", "6" => "Halbjährlich ({$kosten6Monat} + MwSt)"));
$F->setValue("action", "register");
$html .= $F;
return $html;
}
示例11: alterAddress
public function alterAddress($data)
{
$Adresse = new Adresse($data["AdresseID"]);
$F = new HTMLForm("alterAddress", array("firma", "vorname", "nachname", "strasse", "nr", "plz", "ort", "action", "AdresseID"));
$F->setValues($Adresse);
$F->setValue("action", "alterAddress");
$F->setValue("AdresseID", $data["AdresseID"]);
$F->setType("action", "hidden");
$F->setType("AdresseID", "hidden");
$F->setLabel("strasse", "Straße");
$F->setSaveCustomerPage("Speichern", "", false, "function(){ CustomerPage.closePopup(); CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); }");
echo $F;
}
示例12: showAddress
function showAddress()
{
$html = "<script type=\"text/javascript\">\n\t\t\$(function() {\n\t\t\tjQuery.validator.addMethod('firmOrName', function(value, element, params) {\n\t\t\t\t\n\t\t\t\tif(\$('input[name=firma]').val() != '')\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\tif(\$('input[name=nachname]').val() == '')\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tif(\$('input[name=vorname]').val() == '')\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}, 'Bitte geben Sie Ihren Firmennamen <b>oder</b> Ihren Vor- und Nachnamen ein.');\n\t\t});\n\t\t\$(function() {\n\t\t\t\$('#ticketAddress').validate({\n\t\t\t\trules: {\n\t\t\t\t\tnachname: {firmOrName: true},\n\t\t\t\t\t/*vorname: {firmOrName: true},\n\t\t\t\t\tfirma: {firmOrName: true},*/\n\t\t\t\t\tstrasse: 'required',\n\t\t\t\t\tnr: 'required',\n\t\t\t\t\tplz: 'required',\n\t\t\t\t\tort: 'required',\n\t\t\t\t\temail: {\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\temail: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgroups: {\n\t\t\t\t\tstrasseNr: 'nr strasse',\n\t\t\t\t\tplzOrt: 'ort plz'\n\t\t\t\t},\n\n\t\t\t\tmessages: {\n\t\t\t\t\tstrasse: 'Bitte geben Sie Straße und Hausnummer ein',\n\t\t\t\t\tnr: 'Bitte geben Sie Straße und Hausnummer ein',\n\t\t\t\t\tplz: 'Bitte geben Sie Postleitzahl und Ort ein',\n\t\t\t\t\tort: 'Bitte geben Sie Postleitzahl und Ort ein',\n\t\t\t\t\temail: {required: 'Bitte geben Sie Ihre E-Mail-Adresse ein', email: 'Bitte geben Sie Ihre gültige E-Mail-Adresse ein'}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\terrorPlacement: function(error, element) {\n\t\t\t\t\tvar name = element.attr('name');\n\t\t\t\t\tif (name === 'strasse' || name === 'nr') {\n\t\t\t\t\t\terror.insertAfter('input[name=nr]');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tif (name === 'plz' || name === 'ort') {\n\t\t\t\t\t\terror.insertAfter('input[name=ort]');\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\terror.insertAfter(element);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t});\n\t\t});\n\t\t\n\t\t</script>";
$F = new HTMLForm("ticketAddress", array("firma", "vorname", "nachname", "email", "strasse", "plz", "land", "action"), "Rechnungsdaten");
$F->setType("land", "select", "DE", ISO3166::getCountries());
$F->setType("strasse", "parser", null, array("CCTicketShop::strasseParser"));
$F->setType("plz", "parser", null, array("CCTicketShop::plzParser"));
$F->setType("action", "hidden");
$F->insertSpaceAbove("strasse", "Adresse");
$F->insertSpaceAbove("email", "Kontakt");
$F->setLabel("email", "E-Mail");
$F->setDescriptionField("email", "An diese Adresse werden die Rechnung und die Tickets verschickt.");
#$F->setLabel("tel", "Telefon");
$F->setLabel("strasse", "Straße/Nr");
$F->setLabel("plz", "PLZ/Ort");
$F->setValue("action", "handleAddress");
if (isset($_SESSION["ticketDataAddress"])) {
foreach ($_SESSION["ticketDataAddress"] as $k => $v) {
$F->setValue($k, $v);
}
}
$F->setSaveCustomerPage("Weiter", null, true, "function(){ document.location.reload(); }");
$html .= $F;
return $html;
}
示例13: getPopupManager
public function getPopupManager($rootDir = null, $class = null, $classID = null, $usePool = false, $fieldDefaultFile = "", $uploadTargetFilename = null)
{
if ($rootDir != null) {
$T = new HTMLTable(1);
#$rel = "$rootDir";
$root = FileStorage::getFilesDir() . $rootDir;
$_SESSION["BPS"]->setProperty("mFileGUI", "path", $root);
$_SESSION["BPS"]->setProperty("mFileGUI", "root", $root);
$F = new File($root);
$F->loadMe();
if ($F->getA() == null) {
if (is_writable(FileStorage::getFilesDir())) {
mkdir($root, 0777, true);
} else {
$B = new Button("", "stop");
$B->type("icon");
$B->style("float:left;margin-right:10px;");
$T->addRow($B . "Das Verzeichnis <code>{$rootDir}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
die($T);
}
}
}
$bps = $this->getMyBPSData();
if (strpos($bps["path"], $bps["root"]) === false) {
$bps["path"] = $bps["root"];
}
if ($bps != -1 and isset($bps["path"])) {
$this->setDir($bps["path"]);
}
$this->hideDirs(true);
$gui = new HTMLGUIX();
$gui->object($this);
$cols = array();
if ($fieldDefaultFile != "") {
$C = new $class($classID);
self::$fieldDefaultFile = array($C, $C->A($fieldDefaultFile), $fieldDefaultFile);
$cols[] = "isDefault";
$gui->colWidth("isDefault", 20);
$gui->parser("isDefault", "mFileGUI::parserDefault");
}
$cols[] = "FileName";
$gui->attributes($cols);
$gui->parser("FileName", "mFileGUI::nameParser2");
$gui->options(true, false, false);
$gui->name("Datei");
$gui->addToEvent("onDelete", OnEvent::reloadPopup("mFile"));
$oldFiles = "";
if ($class != null and $classID != null) {
$AC = anyC::get("Datei", "DateiClassID", $classID);
$AC->addAssocV3("DateiClass", "=", $class);
$oldFiles = new HTMLTable(2, "Verknüpfte Dateien");
while ($F = $AC->getNextEntry()) {
$BDL = new Button("Datei herunterladen", "./plugins/Files/download.png", "icon");
$BDL->onclick("windowWithRme('File','" . $F->A("DateiPath") . "','download','');");
$BDL->style("float:right;");
$oldFiles->addRow(array($BDL . $F->A("DateiName")));
}
}
$BPool = new Button("Pool\nanzeigen", "./lightCRM/Mail/images/attach.png");
$BPool->style("float:right;margin:10px;");
$BPool->onclick(OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")));
if ($usePool and $rootDir) {
echo $BPool . "<div style=\"clear:both;\"></div>";
if (file_exists(FileStorage::getFilesDir() . "{$class}Pool")) {
echo OnEvent::script("window.setTimeout(function(){ if(\$j('#editDetailsmFileSidePanel').length > 0) return; " . OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")) . "}, 100);");
}
}
$F = new HTMLForm("fileUpload", array("datei"));
$s = array("path" => $bps["path"], "class" => "File");
if ($uploadTargetFilename != null) {
$s["targetFilename"] = $uploadTargetFilename;
}
$F->setType("datei", "file", null, $s);
$F->addJSEvent("datei", "onChange", OnEvent::reloadPopup("mFile"));
$F->getTable()->setColWidth(1, 120);
echo "<p class=\"prettyTitle\">/" . basename($bps["path"]) . "</p><p style=\"color:grey;margin-top:-15px;margin-bottom:10px;\"><small>" . dirname(realpath($bps["path"])) . "</small></p>" . $F . $gui->getBrowserHTML(-1) . $oldFiles;
}
示例14: getEditHTML
function getEditHTML()
{
$this->object->loadMeOrEmpty();
if ($this->object->getID() == -1) {
$this->addToEvent("onSave", "\$('contentLeft').update('');");
}
$F = new HTMLForm($this->formID == null ? "edit" . get_class($this->object) : $this->formID, $this->attributes == null ? $this->object : $this->attributes, strpos($this->displayMode, "popup") === false ? $this->operationsButton() . $this->name : null);
$F->getTable()->setColWidth(1, 120);
if ($this->showSave) {
$F->setSaveClass(get_class($this->object), $this->object->getID(), $this->functionEntrySave, $this->name);
}
$F->isEditable($this->showInputs);
foreach ($this->object->getA() as $n => $v) {
$F->setValue($n, $v);
$F->setLabel($n, str_replace($this->object->getClearClass(), "", $n));
}
foreach ($this->types as $n => $l) {
$F->setType($n, $l, null, isset($this->options[$n]) ? $this->options[$n] : null);
}
foreach ($this->labels as $n => $l) {
$F->setLabel($n, $l);
}
foreach ($this->descriptionsField as $n => $l) {
$F->setDescriptionField($n, $l);
}
foreach ($this->parsers as $n => $l) {
$F->setType($n, "parser", null, array($l, $this->object));
}
foreach ($this->spaces as $n => $l) {
$F->insertSpaceAbove($n, $l);
}
foreach ($this->fieldButtons as $n => $B) {
$F->addFieldButton($n, $B);
}
foreach ($this->fieldEvents as $k => $v) {
$F->addJSEvent($v[0], $v[1], $v[2]);
}
foreach ($this->hiddenLines as $n) {
$F->inputLineStyle($n, "display:none;");
}
foreach ($this->inputStyles as $k => $n) {
$F->setInputStyle($k, $n);
}
foreach ($this->autocomplete as $k => $a) {
$F->setAutoComplete($k, $a[0], $a[1]);
}
return $this->topButtons() . $this->sideButtons() . $F;
}
示例15: editRepeatable
public function editRepeatable($todoID)
{
$F = new HTMLForm("RepeatableForm", array("TodoRepeat", "TodoRepeatWeekOfMonth", "TodoRepeatDayOfWeek", "TodoRepeatInterval", "TodoRepeatUntil"), "Wiederholungen");
$F->getTable()->setColWidth(1, 120);
$T = new Todo($todoID);
$F->setValues($T);
$F->setValue("TodoRepeatUntil", Util::CLDateParserE($T->A("TodoRepeatUntil")));
$F->setLabel("TodoRepeat", "Wiederholen");
$F->setLabel("TodoRepeatWeekOfMonth", "Tag");
$F->setLabel("TodoRepeatDayOfWeek", "Tage");
$F->setLabel("TodoRepeatInterval", "Intervall");
$F->setLabel("TodoRepeatDayOfWeek", "Tage");
$F->setLabel("TodoRepeatUntil", "Bis");
$F->setType("TodoRepeatInterval", "select", null, array("Wöchentlich", "Jede 2. Woche", "Jede 3. Woche", "Jede 4. Woche"));
$F->setType("TodoRepeatUntil", "date");
#$currentWeek = ceil((date("d", $T->A("TodoFromDay")) - date("w", $T->A("TodoFromDay")) - 1) / 7) + 1;
#echo $currentWeek;
$D = new Datum($T->A("TodoFromDay"));
$nthDay = $D->getNthDayOfMonth();
if ($nthDay > 4) {
$nthDay = 4;
}
$weeks = array(0 => "am " . date("d", $T->A("TodoFromDay")) . ". jeden Monats");
$weeks[$nthDay] = "jeden {$nthDay}. " . Util::CLWeekdayName(date("w", $T->A("TodoFromDay"))) . " des Monats";
$weeks[127] = "am letzten Tag des Monats";
$F->setType("TodoRepeat", "select", "", Todo::$repeatTypes);
$F->setType("TodoRepeatWeekOfMonth", "select", "", $weeks);
#$F->setType("TodoRepeatDayOfWeek", "checkbox");
$F->setType("TodoRepeatDayOfWeek", "parser", $T->A("TodoRepeatDayOfWeek"), array("mTodoGUI::parserDayOfWeek"));
$F->hideIf("TodoRepeat", "!=", "monthly", "onchange", array("TodoRepeatWeekOfMonth"));
$F->hideIf("TodoRepeat", "!=", "daily", "onchange", array("TodoRepeatDayOfWeek"));
$F->hideIf("TodoRepeat", "!=", "weekly", "onchange", array("TodoRepeatInterval", "TodoRepeatUntil"));
$F->setSaveClass("Todo", $todoID, "function(){ /*\$j('#eventAdditionalContent').slideUp();*/ contentManager.reloadFrame('contentScreen'); Kalender.refreshInfoPopup(); }", "Aktivität");
return $F;
}