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


PHP ValidatingForm::addButton方法代码示例

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


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

示例1: PageGenerator

    exit;
}
// in case of failure, set errorStatus to 0 in order to display the edit form
$errorStatus = 0;
// edit form page starts here
$p = new PageGenerator($title);
$sidemenu->forceActiveItem($activeItem);
$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(){
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:edit.php

示例2: TrFormElement

    $entities->setElementsVal($values);
    if (count($list) > 15) {
        $entities->setHeight(15);
    } else {
        $entities->setFullHeight();
    }
    $f->add(new TrFormElement(_T('Entities', 'report'), $entities), array("required" => true));
    /* Modules indicators */
    foreach ($report as $module_name => $sections) {
        $moduleObj = $MMCApp->getModule($module_name);
        if ($moduleObj) {
            $f->add(new TrFormElement($moduleObj->getDescription(), new ReportModule($module_name, $sections)), array());
        }
    }
    $f->pop();
    $f->addButton("generate_report", _T('Generate Report', 'report'));
} else {
    if (isset($_POST['generate_report'])) {
        $ts_from = intval($_POST['period_from_timestamp']);
        $ts_to = intval($_POST['period_to_timestamp']);
        $datediff = $ts_to + 86400 - $ts_from;
        $nb_days = floor($datediff / (60 * 60 * 24));
        $nb_periods = min($nb_days, 7);
        $interval = $nb_days > 7 ? $nb_days / 7 : 1;
        $periods = array(date('Y-m-d', $ts_from));
        for ($i = 1; $i < $nb_periods - 1; $i++) {
            $periods[] = date('Y-m-d', strtotime("+" . round($interval * $i) . " days", $ts_from));
        }
        $periods[] = date('Y-m-d', $ts_to);
        $items = array();
        foreach ($_POST['indicators'] as $name => $status) {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:index.php

示例3: sprintf

            $p->setSideMenu($sidemenu);
            $p->display();
            $a_href_open = "<a href=''>";

            $msg = sprintf(_T("The synchro is currently running, please wait or reload the page %shere%s.<br/>", "imaging"), $a_href_open, '</a>');
            $t1 = new TitleElement($msg, 3);
            $t1->display();
            $msg = sprintf(_T("If the synchro runs since more than 5 minutes, please reset the synchro state of this computer's menu.", "imaging"));
            $t2 = new TitleElement($msg, 3);
            $t2->display();

            $f = new ValidatingForm();
            $f->add(new HiddenTpl("gid"),                    array("value" => $params['target_uuid'],            "hide" => True));
            $f->add(new HiddenTpl("groupname"),                    array("value" => $params['target_name'],            "hide" => True));
            $f->add(new HiddenTpl("type"),                           array("value" => $params['type'],                   "hide" => True));
            $f->addButton("bresetsynchrostate", _T("Reset Synchro state", "imaging"));
            $f->display();

        } else {
            # do nothing special if $SYNCHROSTATE_DONE
            $p = new TabbedPageGenerator();
            $sidemenu->forceActiveItem("list_profiles");
            $p->setSideMenu($sidemenu);
            global $stateid;
            $stateid = $ret['id'];

            $params['groupname'] = $group->getName();
            $params['target_name'] = $params['groupname'];
            $p->addTop(sprintf(_T("%s's profile imaging", 'imaging'), $group->getName()),
                "modules/imaging/imaging/header.php");
            $p->addTab("grouptabbootmenu", _T("Boot menu", 'imaging'), _T("Current boot menu", "imaging"),
开发者ID:neoclust,项目名称:mmc,代码行数:31,代码来源:tabs.php

示例4: ValidatingForm

if (isset($_POST["bunregister"])) {
    $type = $_POST["type"];
    $target_uuid = $_POST['target_uuid'];
    $target_name = $_POST['target_name'];
    $params['target_uuid'] = $target_uuid;
    $params['target_name'] = $target_name;
    $msg = _T("You are going to unregister this computer from the imaging module, are you sure you want to do that?", "imaging");
    $f = new ValidatingForm();
    $f->add(new TitleElement($msg, 3));
    $f->push(new Table());
    $f->add(new TrFormElement(_T("Do you want a backup to be done ?", "imaging"), new CheckBoxTpl("backup")), array("value" => ''));
    $f->add(new HiddenTpl("target_uuid"), array("value" => $target_uuid, "hide" => True));
    $f->add(new HiddenTpl("target_name"), array("value" => $target_name, "hide" => True));
    $f->add(new HiddenTpl("type"), array("value" => $type, "hide" => True));
    $f->pop();
    $f->addButton("bunregister2", _T("Unregister this computer", 'imaging'));
    $f->addButton("cancel", _T("Cancel", "imaging"), 'btnSecondary');
    $f->display();
} else {
    if (isset($_POST["bunregister2"])) {
        $type = $_POST["type"];
        $target_uuid = $_POST['target_uuid'];
        $target_name = $_POST['target_name'];
        $params['target_uuid'] = $target_uuid;
        $params['target_name'] = $target_name;
        $params['backup'] = $_POST['backup'];
        $ret = xmlrpc_delComputersImaging(array($target_uuid), $params['backup'] ? true : false);
        if ($ret[0] and !isXMLRPCError()) {
            new NotifyWidgetSuccess(sprintf(_T("The computer %s has correctly been unregistered from imaging", 'imaging'), $target_name));
            unset($_SESSION["imaging.isComputerRegistered_" . $target_uuid]);
            header("Location: " . urlStrRedirect("base/computers/register_target", $params));
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:configure.php

示例5: Machine

    $f->addValidateButton("bconfirm");
    $f->addCancelButton("bback");
    $f->display();
}
### /Advanced actions handling ###
/* single target: form display */
if (!isset($_GET['badvanced']) && $_GET['uuid'] && !isset($_POST['launchAction'])) {
    $machine = new Machine(array('uuid' => $_GET['uuid'], 'hostname' => array('0' => $_GET['hostname']), 'displayName' => $_GET['hostname']));
    if (strlen(web_probe_order()) > 0) {
        $msc_host = new RenderedMSCHost($machine, web_probe_order());
        $msc_host->ajaxDisplay();
    } else {
        // nothing set : do not probe
        if (!isset($_POST["bprobe"])) {
            $fprobe = new ValidatingForm();
            $fprobe->addButton("bprobe", _T("Probe status", "msc"));
            $fprobe->display();
            print "<br/>";
        } else {
            $msc_host = new RenderedMSCHost($machine, web_probe_order_on_demand());
            $msc_host->ajaxDisplay();
        }
    }
    $msc_actions = new RenderedMSCActions(msc_script_list_file(), $machine->hostname, array('uuid' => $_GET['uuid']));
    $msc_actions->display();
    $ajax = new AjaxFilter(urlStrRedirect("base/computers/ajaxPackageFilter"), "container", array("uuid" => $machine->uuid, "hostname" => $machine->hostname));
    $ajax->display();
    $ajax->displayDivToUpdate();
}
/* group display */
if (!isset($_GET['badvanced']) && isset($_GET['gid']) && !isset($_POST['launchAction']) && !isset($_GET['uuid'])) {
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:launch.php

示例6: TrFormElement

</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)));
$f->pop();
$f->push(new DivExpertMode());
$f->add(new TitleElement(_T("Default menu parameters", "imaging")));
$f->push(new Table());
$f->add(new TrFormElement(_T('Default menu label', 'imaging'), new InputTpl("default_m_label")), array("value" => $default_menu['default_name']));
$f->add(new TrFormElement(_T('Default menu timeout', 'imaging'), new InputTpl("default_m_timeout")), array("value" => $default_menu['timeout']));
if ($default_menu["hidden_menu"]) {
    $hidden_menu_value = 'CHECKED';
} else {
    $hidden_menu_value = '';
}
$f->add(new TrFormElement(_T('Hide menu', 'imaging'), new CheckBoxTpl("default_m_hidden_menu")), array("value" => $hidden_menu_value));
$f->pop();
$f->add(new TitleElement(_T("Boot options", "imaging")));
$f->push(new Table());
$f->add(new TrFormElement(_T("Full path to the XPM displayed at boot", "imaging"), new InputTpl("boot_xpm")), array("value" => $default_menu['background_uri']));
$f->add(new TrFormElement(_T("Message displayed during backup/restoration", "imaging"), new TextareaTpl("boot_msg")), array("value" => $default_menu['message']));
$f->pop();
$f->pop();
/* Closes expert mode div */
$_GET["action"] = "save_configuration";
$f->addButton("bvalid", _T("Validate"));
$f->pop();
$f->display();
require "../includes/ajaxcommon_bottom.inc.php";
开发者ID:pulse-project,项目名称:pulse,代码行数:30,代码来源:ajaxConfiguration.php

示例7: _parseEditMachineForm

    list($name, $description, $enabled) = _parseEditMachineForm();
    $editSuccess = editMachine($name, array($name, $description, $enabled));
    if (!isXMLRPCError() and $editSuccess) {
        new NotifyWidgetSuccess(_T("Computer successfully modified."));
        header("Location: " . urlStrRedirect("samba4/machines/index"));
        exit;
    }
}
/* Showing the edit machine details form */
if ($name) {
    $machineDetails = getMachine($name);
    $form = new ValidatingForm();
    $form->push(new Table());
    $tr = new TrFormElement(_T("Computer name", "samba4"), new HiddenTpl("name"));
    $form->add($tr, array("value" => $machineDetails["name"], "required" => True));
    $tr = new TrFormElement(_T("Computer description", "samba4"), new InputTpl("description"));
    $form->add($tr, array("value" => $machineDetails["description"], "required" => True));
    $tr = new TrFormElement(_T("Computer account is enabled", "samba4"), new CheckboxTpl("enabled"), array("tooltip" => _T("If checked, the computer account is enabled", "samba4")));
    $form->add($tr, array("value" => $machineDetails["enabled"] ? "checked" : ""));
    $form->addButton("bmachineedit", _("Confirm"));
    $form->display();
}
/* Private functions */
function _parseEditMachineForm()
{
    $FH = new FormHandler("editMachineFH", $_POST);
    $name = $FH->getPostValue("name");
    $description = $FH->getPostValue("description");
    $enabled = $FH->getPostValue("shareEnabled") == "on" ? True : "";
    return array($name, $description, $enabled);
}
开发者ID:psyray,项目名称:mmc,代码行数:31,代码来源:edit.php

示例8: strtolower

}
if (isset($_POST['cn'])) {
    $name = strtolower(substr($_POST['cn'], 0, -1));
    $displayName = $_POST['displayName'];
    $disable = false;
    if (isset($_POST['disable']) && $_POST['disable'] == "on") {
        $disable = true;
    }
    $params = array("displayName" => $displayName, "disable" => $disable);
    change_machine($name, $params);
    if (!isXMLRPCError()) {
        new NotifyWidgetSuccess(_T("Computer successfully modified."));
        header("Location: " . urlStrRedirect("samba/machines/index"));
        exit;
    }
}
if ($name) {
    $ldapArr = get_machine($name);
    $f = new ValidatingForm();
    $f->push(new Table());
    $f->add(new TrFormElement(_T("Name"), new HiddenTpl("cn")), array("value" => $ldapArr["cn"][0], "required" => true));
    $f->add(new TrFormElement(_T("Comment"), new InputTpl("displayName")), array("value" => $ldapArr["displayName"][0]));
    if (strpos($ldapArr["sambaAcctFlags"][0], "D")) {
        $value = "checked";
    } else {
        $value = "";
    }
    $f->add(new TrFormElement(_T("Disable computer account"), new CheckBoxTpl("disable")), array("value" => $value));
    $f->addButton("bedit", _("Confirm"));
    $f->display();
}
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:edit.php

示例9: array

            }
        }
    }
    $a = array("value" => $network, "required" => True);
    $a["zone"] = $zone;
    $a["ajaxurl"] = "ajaxDnsGetZoneFreeIp";
    $formElt = new GetFreeIPInputTpl();
} else {
    if ($_GET["action"] == "addhost") {
        $a = array("value" => "", "required" => True);
        $formElt = new IPInputTpl("ipaddress");
    } else {
        $a = array("value" => $ipaddress);
        $formElt = new HiddenTpl("ipaddress");
    }
}
$f->add(new TrFormElement(_T("Network address"), $formElt), $a);
$f->pop();
if ($_GET["action"] == "addhost") {
    $f->addButton("badd", _("Create"));
} else {
    /* On edit mode, the user can setup host aliases */
    $m = new MultipleInputTpl("hostalias", _T("Hostname alias"));
    $m->setRegexp('/^[a-z][a-z0-9-]*[a-z0-9]$/');
    if (empty($cnames)) {
        $cnames = array("");
    }
    $f->add(new FormElement(_T("Hostname alias"), $m), $cnames);
    $f->addValidateButton("bedit");
}
$f->display();
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edithost.php

示例10: TrFormElement

    $sourcesTpl->setElements($sources);
    $sourcesTpl->setElementsVal($sourcesVals);
    $f->add(new TrFormElement(_T("Source zone"), $sourcesTpl));
} else {
    $tr = new TrFormElement(_T("Source zone"), new HiddenTpl("source"));
    $tr->setStyle("display: none");
    $f->add($tr, array("value" => $zones[0][0]));
}
$f->add(new TrFormElement(_T("Source IP(s)"), new InputTpl("src_ip"), array("tooltip" => _T("Allow connection from IP(s) address(es) (separate IPs with ',')."))), array("value" => ""));
$zones = getZonesInterfaces($dst);
if (count($zones) > 1) {
    $destinations = array();
    $destinationsVals = array();
    foreach ($zones as $zone) {
        $destinations[] = sprintf("%s (%s)", $zone[0], $zone[1]);
        $destinationsVals[] = $zone[0];
    }
    $destinationsTpl = new SelectItem("destination");
    $destinationsTpl->setElements($destinations);
    $destinationsTpl->setElementsVal($destinationsVals);
    $f->add(new TrFormElement(_T("Destination zone"), $destinationsTpl));
} else {
    $tr = new TrFormElement(_T("Destination zone"), new HiddenTpl("destination"));
    $tr->setStyle("display: none");
    $f->add($tr, array("value" => $zones[0][0]));
}
$f->add(new TrFormElement(_T("Destination IP"), new InputTpl("dest_ip"), array("tooltip" => _T("The computer IP in the internal network where the request will be transfered."))), array("value" => "", "required" => true));
$f->add(new TrFormElement(_T("Destination port(s)"), new InputTpl("dest_port", "/^[0-9]+\$/"), array("tooltip" => _T("If not specified, destination port(s) will be the same as the incoming port(s)"))), array("value" => ""));
$f->pop();
$f->addButton("brule", _T("Add rule"));
$f->display();
开发者ID:neoclust,项目名称:mmc,代码行数:31,代码来源:dnat_rules.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: array

    } else {
        $f->add($selectpapi, array("value" => $p_api_id, "hide" => True));
    }
    $f->add(new HiddenTpl("id"), array("value" => $package['id'], "hide" => True));
    $f->add(new HiddenTpl("filename"), array("value" => $_FILES['filepackage']['name'], "hide" => True));
    $f->add(new HiddenTpl("random_dir"), array("value" => $_POST['random_dir'], "hide" => True));
    if ($_GET["action"] == "add") {
        $f->add(new HiddenTpl("mode"), array("value" => "creation", "hide" => True));
    }
    $fields = array(array("label", _T("Package label", "pkgs"), array("required" => True)), array("version", _T("Package version", "pkgs"), array("required" => True)), array('description', _T("Description", "pkgs"), array()));
    $cmds = array(array('command', _T('Command\'s name : ', 'pkgs'), _T('Command : ', 'pkgs')));
    $options = array(array('reboot', _T('Need a reboot ?', 'pkgs')));
    foreach ($fields as $p) {
        $f->add(new TrFormElement($p[1], new InputTpl($p[0])), array_merge(array("value" => $package[$p[0]]), $p[2]));
    }
    foreach ($options as $p) {
        $op = $package[$p[0]] == 1 || $package[$p[0]] == '1' || $package[$p[0]] === 'enable';
        $f->add(new TrFormElement($p[1], new CheckboxTpl($p[0])), array("value" => $op ? 'checked' : ''));
    }
    foreach ($cmds as $p) {
        $f->add(new HiddenTpl($p[0] . 'name'), array("value" => $package[$p[0]]['name'], "hide" => True));
        $f->add(new TrFormElement($p[2], new TextareaTpl($p[0] . 'cmd')), array("value" => htmlspecialchars($package[$p[0]]['command'])));
    }
    $f->pop();
    if ($_GET["action"] == "add") {
        $f->addButton('bassoc', _T("Associate files", "pkgs"), "btnPrimary");
    } else {
        $f->addValidateButton("bcreate");
    }
}
$f->display();
开发者ID:neoclust,项目名称:mmc,代码行数:31,代码来源:edit.php

示例13: TrFormElement

}
$f->add(new TrFormElement(_T("File size", "backuppc"), $sel, array()));
/*
 $f->add(
 new TrFormElement(_T('Minimum file size','backuppc'), new InputTpl('minsize')),
 array("value" => isset($_POST['minsize'])?$_POST['minsize']:'',"required" => True)
 );

 $f->add(
 new TrFormElement(_T('Maximum file size','backuppc'), new InputTpl('maxsize')),
 array("value" => isset($_POST['maxsize'])?$_POST['maxsize']:'',"required" => True)
 );
*/
// =====================================================================
$f->pop();
$f->addButton("bsearch", _T('Search', 'backuppc'));
$f->display();
// ===== AJAX FILE TABLE ==============================================
$ajax = new AjaxFilterLocation(urlStrRedirect("backuppc/backuppc/ajaxFileSearch"), 'container', 'location', $_POST);
$fils = array('.');
$fils_v = array('.');
$ajax->setElements($fils);
$ajax->setElementsVal($fils_v);
$ajax->display();
echo "<br/><br/>";
$ajax->displayDivToUpdate();
?>

<script type="text/javascript">

    jQuery(function() {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:fileSearch.php

示例14: TrFormElement

            );
            $f->add(
                new TrFormElement(_T("Image parameters", "imaging"),
                new InputTpl("target_opt_image")), array("value" => $local_image_parameters)
            );

            $f->add(
                new TrFormElement(_T("Force raw backup mode", "imaging"),
                new CheckboxTpl("target_opt_raw_mode")),
                array("value" => $rawmode)
            );
        } else {
            $f->add(new HiddenTpl('target_opt_kernel'),       array("value" => ($target != null?$target['kernel_parameters']:web_def_kernel_parameters()),            "hide" => True));
            $f->add(new HiddenTpl('target_opt_image'),        array("value" => ($target != null?$target['image_parameters']:web_def_image_parameters()),              "hide" => True));
            $f->add(new HiddenTpl('target_opt_raw_mode'),     array("value" => ($target != null?$target['raw_mode']:''),                                              "hide" => True));
        }

        $f->pop();

        $f->addValidateButton("bvalid");
        if ($type == '' && !$has_profile && ($whose && $whose[0] == $target['uuid'])) {
            $f->addButton("bunregister", _T("Unregister this computer", 'imaging'), 'btnSecondary');
        }

        $f->pop(); // Div expert mode

        $f->display();
    }
}
?>
开发者ID:neoclust,项目名称:mmc,代码行数:30,代码来源:configure.php

示例15: sprintf

$tooltip .= "%s";
$tooltip .= _T("(DHCP option number 66)");
$tooltip = sprintf($tooltip, "<br/>");
$f->add(new TrFormElement(_T("TFTP server name"), new IA5InputTpl("tftp-server-name"), array("tooltip" => $tooltip)), array("value" => $options["tftp-server-name"]));
$f->pop();
$f->push(new Table());
$f->add(new TrFormElement(_T("DHCP client lease time (in seconds)"), new HiddenTpl("")));
$f->add(new TrFormElement(_T("Minimum lease time"), new NumericInputTpl("min-lease-time"), array("tooltip" => _T("Minimum length in seconds that will be assigned to a lease."))), array("value" => $statements["min-lease-time"]));
$f->add(new TrFormElement(_T("Default lease time"), new NumericInputTpl("default-lease-time"), array("tooltip" => _T("Lengh in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time."))), array("value" => $statements["default-lease-time"]));
$f->add(new TrFormElement(_T("Maximum lease time"), new NumericInputTpl("max-lease-time"), array("tooltip" => _T("Maximum length in seconds that will be assigned to a lease."))), array("value" => $statements["max-lease-time"]));
$f->pop();
$f->push(new Table());
$f->add(new TrFormElement(_T("Dynamic pool(s) for non-registered DHCP clients", "network"), new CheckboxTpl("hassubnetpools")), array("value" => $hasSubnetPools, "extraArg" => 'onclick="toggleVisibility(\'poolsdiv\');"'));
$f->pop();
$poolsdiv = new Div(array("id" => "poolsdiv"));
$poolsdiv->setVisibility($hasSubnetPools);
$f->push($poolsdiv);
$f->push(new Table());
$f->add(new TrFormElement(_T("Dynamic pools"), new MultipleRangeInputTpl("subnetpools")), array("value" => $poolsRanges));
$f->pop();
// pop table
$f->pop();
// pop div
$f->pop();
// pop the form
if ($_GET["action"] == "subnetadd") {
    $f->addButton("badd", _("Create"));
} else {
    $f->addButton("bedit", _("Confirm"));
}
$f->display();
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:subnetedit.php


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