• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP form_makeButton函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了form_makeButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 <[email protected]>
  */
 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 <[email protected]>
 * @author Andreas Gohr <[email protected]>
 */
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


示例16: html

 /**
  * output appropriate html
  */
 public function html()
 {
     global $lang;
     $helper = $this->loadHelper('loadskin', true);
     print '<div id="plugin__loadskin">';
     print $this->locale_xhtml('intro');
     $form = new Doku_Form(array());
     $form->startFieldSet('Add rule');
     $form->addHidden('id', $ID);
     $form->addHidden('do', 'admin');
     $form->addHidden('page', 'loadskin');
     $form->addHidden('act', 'add');
     $form->addElement(form_makeOpenTag('p'));
     $form->addElement(form_makeTextField('pattern', '', $this->getLang('pattern')));
     $form->addElement(form_makeCloseTag('p'));
     $form->addElement(form_makeOpenTag('p'));
     $form->addElement(form_makeListboxField('tpl', $helper->getTemplates(), '', $this->getLang('template')));
     $form->addElement(form_makeCloseTag('p'));
     $form->addElement(form_makeButton('submit', '', $lang['btn_save']));
     $form->endFieldSet();
     $form->printForm();
     if (@file_exists($this->config)) {
         $data = unserialize(io_readFile($this->config, false));
         if (!empty($data)) {
             echo '<table class="inline">' . DOKU_LF;
             echo '  <tr>' . DOKU_LF;
             echo '    <th>' . $this->getLang('pattern') . '</th>' . DOKU_LF;
             echo '    <th>' . $this->getLang('template') . '</th>' . DOKU_LF;
             echo '    <th>' . $this->getLang('action') . '</th>' . DOKU_LF;
             echo '  </tr>' . DOKU_LF;
             foreach ($data as $key => $value) {
                 echo '  <tr>' . DOKU_LF;
                 echo '    <td>' . $key . '</td>' . DOKU_LF;
                 echo '    <td>' . $value . '</td>' . DOKU_LF;
                 echo '    <td>' . DOKU_LF;
                 $form = new Doku_Form(array());
                 $form->addHidden('do', 'admin');
                 $form->addHidden('page', 'loadskin');
                 $form->addHidden('act', 'del');
                 $form->addHidden('id', $ID);
                 $form->addHidden('pattern', $key);
                 $form->addElement(form_makeButton('submit', '', $lang['btn_delete']));
                 $form->printForm();
                 echo '    </td>' . DOKU_LF;
                 echo '  </tr>' . DOKU_LF;
             }
             echo '</table>' . DOKU_LF;
         }
     }
     print '</div>';
 }
开发者ID:iiet,项目名称:dokuwiki-plugin-loadskin,代码行数:54,代码来源:admin.php


示例17: __construct

 public function __construct($parent, $file, $read_only)
 {
     parent::__construct($parent, 'Recipe');
     $editor = Projects_Editor_Manager::manager()->editor('', $file->code(), $file->highlight());
     $editor->read_only = $read_only;
     $maker = $this->newElement('div', array(), 'Maker: ');
     $this->root->appendChild($maker);
     if (auth_quickaclcheck($file->id()) >= DOKU_EDIT) {
         $makers = Projects_Maker_Manager::manager()->maker($file);
         if (count($makers) > 1) {
             $select = $this->newElement('select', array('id' => 'PROJECTS_maker', 'name' => 'maker'));
             $maker->appendChild($select);
             foreach ($makers as $m) {
                 $prop = array('value' => $m->name());
                 if ($m->name() == $file->maker()) {
                     $prop['selected'] = 1;
                 }
                 $opt = $this->newElement('option', $prop, $m->name());
                 $select->appendChild($opt);
             }
             $controls = $this->newElement('span', array('id' => 'maker_controls', 'maker' => $file->maker()));
             $maker->appendChild($controls);
             $form = new Doku_Form(array('id' => 'maker_select_form'));
             $form->addElement(form_makeButton('submit', 'set_maker', 'update', array('id' => 'set_maker')));
             $controls->appendChild($this->loadElement($form->getForm()));
             $controls->appendChild($this->loadElement(cancel_button()));
         } else {
             $m = $makers ? $makers[0]->name() : 'none';
             $maker->appendChild($this->newText($m));
         }
     } else {
         $maker->appendChild($this->newText('Maker: ' . $file->maker()));
     }
     $content = $editor->xhtml('recipe', 'savecontent');
     $this->root->appendChild($this->loadElement("<div>{$content}</div>"));
 }
开发者ID:roverrobot,项目名称:projects,代码行数:36,代码来源:xhtmltab.php


示例18: printForm

    /**
     * show the move and/or rename a page form
     *
     * @author  Michael Hamann <[email protected]>
     * @author  Gary Owen <[email protected]>
     */
    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();
        }
    }
开发者ID:neutrinog,项目名称:Door43,代码行数:50,代码来源:admin.php


示例19: html

 /**
  * output appropriate html
  */
 function html()
 {
     global $ID;
     ptln('<h1>' . $this->getLang('menu') . '</h1>');
     $form = new Doku_Form(array('id' => 'vg', 'action' => wl($ID)));
     $form->addHidden('cmd', $this->edit ? 'edit' : 'add');
     $form->addHidden('sectok', getSecurityToken());
     $form->addHidden('page', $this->getPluginName());
     $form->addHidden('do', 'admin');
     $form->startFieldset($this->getLang($this->edit ? 'edituser' : 'adduser'));
     if ($this->edit) {
         $form->addElement(form_makeField('text', 'user', $this->data['user'], $this->getLang('user'), '', '', array('disabled' => 'disabled')));
         $form->addHidden('uid', $this->data['user']);
         $form->addElement('<br />');
     } else {
         $form->addElement(form_makeField('text', 'uid', '', $this->getLang('user')));
         $form->addElement('<br />');
     }
     $form->addElement(form_makeField('text', 'grp', $this->edit ? implode(', ', $this->data['grp']) : '', $this->getLang('grp')));
     $form->addElement('<br />');
     $form->addElement(form_makeButton('submit', '', $this->getLang($this->edit ? 'change' : 'add')));
     $form->endFieldset();
     $form->printForm();
     ptln('<table class="inline" id="vg__show">');
     ptln('  <tr>');
     ptln('    <th class="user">' . hsc($this->getLang('users')) . '</th>');
     ptln('    <th class="grp">' . hsc($this->getLang('grps')) . '</th>');
     ptln('    <th> </th>');
     ptln('  </tr>');
     foreach ($this->users as $user => $grps) {
         //$userdata=$this->_auth->getUserData($user);
         ptln('  <tr>');
         ptln('    <td>' . hsc($user) . (isset($userdata['name']) ? hsc(' (' . $userdata['name'] . ')') : '') . '</td>');
         ptln('    <td>' . hsc(implode(', ', $grps)) . '</td>');
         ptln('    <td class="act">');
         ptln('      <a class="vg_edit" href="' . wl($ID, array('do' => 'admin', 'page' => $this->getPluginName(), 'cmd' => 'edit', 'uid' => $user, 'sectok' => getSecurityToken())) . '">' . hsc($this->getLang('edit')) . '</a>');
         ptln(' &bull; ');
         ptln('      <a class="vg_del" href="' . wl($ID, array('do' => 'admin', 'page' => $this->getPluginName(), 'cmd' => 'del', 'uid' => $user, 'sectok' => getSecurityToken())) . '">' . hsc($this->getLang('del')) . '</a>');
         ptln('    </td>');
         ptln('  </tr>');
     }
     ptln('</table>');
     $form = new Doku_Form(array('id' => 'vg', 'action' => wl($ID)));
     $form->addHidden('cmd', $this->editgroup ? 'editgroup' : 'addgroup');
     $form->addHidden('sectok', getSecurityToken());
     $form->addHidden('page', $this->getPluginName());
     $form->addHidden('do', 'admin');
     if ($this->editgroup) {
         $form->startFieldset($this->getLang('editgroup'));
         $form->addElement(form_makeField('text', 'group', $this->data['group'], $this->getLang('grp'), '', '', array('disabled' => 'disabled')));
         $form->addElement('<br />');
         $form->addHidden('uid', $this->data['group']);
         $form->addElement(form_makeField('text', 'users', implode(', ', $this->data['users']), $this->getLang('users')));
         $form->addElement('<br />');
     } else {
         $form->startFieldset($this->getLang('addgroup'));
         $form->addElement(form_makeField('text', 'uid', '', $this->getLang('grp')));
         $form->addElement('<br />');
         $form->addElement(form_makeField('text', 'users', '', $this->getLang('users')));
         $form->addElement('<br />');
     }
     $form->addElement(form_makeButton('submit', '', $this->getLang($this->editgroup ? 'change' : 'add')));
     $form->endFieldset();
     $form->printForm();
     ptln('<table class="inline" id="vg__show">');
     ptln('  <tr>');
     ptln('    <th class="grp">' . hsc($this->getLang('grps')) . '</th>');
     ptln('    <th class="user">' . hsc($this->getLang('users')) . '</th>');
     ptln('    <th class="act"> </th>');
     ptln('  </tr>');
     foreach ($this->groups as $group => $users) {
         ptln('  <tr>');
         ptln('    <td>' . hsc($group) . '</td>');
         ptln('    <td>' . hsc(implode(', ', $users)) . '</td>');
         ptln('    <td class="act">');
         ptln('      <a class="vg_edit" href="' . wl($ID, array('do' => 'admin', 'page' => $this->getPluginName(), 'cmd' => 'editgroup', 'uid' => $group, 'sectok' => getSecurityToken())) . '">' . hsc($this->getLang('edit')) . '</a>');
         ptln(' &bull; ');
         ptln('      <a class="vg_del" href="' . wl($ID, array('do' => 'admin', 'page' => $this->getPluginName(), 'cmd' => 'delgroup', 'uid' => $group, 'sectok' => getSecurityToken())) . '">' . hsc($this->getLang('del')) . '</a>');
         ptln('    </td>');
         ptln('  </tr>');
     }
     ptln('</table>');
     $form = new Doku_Form(array('id' => 'vg', 'action' => wl($ID)));
     $form->addHidden('cmd', 'search');
     $form->addHidden('sectok', getSecurityToken());
     $form->addHidden('page', $this->getPluginName());
     $form->addHidden('do', 'admin');
     $form->startFieldset($this->getLang('searchuser'));
     $form->addElement(form_makeField('text', 'uid', '', $this->getLang('searchname')));
     $form->addElement(form_makeButton('submit', '', $this->getLang('search')));
     $form->printForm();
     if (!empty($this->_auth_userlist)) {
         ptln('<table class="inline" id="vg__show">');
         ptln('  <tr>');
         ptln('    <th class="user">' . hsc($this->getLang('users')) . '</th>');
         ptln('    <th class="act"> </th>');
         ptln('  </tr>');
//.........这里部分代码省略.........
开发者ID:rztuc,项目名称:virtualgroup,代码行数:101,代码来源:admin.php


示例20: test_close_fieldset

 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()));
 }
开发者ID:kbuildsyourdotcom,项目名称:Door43,代码行数:15,代码来源:form_form.test.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP form_makeCheckboxField函数代码示例发布时间:2022-05-15
下一篇:
PHP form_list函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap