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


PHP ValidatingForm::push方法代码示例

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


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

示例1: ValidatingForm

'<cpi:offlineImage cpi:source="catalog:d:/sources/install_windows 81 ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />',
'</unattend>',
].join('\r\n');

</script>
<?php 
require "../../../includes/config.inc.php";
require "../../../includes/i18n.inc.php";
require "../../../includes/acl.inc.php";
require "../../../includes/session.inc.php";
require "../../../includes/PageGenerator.php";
require "../includes/data_Windows_Answer_File_Generator.inc.php";
$f = new ValidatingForm();
$f->add(new HiddenTpl("codeToCopy"), array("value" => "", "hide" => True));
$tableformAWFG = new Table();
$f->push($tableformAWFG);
//------------------
//------------------
$f->add(new TrFormElement("", new multifieldTpl(array(new SpanElement(_T("Installation Notes", "imaging")), new Iconereply('Installation_Notes', $InfoBule_Installation_Notes)))));
//_____________
$f->add(new TrFormElement(_T('Title', 'imaging'), new InputTplTitle('Location', "name file xml")), array("required" => True));
//_____________
$f->add(new TrFormElement("Notes" . ":", new TextareaTpl('Comments')));
//------------------
//------------------
$f->add(new TrFormElement("", new multifieldTpl(array(new SpanElement(_T("General Settings", "imaging")), new Iconereply('General_Settings', $InfoBule_General_Settings)))));
//_____________
$key1 = new InputTplTitle('ProductKey1', $InfoBule_ProductKey);
$key1->setSize(5);
$key2 = new InputTplTitle('ProductKey2', $InfoBule_ProductKey);
$key2->setSize(5);
开发者ID:psyray,项目名称:mmc,代码行数:31,代码来源:ajaxFormWin81.php

示例2: getPoolsRanges

    if (isAuthoritative($subnetInfos)) {
        $authoritative = "CHECKED";
    } else {
        $authoritative = "";
    }
    $poolsRanges = getPoolsRanges($subnet);
    $hasSubnetPools = count($poolsRanges) ? "checked" : "";
}
if ($_GET["action"] == "subnetadd") {
    $formElt = new IPInputTpl("subnet");
    $authoritative = "";
} else {
    $formElt = new HiddenTpl("subnet");
}
$f = new ValidatingForm();
$f->push(new Table());
$f->add(new TrFormElement(_T("DHCP subnet address"), $formElt), array("value" => $subnet, "required" => True));
$f->add(new TrFormElement(_T("Netmask"), new NetmaskInputTpl("netmask")), array("value" => $netmask, "required" => True, "extra" => _T("(e.g. 24 for a /24 network)")));
$f->add(new TrFormElement(_T("Description"), new IA5InputTpl("description")), array("value" => $description));
$f->add(new TrFormElement(_T("Authoritative"), new CheckboxTpl("authoritative")), array("value" => $authoritative));
$f->pop();
$f->push(new Table());
$f->add(new TrFormElement(_T("DHCP options related to clients network parameters"), new HiddenTpl("")));
$f->add(new TrFormElement(_T("Broadcast address"), new IPInputTpl("broadcast-address")), array("value" => $options["broadcast-address"]));
$f->add(new TrFormElement(_T("Domain name"), new IA5InputTpl("domain-name"), array("tooltip" => _T("Domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN).") . "<br/>" . _T("If the domain name is a registered DNS domain, the subnet will be associated to the DNS domain.") . "<br/>" . _T("You can set more than one domain, separated by spaces. They will be added to the DHCP client DNS domain search path."))), array("value" => $options["domain-name"], "extra" => _T("Links the subnet to a DNS zone")));
$f->add(new TrFormElement(_T("Routers"), new HostIpListInputTpl("routers"), array("tooltip" => _T("List of routers (gateways) on client's subnet."))), array("value" => $options["routers"]));
$f->add(new TrFormElement(_T("Domain name servers"), new HostIpListInputTpl("domain-name-servers"), array("tooltip" => _T("DNS name servers available to the client. Separate servers addresses with ','."))), array("value" => $options["domain-name-servers"]));
$f->add(new TrFormElement(_T("NTP servers"), new HostIpListInputTpl("ntp-servers"), array("tooltip" => _T("Network Time Protocol servers available to the client. Separate servers addresses with ','."))), array("value" => $options["ntp-servers"]));
$f->add(new TrFormElement(_T("Proxy auto config URL"), new IA5InputTpl("local-pac-server"), array("tooltip" => _T("Automatic proxy configuration URL (PAC)."))), array("value" => $options["local-pac-server"]));
$f->add(new TrFormElement(_T("WINS servers"), new HostIpListInputTpl("netbios-name-servers"), array("tooltip" => _T("Netbios name servers available to Windows clients, listed in order of preference. Separate servers addresses with ','."))), array("value" => $options["netbios-name-servers"]));
$winsclient = new SelectItem("netbios-node-type");
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:subnetedit.php

示例3: stripslashes

 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
require "modules/samba/includes/machines.inc.php";
require "modules/samba/includes/samba.inc.php";
require "modules/samba/mainSidebar.php";
require "graph/navbar.inc.php";
if (isset($_POST["baddmach"])) {
    $machine = $_POST["machine"];
    $comment = stripslashes($_POST["comment"]);
    add_machine($machine, $comment);
    if (!isXMLRPCError()) {
        new NotifyWidgetSuccess(sprintf(_T("Computer %s successfully added"), $machine));
        header("Location: " . urlStrRedirect("samba/machines/index"));
        exit;
    }
}
$p = new PageGenerator(_T("Add a computer"));
$p->setSideMenu($sidemenu);
$p->display();
$f = new ValidatingForm();
$f->addSummary(_T("The computer name can only contains letters lowercase and numbers, and must begin with a letter."));
$f->push(new Table());
$f->add(new TrFormElement(_T("Computer name"), new NetbiosInputTpl("machine")), array("value" => $machine, "required" => True));
$f->add(new TrFormElement(_T("Comment"), new InputTpl("comment")), array("value" => $comment));
$f->pop();
$f->pop();
$f->addValidateButton("baddmach");
$f->display();
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:add.php

示例4: NotifyWidgetSuccess

}
if (isset($_POST["bsave"])) {
    $ret = save_smbconf();
    if (!isXMLRPCError()) {
        new NotifyWidgetSuccess(sprintf(_T("SAMBA configuration saved. You may need to reload or restart the SAMBA service.")));
    }
}
require "modules/samba4/mainSidebar.php";
require "graph/navbar.inc.php";
$p = new PageGenerator(_T("General options"));
$p->setSideMenu($sidemenu);
$p->display();
$smb = get_smbconf();
#print $smb;
$f = new ValidatingForm();
$f->push(new Table());
#if ($smb["pdc"])
#    $workgroupTpl = new HiddenTpl("workgroup");
#else
$workgroupTpl = new HiddenTpl("realm");
$f->add(new TrFormElement(_T("Domain name"), $workgroupTpl), array("value" => $smb["realm"], "required" => True));
$f->add(new TrFormElement(_T("Server name"), new HiddenTpl("netbios name")), array("value" => $smb["netbios name"], "required" => True));
$value = "";
#if ($smb["pdc"]) $value = "checked";
#$f->add(
#        new TrFormElement(_T("This server is a PDC"),new CheckboxTpl("pdc")),
#        array("value" => $value)
#);
#$f->add(
#        new TrFormElement(_T("This server is a WINS server"),new CheckboxTpl("wins support")),
#        array("value" => getCheckedState($smb, "wins support"))
开发者ID:psyray,项目名称:mmc,代码行数:31,代码来源:index.php

示例5: ValidatingForm

 function display_ordered($orders)
 {
     $f = new ValidatingForm();
     $f->push(new Table());
     foreach ($this->members as $pid => $plabel) {
         $select = new SelectItem($this->input_pre . base64_encode($pid));
         $select->setElements($this->c);
         $select->setElementsVal($this->c);
         $select->setSelected($orders[$pid]);
         $f->add(new TrFormElement($plabel, $select, array()));
     }
     foreach ($this->getHidden() as $w) {
         $f->add($w[0], $w[1]);
     }
     $this->display_options($f);
     $f->pop();
     foreach ($this->buttons as $b) {
         $f->addButton($b[0], $b[1], $b[2]);
     }
     $f->display();
 }
开发者ID:pulse-project,项目名称:pulse,代码行数:21,代码来源:bundle_widgets.php

示例6: printf

    function create_form($is_image, $image, $target_uuid, $label, $desc) {
        if ($is_image) {
            printf("<h3>"._T("Edition of image", "imaging")." : <em>%s</em></h3>", $label);
        } else {
            printf("<h3>"._T("Edition of master", "imaging")." : <em>%s</em></h3>", $label);
        }

        $f = new ValidatingForm();
        $f->add(new HiddenTpl('target_uuid'),                   array("value" => $target_uuid,                   "hide" => True));
        $f->add(new HiddenTpl("itemlabel"),                     array("value" => $label,                         "hide" => True));
        $f->add(new HiddenTpl('target_uuid'),                   array("value" => $target_uuid,                   "hide" => True));
        $f->push(new Table());
        $f->add(
            new TrFormElement(_T("Label", "imaging"), new InputTpl("image_label")),
            array("value" => $label)
        );
        $f->add(
            new TrFormElement(_T("Description", "imaging"), new InputTpl("image_description")),
            array("value" => $desc)
        );

        $f->pop();
        if (!$is_image) {
            list($a, $post_installs) = xmlrpc_getAllTargetPostInstallScript($target_uuid);
            $f = get_post_install_scripts($f, $image['post_install_scripts'], $post_installs);
        }
        return $f;
    }
开发者ID:neoclust,项目名称:mmc,代码行数:28,代码来源:images.php

示例7: ValidatingForm

$p->setSideMenu($sidemenu);
$p->display();
// create the form
$f = new ValidatingForm(array('method' => 'POST', 'enctype' => 'multipart/form-data'));
// add submit button
$f->addValidateButton("buser");
// enable/disable buttons
if ($mode == 'edit') {
    $f->addButton("enableAccount", _("Enable account"), "btnSecondary");
    $f->addButton("disableAccount", _("Disable account"), "btnSecondary");
}
// add reset form button
$f->addCancelButton("breset");
// add all modules forms to the edit form
$modules = callPluginFunction("baseEdit", array($FH, $mode));
foreach ($modules as $module => $editForm) {
    $f->push($editForm);
    $f->pop();
}
// display the form
$f->display();
?>
<script type="text/javascript">
jQuery(function(){
    var $ = jQuery;
    $('input.btnPrimary').click(function () {
        $('select#secondary.list option').prop('selected', true);
    });
});
</script>
开发者ID:pulse-project,项目名称:pulse,代码行数:30,代码来源:edit.php

示例8: getServicesNames

    }
    // add info messages
    if ($result) {
        $services = getServicesNames();
        $resultPopup->add('<div class="alert alert-success">' . $result . '</div>');
        handleServicesModule($resultPopup, array($services[1] => "DHCP"));
    }
    if (!$error) {
        header("Location: " . urlStrRedirect("network/network/services"));
        exit;
    }
}
$f = new ValidatingForm();
$f->addValidateButton("bdhcpfailover");
$f->addCancelButton("breset");
$f->push(new Table());
$f->add(new TrFormElement(_T("Enable DHCP failover"), new CheckboxTpl("dhcp_failover")), array("value" => $show ? "checked" : "", "extraArg" => 'onclick="toggleVisibility(\'dhcpfailoverdiv\');"'));
$f->pop();
$dhcpfailoverdiv = new Div(array("id" => "dhcpfailoverdiv"));
$dhcpfailoverdiv->setVisibility($show);
$f->push($dhcpfailoverdiv);
$f->push(new Table());
$f->add(new TrFormElement(_T("Primary DHCP server name"), new HiddenTpl("primary")), array("value" => $FH->getArrayOrPostValue("primary")));
$f->add(new TrFormElement(_T("Primary DHCP IP address"), new IPInputTpl("primaryIp")), array("value" => $FH->getArrayOrPostValue("primaryIp"), "required" => true));
$f->pop();
$f->push(new DivExpertMode());
$f->push(new Table());
$f->add(new TrFormElement(_T("Primary DHCP failover port"), new InputTpl("primaryPort"), array("tooltip" => _T("TCP port where the server listen to failover messages", "network"))), array("value" => $FH->getArrayOrPostValue("primaryPort"), "required" => true));
$f->pop();
$f->pop();
$f->push(new Table());
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:servicedhcpfailover.php

示例9: NotifyWidgetSuccess

            new NotifyWidgetSuccess(_T("SSH public keys updated.", "sshlpk"));
        }
    } else {
        if (!$showSshkeys && hasSshKeyObjectClass($uid)) {
            delSSHKeyObjectClass($uid);
            if (!isXMLRPCError()) {
                new NotifyWidgetSuccess(_T("SSH public keys attributes deleted.", "sshlpk"));
            }
        }
    }
    redirectTo(urlStrRedirect('base/users/sshkeys'));
}
$p = new PageGenerator(_T("Change your SSH keys", "sshlpk"));
$p->setSideMenu($sidemenu);
$p->display();
$show = hasSshKeyObjectClass($uid);
$f = new ValidatingForm();
$f->push(new Table());
$f->add(new TrFormElement(_T("Enable SSH keys management", "sshlpk"), new CheckboxTpl("showusersshkey")), array("value" => $show ? "checked" : "", "extraArg" => 'onclick="toggleVisibility(\'sshkeydiv\');"'));
$f->pop();
$sshkeydiv = new Div(array("id" => "sshkeydiv"));
$sshkeydiv->setVisibility($show);
$f->push($sshkeydiv);
if ($show) {
    $sshkeys = getAllSshKey($uid);
} else {
    $sshkeys = array("0" => "");
}
$f->add(new TrFormElement('', new MultipleInputTpl("sshuserkeys", _T("Public SSH Key", "sshlpk"))), $sshkeys);
$f->addValidateButton("bssh");
$f->display();
开发者ID:psyray,项目名称:mmc,代码行数:31,代码来源:edit.php

示例10: NotifyWidgetSuccess

    if (isXMLRPCError()) {
        $FH->isError(true);
    } else {
        $FH->isError(false);
        if ($result) {
            new NotifyWidgetSuccess($result);
        }
        header("Location: " . urlStrRedirect("base/users/editppolicy", array("ppolicy" => $name)));
        exit;
    }
}
$p = new PageGenerator($title);
$p->setSideMenu($sidemenu);
$p->display();
$f = new ValidatingForm();
$f->push(new Table());
if ($mode == "add") {
    $nameTpl = new InputTpl("cn", '/^[0-9a-zA-Z_ -]*$/');
} else {
    $nameTpl = new HiddenTpl("cn");
}
$f->add(new TrFormElement(_T("Name", "ppolicy"), $nameTpl), array("value" => $FH->getArrayOrPostValue("cn"), "required" => true));
$f->add(new TrFormElement(_T("Description", "ppolicy"), new InputTpl("description")), array("value" => $FH->getArrayOrPostValue("description")));
$f->add(new TrFormElement(_T("Minimum length", "ppolicy"), new InputTpl("pwdMinLength", '/^[0-9]*$/'), array("tooltip" => ppolicyTips("pwdMinLength"))), array("value" => $FH->getArrayOrPostValue("pwdMinLength")));
$f->add(new TrFormElement(_T("Password quality check", "ppolicy"), new InputTpl("pwdCheckQuality", '/^[012]$/'), array("tooltip" => ppolicyTips("pwdCheckQuality"))), array("value" => $FH->getArrayOrPostValue("pwdCheckQuality")));
$f->add(new TrFormElement(_T("Minimum age (seconds)", "ppolicy"), new InputTpl("pwdMinAge", '/^[0-9]*$/'), array("tooltip" => ppolicyTips("pwdMinAge"))), array("value" => $FH->getArrayOrPostValue("pwdMinAge")));
$f->add(new TrFormElement(_T("Maximum age (seconds)", "ppolicy"), new InputTpl("pwdMaxAge", '/^[0-9]*$/'), array("tooltip" => ppolicyTips("pwdMaxAge"))), array("value" => $FH->getArrayOrPostValue("pwdMaxAge")));
$f->add(new TrFormElement(_T("Number of grace authentications", "ppolicy"), new InputTpl("pwdGraceAuthNLimit", '/^[0-9]*$/'), array("tooltip" => ppolicyTips("pwdGraceAuthNLimit"))), array("value" => $FH->getArrayOrPostValue("pwdGraceAuthNLimit")));
if ($FH->getArrayOrPostValue("pwdMustChange") == 'TRUE' || $FH->getArrayOrPostValue("pwdMustChange") == 'on') {
    $pwdMustChange = "checked";
} else {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edit.php

示例11: item_edit

function item_edit() {

    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = urldecode($_GET['itemlabel']);

    $item = xmlrpc_getMenuItemByUUID($item_uuid);

    if(count($_POST) == 0) {

        $name = (isset($item['boot_service']) ? $item['boot_service']['default_name'] : $item['image']['default_name']);
        printf("<h3>"._T("Edition of item", "imaging")." : <em>%s</em></h3>", $name);

        $is_selected = '';
        $is_displayed = 'CHECKED';
        $is_wol_selected = '';
        $is_wol_displayed = 'CHECKED';
        // get current values
        if($item['default'] == true)
            $is_selected = 'CHECKED';
        if($item['hidden'] == true)
            $is_displayed = '';
        if($item['default_WOL'] == true)
            $is_wol_selected = 'CHECKED';
        if($item['hidden_WOL'] == true)
            $is_wol_displayed = '';

        $f = new ValidatingForm();
        $f->push(new Table());
        $f->add(new HiddenTpl("itemid"),                        array("value" => $item_uuid,                     "hide" => True));
        $f->add(new HiddenTpl("itemlabel"),                     array("value" => $label,                         "hide" => True));
        $f->add(new HiddenTpl("gid"),                           array("value" => $_GET['gid'],                   "hide" => True));
        $f->add(new HiddenTpl("uuid"),                          array("value" => $_GET['uuid'],                  "hide" => True));
        $f->add(new HiddenTpl("default_name"),                  array("value" => $name,                          "hide" => True));

        $f->add(
            new TrFormElement(_T("Selected by default", "imaging"),
            new CheckboxTpl("default")),
            array("value" => $is_selected)
        );
        $f->add(
            new TrFormElement(_T("Displayed", "imaging"),
            new CheckboxTpl("displayed")),
            array("value" => $is_displayed)
        );
        $f->add(
            new TrFormElement(_T("Selected by default on WOL", "imaging"),
            new CheckboxTpl("default_WOL")),
            array("value" => $is_wol_selected)
        );
        $f->add(
            new TrFormElement(_T("Displayed on WOL", "imaging"),
            new CheckboxTpl("displayed_WOL")),
            array("value" => $is_wol_displayed)
        );
        $f->pop();
        $f->addButton("bvalid", _T("Validate"));
        $f->pop();
        $f->display();
    } else {
        // set new values
        if(isset($_GET['gid'])) {
            $type = 'group';
            $target_uuid = $_GET['gid'];
        } else {
            $type = '';
            $target_uuid = $_GET['uuid'];
        }

        $bs_uuid = $item['boot_service']['imaging_uuid'];
        $im_uuid = $item['image']['imaging_uuid'];

        $params['default'] = ($_POST['default'] == 'on'?True:False);
        $params['default_WOL'] = ($_POST['default_WOL'] == 'on'?True:False);
        $params['hidden'] = ($_POST['displayed'] == 'on'?False:True);
        $params['hidden_WOL'] = ($_POST['displayed_WOL'] == 'on'?False:True);
        $params['default_name'] = $_POST['default_name'];

        if (isset($bs_uuid) && $bs_uuid != '') {
            $ret = xmlrpc_editServiceToTarget($bs_uuid, $target_uuid, $params, $type);
        } else {
            $ret = xmlrpc_editImageToTarget($im_uuid, $target_uuid, $params, $type);
        }
        if ($ret) 
        { 
            // generate menu
            $ret = xmlrpc_synchroComputer($target_uuid);
        }
        // goto menu boot list
        header("Location: " . urlStrRedirect("base/computers/".$type."imgtabs", $params));
        exit;
    }
}
开发者ID:neoclust,项目名称:mmc,代码行数:93,代码来源:bootmenu.php

示例12: NotifyWidgetSuccess

    if (!isXMLRPCError()) {
        $n = new NotifyWidgetSuccess(sprintf(_T("SAMBA configuration saved. You may need to reload or restart the SAMBA service.", "samba4")));
        handleServicesModule($n, array("samba" => "SAMBA"));
    }
}
require "modules/samba4/mainSidebar.php";
require "graph/navbar.inc.php";
$p = new PageGenerator(_T("General options", "samba4"));
$p->setSideMenu($sidemenu);
$p->display();
$smb = get_smbconf();
// foreach($smb as $key => $i){
//      print("$key=$i<br>");
//  }
$f = new ValidatingForm();
$f->push(new Table());
#if ($smb["pdc"])
#    $workgroupTpl = new HiddenTpl("workgroup");
#else
$workgroupTpl = new HiddenTpl("realm");
$f->add(new TrFormElement(_T("Domain name", "samba4"), $workgroupTpl), array("value" => $smb["realm"], "required" => True));
$f->add(new TrFormElement(_T("Server name", "samba4"), new HiddenTpl("netbios name")), array("value" => $smb["netbios name"], "required" => True));
$value = "";
#if ($smb["pdc"]) $value = "checked";
#$f->add(
#        new TrFormElement(_T("This server is a PDC"),new CheckboxTpl("pdc")),
#        array("value" => $value)
#);
#$f->add(
#        new TrFormElement(_T("This server is a WINS server"),new CheckboxTpl("wins support")),
#        array("value" => getCheckedState($smb, "wins support"))
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:index.php

示例13: isset

    $checked = "checked";
    $params["only_new"] = 'on';
}
else {
    $checked = isset($_POST['only_new']) ? "checked" : "";
}

// Create the page with its title and sidemenu
$p = new PageGenerator(_T("Incoming Inventories"));
$p->setSideMenu($sidemenu);
// Display the PageGenerator
$p->display();

// Create a form with a list of options and a checkbox
$form = new ValidatingForm();
$form->push(new Table());

// The list of options is put in an array, and the listbox is configured with this array
$periodList = array(_T("Last week") => 7, _T("Last month")=>30, _T("Last quarter")=>90, _T("Last semester")=>180, _T("Last year")=>356);
$listbox = new SelectItem("period", "validateForm");
$listbox->setElements(array_keys($periodList));
$listbox->setElementsVal(array_values($periodList));
// Check the value to put by default in the list
if(isset($_POST['period']))
    $listbox->setSelected($_POST['period']);
else
    $listbox->setSelected(7); // must match with the default value in ajaxIncoming.php (7 for a week here)

// Put the element in a Tr elemet to align it
$listboxTr = new TrFormElement(_T("Period"), $listbox);
开发者ID:neoclust,项目名称:mmc,代码行数:30,代码来源:incoming.php

示例14: getZoneRecordById

if ($_GET["action"] == "editrecord" && !isset($_POST["bedit"])) {
    $record = getZoneRecordById($curzone, $recordId);
    if ($record) {
        $hostname = $record["hostname"];
        $type = $record["type"];
        $value = $record["value"];
        $typeToLoad = in_array(strtoupper($type), $recordTypes) ? strtolower($type) : "custom";
        require_once "dnsrecords/" . $typeToLoad . ".php";
        $RecordClass = $typeToLoad . "Record";
        $r = new $RecordClass(array("zone" => $zone, "type" => strtolower($type), "hostname" => $hostname));
        $r->initValuesFromString($value);
        $recordUiContainers = $r->createUiContainers(true);
    }
}
$f = new ValidatingForm();
$f->push(new Table());
if ($_GET["action"] == "addrecord") {
    $typeComboBox = new ExtendedSelectItem("recordtype", "onRecordTypeChanged");
    $typeComboBox->setJsFuncParams(array("'" . $zone . "'"));
    $typeComboBox->setAdditionalParams("onkeyup=\"this.blur();this.focus();\"");
    $typeComboBox->setElements(array_values($recordTypes));
    $typeComboBox->setElementsVal(array_keys($recordTypes));
    $f->add(new TrFormElement(_T("Record type"), $typeComboBox), array("value" => $typeIndex));
} else {
    $f->add(new TrFormElement(_T("Record type"), new HiddenTpl("recordtype")), array("value" => $type));
}
$f->pop();
$typeContentDiv = new Div(array("id" => "typecontentdiv"));
$f->push($typeContentDiv);
if (isset($recordUiContainers)) {
    foreach ($recordUiContainers as $cnt) {
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:editrecord.php

示例15: array

$lang = xmlrpc_getAllKnownLanguages();
$lang_choices = array();
$lang_values = array();
$lang_id2uuid = array();
foreach ($lang as $l) {
    $lang_choices[$l['imaging_uuid']] = $l['label'];
    $lang_values[$l['imaging_uuid']] = $l['imaging_uuid'];
    $lang_id2uuid[$l['id']] = $l['imaging_uuid'];
}
$language = new SelectItem("language");
$language->setElements($lang_choices);
$language->setElementsVal($lang_values);
if ($imaging_server['fk_language']) {
    $language->setSelected($lang_id2uuid[$imaging_server['fk_language']]);
}
$f->push(new Table());
$f->add(new TrFormElement(_T("Menu language", "imaging"), $language));
$pxe_password_label = _T('PXE Password', 'imaging');
$pxe_password_label_desc = _T('Leave this field empty to unset PXE Password', 'imaging');
$pxe_password_label = <<<EOS
<a href="#" class="tooltip">
    {$pxe_password_label}
    <span><p>
        {$pxe_password_label_desc}
    </p></span>

</a>
EOS;
$f->add(new TrFormElement($pxe_password_label, new PasswordTpl('pxe_password')), array("value" => xmlrpc_getPXEPasswordHash($location) == '' ? '' : '.......'));
$f->add(new TrFormElement(_T('Clonezilla parameters for saving images', 'imaging'), new InputTpl('clonezilla_saver_params')), array("value" => xmlrpc_getClonezillaSaverParams($location)));
$f->add(new TrFormElement(_T('Clonezilla parameters for restoring images', 'imaging'), new InputTpl('clonezilla_restorer_params')), array("value" => xmlrpc_getClonezillaRestorerParams($location)));
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:ajaxConfiguration.php


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