本文整理汇总了PHP中ValidatingForm::addCancelButton方法的典型用法代码示例。如果您正苦于以下问题:PHP ValidatingForm::addCancelButton方法的具体用法?PHP ValidatingForm::addCancelButton怎么用?PHP ValidatingForm::addCancelButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ValidatingForm
的用法示例。
在下文中一共展示了ValidatingForm::addCancelButton方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageGenerator
// 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(){
var $ = jQuery;
$('input.btnPrimary').click(function () {
$('select#secondary.list option').prop('selected', true);
});
示例2: HiddenTpl
$f->add(new HiddenTpl("copy_mode"), array("value" => web_def_mode(), "hide" => True));
} else {
$rb = new RadioTpl("copy_mode");
$rb->setChoices(array(_T('push', 'msc'), _T('push / pull', 'msc')));
$rb->setvalues(array('push', 'push_pull'));
$rb->setSelected($_GET['copy_mode']);
$f->add(new TrFormElement(_T('Copy Mode', 'msc'), $rb));
}
/* Only display local proxy button on a group and if allowed */
if (isset($_GET['gid']) && strlen($_GET['gid']) && web_allow_local_proxy()) {
$f->add(new TrFormElement(_T('Deploy using a local proxy', 'msc'), new CheckboxTpl("local_proxy")), array("value" => ''));
}
}
$f->pop();
$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();