本文整理汇总了PHP中Doku_Form::addHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP Doku_Form::addHidden方法的具体用法?PHP Doku_Form::addHidden怎么用?PHP Doku_Form::addHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doku_Form
的用法示例。
在下文中一共展示了Doku_Form::addHidden方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tplMetaDataForm
public function tplMetaDataForm(Doku_Event &$event)
{
if ($event->data != 'social_form') {
return;
}
global $ID;
echo '<div class="plugin_social">';
echo '<div class="form" id="pluginsocialform" >';
$form = new Doku_Form(array());
$form->addHidden('target', 'plugin_social');
$form->addHidden('id', $ID);
$form->addHidden('do', 'social_save');
foreach (helper_plugin_social_meta::$metaEditableKeys as $type => $values) {
$form->addElement('<div>');
$form->startFieldset($type);
foreach ($values as $value) {
$metadata = $this->helper->meta->getMetaData();
$name = $this->helper->meta->getMetaPropertyName($type, $value);
$form->addElement(form_makeTextField($name, $metadata[$name], $name, null, 'block'));
}
$form->endFieldset();
$form->addElement('</div>');
}
$form->addElement(form_makeButton('submit', null, $this->getLang('btnSave')));
html_form('', $form);
echo '</div>';
echo '</div>';
$event->preventDefault();
}
示例2: html
/**
* output appropriate html
*/
function html()
{
print $this->locale_xhtml('intro');
$form = new Doku_Form(array('id' => 'start'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "start");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('start_btn')));
$form->addElement('<p>' . $this->getLang('start_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'stop'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "stop");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('stop_btn')));
$form->addElement('<p>' . $this->getLang('stop_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'lock'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "lock");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('lock_btn')));
$form->addElement('<p>' . $this->getLang('lock_desc') . '</p>');
html_form('', $form);
$form = new Doku_Form(array('id' => 'unlock'));
$form->addHidden("page", $_REQUEST['page']);
$form->addHidden("fn", "unlock");
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('unlock_btn')));
$form->addElement('<p>' . $this->getLang('unlock_desc') . '</p>');
html_form('', $form);
}
示例3: override_html_register
protected function override_html_register()
{
global $lang;
global $conf;
global $INPUT;
$base_attrs = array('size' => 50, 'required' => 'required');
$email_attrs = $base_attrs + array('type' => 'email', 'class' => 'edit');
print $this->override_locale_xhtml('register');
print '<div class="centeralign">' . NL;
$form = new Doku_Form(array('id' => 'dw__register'));
$form->startFieldset($lang['btn_register']);
$form->addHidden('do', 'register');
$form->addHidden('save', '1');
$form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', $base_attrs));
if (!$conf['autopasswd']) {
$form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', $base_attrs));
$form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', $base_attrs));
}
$form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', $base_attrs));
$form->addElement(form_makeField('email', 'email', $INPUT->post->str('email'), $lang['email'], '', 'block', $email_attrs));
$form->addElement(form_makeButton('submit', '', $lang['btn_register']));
$form->endFieldset();
html_form('register', $form);
print '</div>' . NL;
}
示例4: array
function _render($act)
{
global $ID;
$form = new Doku_Form(array('id' => 'forcessllogin1', 'action' => 'https://' . $this->host() . DOKU_BASE . DOKU_SCRIPT, 'method' => 'get'));
$form->addHidden('id', $ID);
$form->addHidden('do', $act);
if ($this->getConf('cert')) {
if (strpos($this->getLang('certinfo'), '{{name}}') !== false) {
$form->addElement('<p>' . str_replace('{{name}}', $this->getConf('cert'), $this->getLang('certinfo')) . '</p>' . NL);
} else {
$form->addElement('<p>' . $this->getLang('certinfo') . " " . $this->getConf('cert') . '</p>' . NL);
}
}
if ($this->getConf('ca')) {
if (strpos($this->getLang('ca'), '{{name}}') !== false) {
$form->addElement('<p>' . str_replace('{{name}}', $this->getConf('ca'), $this->getLang('cainfo')) . '</p>' . NL);
} else {
$form->addElement('<p>' . $this->getLang('cainfo') . " <a href='" . $this->getConf('ca') . "'>" . $this->getConf('ca') . "</a></p>" . NL);
}
}
$form->addElement(form_makeButton('submit', '', $this->getLang('submit'), array('accesskey' => 'h', 'title' => $this->getLang('submittitle'), id => 'focus__this')));
$form->printForm();
$form = new Doku_Form(array('id' => 'forcessllogin2', 'method' => 'get'));
$form->addElement(form_makeButton('submit', '', $this->getLang('cancel'), array('accesskey' => 'c', 'title' => $this->getLang('canceltitle'))));
$form->printForm();
}
示例5: html
public function html()
{
global $ID;
echo $this->locale_xhtml('tree');
echo '<noscript><div class="error">' . $this->getLang('noscript') . '</div></noscript>';
echo '<div id="plugin_move__tree">';
echo '<div class="tree_root tree_pages">';
echo '<h3>' . $this->getLang('move_pages') . '</h3>';
$this->htmlTree(self::TYPE_PAGES);
echo '</div>';
echo '<div class="tree_root tree_media">';
echo '<h3>' . $this->getLang('move_media') . '</h3>';
$this->htmlTree(self::TYPE_MEDIA);
echo '</div>';
/** @var helper_plugin_move_plan $plan */
$plan = plugin_load('helper', 'move_plan');
echo '<div class="controls">';
if ($plan->isCommited()) {
echo '<div class="error">' . $this->getLang('moveinprogress') . '</div>';
} else {
$form = new Doku_Form(array('action' => wl($ID), 'id' => 'plugin_move__tree_execute'));
$form->addHidden('id', $ID);
$form->addHidden('page', 'move_main');
$form->addHidden('json', '');
$form->addElement(form_makeCheckboxField('autoskip', '1', $this->getLang('autoskip'), '', '', $this->getConf('autoskip') ? array('checked' => 'checked') : array()));
$form->addElement('<br />');
$form->addElement(form_makeCheckboxField('autorewrite', '1', $this->getLang('autorewrite'), '', '', $this->getConf('autorewrite') ? array('checked' => 'checked') : array()));
$form->addElement('<br />');
$form->addElement('<br />');
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('btn_start')));
$form->printForm();
}
echo '</div>';
echo '</div>';
}
示例6: html
function html()
{
echo $this->locale_xhtml('intro_clean');
$form = new Doku_Form(array('method' => 'post'));
$form->addHidden('page', 'data_clean');
$form->addHidden('data_go', 'go');
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('submit_clean')));
$form->printForm();
}
示例7: render
/**
* Create output
*/
function render($mode, Doku_Renderer $renderer, $data)
{
if (!$data || $mode != 'xhtml') {
return;
}
$id = $data['id'];
$from = $data['from'];
$to = $data['to'];
$form = new Doku_Form(array('id' => "slice_{$from_to}", "class" => "wiki_slice_form"));
$form->addHidden('from', $from);
$form->addHidden('to', $to);
$form->addHidden('id', $id);
$form->addElement(form_makeButton('submit', '', "Slice {$from}--{$to}"));
$renderer->doc .= $form->getForm();
}
示例8: array
/**
* form for slack invite
*
*
*/
function slackinvite_signinform()
{
global $ID;
$html = '';
$params = array();
$params['id'] = 'slackinvite_plugin_id';
$params['action'] = wl($ID);
$params['method'] = 'post';
$params['enctype'] = 'multipart/form-data';
$params['class'] = 'slackinvite_plugin';
// Modification of the default dw HTML upload form
$form = new Doku_Form($params);
$form->startFieldset($this->getLang('signup'));
$form->addHidden('source', hsc("slackinvite"));
//add source of call, used in action to ignore anything not from this form
$form->addElement(form_makeTextField('first_name', '', $this->getLang('first_name'), 'first__name'));
$form->addElement(form_makeTextField('last_name', '', $this->getLang('last_name'), 'last__name'));
$form->addElement(form_makeTextField('email', '', $this->getLang('email'), 'email'));
$form->addElement(form_makeButton('submit', 'slacksignup', $this->getLang('btn_signup')));
$form->endFieldset();
$html .= '<div class="dokuwiki"><p>' . NL;
//$html .= '<h3>TEAM43 Slack Sign Up</h3>';
$html .= $form->getForm();
$html .= '</p></div>' . NL;
return $html;
}
示例9: action_button
function action_button($button_name, $action = '', $hidden = NULL)
{
global $ID;
$form = new Doku_Form('Form_' . $button_name);
if (!$action) {
$action = $button_name;
}
$form->addHidden('do', $action);
if (is_array($hidden)) {
foreach ($hidden as $key => $value) {
$form->addHidden($key, $value);
}
}
$form->addElement(form_makeButton('submit', '', $button_name));
return $form->getForm();
}
示例10: showTemplateSwitcher
/**
* Builds a select box with all available templates
* (unless excluded in 'excludeTemplates')
* or show only two templates for mobile switcher: standard plus mobile template
*
* @author Anika Henke <anika@selfthinker.org>
*/
public function showTemplateSwitcher()
{
global $conf;
global $ID;
global $ACT;
if ($ACT != 'show') {
return;
}
$mobileSwitch = $this->getConf('mobileSwitch');
$mobileTpl = $this->getConf('mobileTemplate');
if ($mobileSwitch && $mobileTpl) {
// templates for mobile switcher
$templates = array($mobileTpl => $this->getLang('switchMobile'), $this->origTpl => $this->getLang('switchFull'));
} else {
// all templates (minus excluded templates)
$excludeTemplates = array_map('trim', explode(",", $this->getConf('excludeTemplates')));
$templates = array_diff($this->getTemplates(), $excludeTemplates);
}
$form = new Doku_Form(array('id' => 'tpl__switcher', 'title' => $this->getLang('switchTpl'), 'action' => wl($ID)));
$form->addHidden('act', 'select');
$form->addElement(form_makeListboxField('tpl', $templates, $conf['template'], $this->getLang('template'), '', '', array('class' => 'quickselect')));
$form->addElement(form_makeButton('submit', '', $this->getLang('switch'), array('name' => 'switch')));
$out = '<div class="plugin_loadskin">';
$out .= $form->getForm();
$out .= '</div>';
return $out;
}
示例11: array
function test_close_fieldset()
{
$form = new Doku_Form(array('id' => 'dw__testform', 'action' => '/test'));
$form->startFieldset('Test');
$form->addHidden('summary', 'changes &c');
$form->addElement(form_makeTextField('t', 'v', 'Text', 'text__id', 'block'));
$form->addElement(form_makeCheckboxField('r', '1', 'Check', 'check__id', 'simple'));
$form->addElement(form_makeButton('submit', 'save', 'Save', array('accesskey' => 's')));
$form->addElement(form_makeButton('submit', 'cancel', 'Cancel'));
ob_start();
$form->printForm();
$output = ob_get_contents();
ob_end_clean();
$this->assertEquals($this->_ignoreTagWS($output), $this->_ignoreTagWS($this->_realoutput()));
}
示例12: xhtml_action
function xhtml_action($action, $title, $hidden_fields = array(), $fields = array())
{
$hidden_fields['do'] = $action;
$name = preg_replace('/[^0-9A-Za-z_]+/', '_', $title);
$formID = "PROJECTS_{$name_form}";
$form = new Doku_Form(array('id' => $formID));
foreach ($hidden_fields as $name => $value) {
$form->addHidden($name, $value);
}
foreach ($fields as $field) {
$form->addElement($field);
}
$form->addElement("<a href=\"\" class=\"action_link\">{$title}</a>");
return '<span class="action">' . $form->getForm() . '</span>';
}
示例13: html
/**
* Output HTML form
*/
function html()
{
global $INPUT;
global $conf;
echo $this->locale_xhtml('intro');
if (!$conf['mailfrom']) {
msg($this->getLang('nofrom'), -1);
}
$form = new Doku_Form(array());
$form->startFieldset('Testmail');
$form->addHidden('send', 1);
$form->addElement(form_makeField('text', 'to', $INPUT->str('to'), 'To:', '', 'block'));
$form->addElement(form_makeField('text', 'cc', $INPUT->str('cc'), 'Cc:', '', 'block'));
$form->addElement(form_makeField('text', 'bcc', $INPUT->str('bcc'), 'Bcc:', '', 'block'));
$form->addElement(form_makeButton('submit', '', 'Send Email'));
$form->printForm();
}
示例14: html
function html()
{
$sqlite = $this->dthlp->_getDB();
if (!$sqlite) {
return false;
}
echo $this->locale_xhtml('admin_intro');
$sql = "SELECT * FROM aliases ORDER BY name";
$res = $sqlite->query($sql);
$rows = $sqlite->res2arr($res);
$form = new Doku_Form(array('method' => 'post'));
$form->addHidden('page', 'data_aliases');
$form->addElement('<table class="inline">' . '<tr>' . '<th>' . $this->getLang('name') . '</th>' . '<th>' . $this->getLang('type') . '</th>' . '<th>' . $this->getLang('prefix') . '</th>' . '<th>' . $this->getLang('postfix') . '</th>' . '<th>' . $this->getLang('enum') . '</th>' . '</tr>');
// add empty row for adding a new entry
$rows[] = array('name' => '', 'type' => '', 'prefix' => '', 'postfix' => '', 'enum' => '');
$cur = 0;
foreach ($rows as $row) {
$form->addElement('<tr>');
$form->addElement('<td>');
$form->addElement(form_makeTextField('d[' . $cur . '][name]', $row['name'], ''));
$form->addElement('</td>');
$form->addElement('<td>');
$form->addElement(form_makeMenuField('d[' . $cur . '][type]', array('', 'page', 'title', 'mail', 'url', 'dt', 'wiki'), $row['type'], ''));
$form->addElement('</td>');
$form->addElement('<td>');
$form->addElement(form_makeTextField('d[' . $cur . '][prefix]', $row['prefix'], ''));
$form->addElement('</td>');
$form->addElement('<td>');
$form->addElement(form_makeTextField('d[' . $cur . '][postfix]', $row['postfix'], ''));
$form->addElement('</td>');
$form->addElement('<td>');
$form->addElement(form_makeTextField('d[' . $cur . '][enum]', $row['enum'], ''));
$form->addElement('</td>');
$form->addElement('</tr>');
$cur++;
}
$form->addElement('</table>');
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('submit')));
$form->printForm();
}
示例15: printForm
/**
* show the move and/or rename a page form
*
* @author Michael Hamann <michael@content-space.de>
* @author Gary Owen <gary@isection.co.uk>
*/
function printForm() {
global $ID;
$ns = getNS($ID);
$ns_select_data = $this->build_namespace_select_content($ns);
$form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'move__form'));
$form->addHidden('page', $this->getPluginName());
$form->addHidden('id', $ID);
$form->addHidden('move_type', 'page');
$form->startFieldset($this->getLang('movepage'));
$form->addElement(form_makeMenuField('ns_for_page', $ns_select_data, $this->opts['ns_for_page'], $this->getLang('targetns'), '', 'block'));
$form->addElement(form_makeTextField('newns', $this->opts['newns'], $this->getLang('newtargetns'), '', 'block'));
$form->addElement(form_makeTextField('newname', $this->opts['newname'], $this->getLang('newname'), '', 'block'));
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('submit')));
$form->endFieldset();
$form->printForm();
if ($this->ns_opts !== false) {
ptln('<fieldset>');
ptln('<legend>');
ptln($this->getLang('movens'));
ptln('</legend>');
ptln('<p>');
ptln(sprintf($this->getLang('ns_move_in_progress'), $this->ns_opts['num_pages'], $this->ns_opts['num_media'], ':'.hsc($this->ns_opts['ns']), ':'.hsc($this->ns_opts['newns'])));
ptln('</p>');
ptln($this->helper->getNSMoveButton('continue'));
ptln($this->helper->getNSMoveButton('abort'));
ptln('</fieldset>');
} else {
$form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'move__form'));
$form->addHidden('page', $this->getPluginName());
$form->addHidden('id', $ID);
$form->addHidden('move_type', 'namespace');
$form->startFieldset($this->getLang('movens'));
$form->addElement(form_makeMenuField('targetns', $ns_select_data, $this->opts['targetns'], $this->getLang('targetns'), '', 'block'));
$form->addElement(form_makeTextField('newnsname', $this->opts['newnsname'], $this->getLang('newnsname'), '', 'block'));
$form->addElement(form_makeMenuField('contenttomove', array('pages' => $this->getLang('move_pages'), 'media' => $this->getLang('move_media'), 'both' => $this->getLang('move_media_and_pages')), $this->opts['contenttomove'], $this->getLang('content_to_move'), '', 'block'));
$form->addElement(form_makeButton('submit', 'admin', $this->getLang('submit')));
$form->endFieldset();
$form->printForm();
}
}