当前位置: 首页>>代码示例>>PHP>>正文


PHP HTMLForm::setValues方法代码示例

本文整理汇总了PHP中HTMLForm::setValues方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::setValues方法的具体用法?PHP HTMLForm::setValues怎么用?PHP HTMLForm::setValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTMLForm的用法示例。


在下文中一共展示了HTMLForm::setValues方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . "&nbsp;</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;
     }
 }
开发者ID:nemiah,项目名称:fheME,代码行数:48,代码来源:mxCalGUI.class.php

示例2: getEditTableHTML

 public function getEditTableHTML($cols = 2)
 {
     BPS::unsetProperty($this->className . "GUI", "edit");
     if ($this->attributes == null) {
         $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
     }
     if ($this->name == null) {
         $this->name = $this->className;
     }
     $BA = $this->getAbortButton();
     if (isset($this->features["CRMEditAbove"])) {
         $BA->style("float:left;margin-left:10px;margin-top:10px;");
     }
     $abort = "<div>{$BA}</div><div style=\"clear:left;height:10px;\"></div>";
     $tab = new HTMLForm($this->className . "Form", $this->attributes, $this->name . " editieren:");
     if ($cols != 2) {
         $tab->cols($cols);
     }
     foreach ($this->labels as $k => $v) {
         $tab->setLabel($k, $v);
     }
     foreach ($this->types as $k => $v) {
         $tab->setType($k, $v, null, isset($this->options[$k]) ? $this->options[$k] : null);
     }
     foreach ($this->spaces as $k => $v) {
         $tab->insertSpaceAbove($k, $v);
     }
     foreach ($this->autocomplete as $k => $a) {
         $tab->setAutoComplete($k, $a[0], $a[1]);
     }
     foreach ($this->fieldButtons as $k => $B) {
         $tab->addFieldButton($k, $B);
     }
     foreach ($this->parsers as $n => $l) {
         $tab->setType($n, "parser", null, array($l, $this->object));
     }
     $tab->setValues($this->object);
     if ($this->object->getID() == -1) {
         $save = $this->functionSaveNew;
     } else {
         $save = $this->functionSave;
     }
     $tab->setSaveClass($this->className, $this->object->getID(), str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $save), $this->name);
     return $abort . $tab;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:45,代码来源:CRMHTMLGUI.class.php

示例3: 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;
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:13,代码来源:CCAuftrag.class.php

示例4: 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;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:35,代码来源:mTodoGUI.class.php


注:本文中的HTMLForm::setValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。