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


PHP HTMLForm::insertSpaceAbove方法代码示例

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


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

示例1: 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;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:25,代码来源:CCTicketShop.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: 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;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:33,代码来源:CCRegistrationPDFix.class.php

示例4: getForm

 function getForm()
 {
     if ($this->form != null) {
         return $this->form;
     }
     if ($this->formID == null) {
         $this->formID = "edit" . get_class($this->object);
     }
     $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);
     $F->getTable()->addTableClass("contentEdit");
     $ID = $this->object->getID();
     if (BPS::getProperty("HTMLGUI", "insertAsNew", false)) {
         $ID = -1;
         BPS::unsetProperty("HTMLGUI", "insertAsNew");
     }
     if ($this->showSave) {
         $F->setSaveClass(get_class($this->object), $ID, $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, T::_($l));
     }
     foreach ($this->placeholders as $n => $l) {
         $F->setPlaceholder($n, $l);
     }
     foreach ($this->descriptionsField as $n => $l) {
         $F->setDescriptionField($n, T::_($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, T::_($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], $a[2]);
     }
     $this->form = $F;
     return $F;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:60,代码来源:HTMLGUIX.class.php

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


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