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


PHP form_makeButton函数代码示例

本文整理汇总了PHP中form_makeButton函数的典型用法代码示例。如果您正苦于以下问题:PHP form_makeButton函数的具体用法?PHP form_makeButton怎么用?PHP form_makeButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: 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);
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:31,代码来源:admin.php

示例2: _render

 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();
 }
开发者ID:jomat,项目名称:dokuwiki-plugin-forcessllogin,代码行数:26,代码来源:action.php

示例3: 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;
 }
开发者ID:iiet,项目名称:dokuwiki-plugin-loadskin,代码行数:34,代码来源:helper.php

示例4: 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;
 }
开发者ID:kbuildsyourdotcom,项目名称:Door43,代码行数:25,代码来源:RegisterOverride.php

示例5: _edit_form

 function _edit_form(&$event, $param)
 {
     $preview = $event->data->findElementById('edbtn__preview');
     if ($preview) {
         $event->data->insertElement($preview + 1, form_makeButton('submit', 'changes', $this->getLang('changes'), array('id' => 'edbtn__changes')));
     }
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:7,代码来源:action.php

示例6: 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>';
 }
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:35,代码来源:tree.php

示例7: 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();
 }
开发者ID:stretchyboy,项目名称:dokuwiki-plugin-data,代码行数:9,代码来源:clean.php

示例8: xhtml

 public function xhtml($editor_id, $do)
 {
     $controls = '<div>';
     if (!$this->read_only) {
         $form = new Doku_Form(array('class' => 'editor_edit_form', 'editor' => $editor_id));
         $form->addElement(form_makeButton('submit', '', 'edit'));
         $controls .= $form->getForm();
         $controls .= '<div class="editor_save_controls">';
         $form = new Doku_Form(array('class' => 'editor_save_form', 'editor' => $editor_id));
         $form->addElement(form_makeButton('submit', 'savecontent', 'save'));
         $controls .= $form->getForm() . cancel_button() . '</div>';
     }
     return $controls . $this->editor_xhtml($editor_id, $do) . '</div>';
 }
开发者ID:roverrobot,项目名称:projects,代码行数:14,代码来源:editor.php

示例9: render

 function render($params, $form)
 {
     if (!syntax_plugin_bureaucracy_field_submit::$captcha_displayed) {
         syntax_plugin_bureaucracy_field_submit::$captcha_displayed = true;
         $helper = null;
         if (@is_dir(DOKU_PLUGIN . 'captcha')) {
             $helper = plugin_load('helper', 'captcha');
         }
         if (!is_null($helper) && $helper->isEnabled()) {
             $form->addElement($helper->getHTML());
         }
     }
     $this->tpl = form_makeButton('submit', '', '@@LABEL|' . $this->getLang('submit') . '@@');
     parent::render($params, $form);
 }
开发者ID:nefercheprure,项目名称:dokuwiki-plugin-bureaucracy,代码行数:15,代码来源:submit.php

示例10: 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();
 }
开发者ID:roverrobot,项目名称:components,代码行数:18,代码来源:slice.php

示例11: 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();
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:16,代码来源:tools.php

示例12: 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();
 }
开发者ID:marktsai0316,项目名称:dokuwiki-plugin-smtp,代码行数:20,代码来源:admin.php

示例13: renderfield

 /**
  * Render the field as XHTML
  *
  * @params array     $params Additional HTML specific parameters
  * @params Doku_Form $form   The target Doku_Form object
  * @params int       $formid unique identifier of the form which contains this field
  */
 public function renderfield($params, Doku_Form $form, $formid)
 {
     if (!isset(helper_plugin_bureaucracy_fieldsubmit::$captcha_displayed[$formid])) {
         helper_plugin_bureaucracy_fieldsubmit::$captcha_displayed[$formid] = true;
         /** @var helper_plugin_captcha $helper */
         $helper = null;
         if (@is_dir(DOKU_PLUGIN . 'captcha')) {
             $helper = plugin_load('helper', 'captcha');
         }
         if (!is_null($helper) && $helper->isEnabled()) {
             $form->addElement($helper->getHTML());
         }
     }
     $attr = array();
     if (isset($this->opt['id'])) {
         $attr['id'] = $this->opt['id'];
     }
     $this->tpl = form_makeButton('submit', '', '@@DISPLAY|' . $this->getLang('submit') . '@@', $attr);
     parent::renderfield($params, $form, $formid);
 }
开发者ID:rusidea,项目名称:analitika,代码行数:27,代码来源:fieldsubmit.php

示例14: getBackupForm

 protected function getBackupForm()
 {
     $form = new \Doku_Form(['id' => 'mybackup_form']);
     $form->startFieldset('Folders to Backup');
     foreach (Backup::allowedDirectories() as $dir => $desc) {
         $form->addElement(form_makeCheckboxField('dirs[]', $dir, "<b>{$dir}</b> {$desc}", null, null, ['checked' => 'checked']));
     }
     $form->endFieldset();
     $form->startFieldset('Options');
     $form->addElement('<b>Logging Output</b>');
     $form->addElement(form_makeCheckboxField('verbose', 1, 'verbose (it can be very long)'));
     $form->addElement('<br /><b>Archive Format</b>');
     foreach (Backup::supportedFormats() as $ext => $enabled) {
         $disabled = $enabled ? [] : ['disabled' => 'disabled'];
         $selected = $ext != 'zip' ? [] : ['checked' => 'checked'];
         $form->addElement(form_makeRadioField('archive_format', $ext, strtoupper($ext), 'archive_format', '', array_merge([], $selected, $disabled)));
     }
     $form->endFieldset();
     $form->addElement('<br />');
     //$form->addElement(form_makeButton('button', null, 'check size'));
     $form->addElement(form_makeButton('submit', null, 'backup now'));
     return $form;
 }
开发者ID:yurii-github,项目名称:dokuwiki-plugin-yktools,代码行数:23,代码来源:main.php

示例15: html_resendpwd

/**
 * Form to request a new password for an existing account
 *
 * @author Benoit Chesneau <benoit@bchesneau.info>
 * @author Andreas Gohr <gohr@cosmocode.de>
 */
function html_resendpwd()
{
    global $lang;
    global $conf;
    global $INPUT;
    $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth'));
    if (!$conf['autopasswd'] && $token) {
        print p_locale_xhtml('resetpwd');
        print '<div class="centeralign">' . NL;
        $form = new Doku_Form(array('id' => 'dw__resendpwd'));
        $form->startFieldset($lang['btn_resendpwd']);
        $form->addHidden('token', $token);
        $form->addHidden('do', 'resendpwd');
        $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size' => '50')));
        $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size' => '50')));
        $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
        $form->endFieldset();
        html_form('resendpwd', $form);
        print '</div>' . NL;
    } else {
        print p_locale_xhtml('resendpwd');
        print '<div class="centeralign">' . NL;
        $form = new Doku_Form(array('id' => 'dw__resendpwd'));
        $form->startFieldset($lang['resendpwd']);
        $form->addHidden('do', 'resendpwd');
        $form->addHidden('save', '1');
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block'));
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
        $form->endFieldset();
        html_form('resendpwd', $form);
        print '</div>' . NL;
    }
}
开发者ID:evacomaroski,项目名称:dokuwiki,代码行数:42,代码来源:html.php


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