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

PHP form_makeTextField函数代码示例

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

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



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

示例1: prepareColumns

 /**
  * Prepare
  *
  * @param array $args data plugin related field arguments
  */
 private function prepareColumns($args)
 {
     /** @var helper_plugin_data $dthlp */
     $dthlp = plugin_load('helper', 'data');
     if (!$dthlp) {
         msg('Loading the data helper failed. Make sure the data plugin is installed.', -1);
     }
     foreach ($args as $arg) {
         $arg = $this->replaceTranslation($arg);
         $datatype = $dthlp->_column($arg);
         if (is_array($datatype['type'])) {
             $datatype['basetype'] = $datatype['type']['type'];
             $datatype['enum'] = $datatype['type']['enum'];
             $datatype['type'] = $datatype['origtype'];
         } else {
             $datatype['basetype'] = $datatype['type'];
         }
     }
     $datatype['title'] = '@@DISPLAY@@';
     if (isset($datatype['enum'])) {
         $values = preg_split('/\\s*,\\s*/', $datatype['enum']);
         if (!$datatype['multi'] && $this->opt['optional']) {
             array_unshift($values, '');
         }
         $this->opt['args'] = $values;
         $this->additional = $datatype['multi'] ? array('multiple' => 'multiple') : array();
     } else {
         $classes = 'data_type_' . $datatype['type'] . ($datatype['multi'] ? 's' : '') . ' ' . 'data_type_' . $datatype['basetype'] . ($datatype['multi'] ? 's' : '');
         $content = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@ ' . $classes);
         $this->tpl = $content;
     }
     if (!isset($this->opt['display'])) {
         $this->opt['display'] = $this->opt['label'];
     }
 }
开发者ID:RnBConsulting,项目名称:dokuwiki-plugin-data,代码行数:40,代码来源:aliastextbox.php


示例2: slackinvite_signinform

 /**
  * 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;
 }
开发者ID:Jocai,项目名称:Door43,代码行数:31,代码来源:syntax.php


示例3: renderProfileForm

 /**
  * This user will need to interact with the QR code in order to configure GA.
  */
 public function renderProfileForm()
 {
     global $conf, $USERINFO;
     $elements = array();
     $ga = new PHPGangsta_GoogleAuthenticator();
     if ($this->_settingExists("secret")) {
         // The user has a revokable GA secret.
         // Show the QR code so the user can add other devices.
         $mysecret = $this->_settingGet("secret");
         $data = $this->generateQRCodeData($USERINFO['name'] . '@' . $conf['title'], $mysecret);
         $elements[] = '<figure><figcaption>' . $this->getLang('directions') . '</figcaption>';
         $elements[] = '<img src="' . $data . '" alt="' . $this->getLang('directions') . '" />';
         $elements[] = '</figure>';
         // Check to see if the user needs to verify the code.
         if (!$this->_settingExists("verified")) {
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('googleauth_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         }
         // Show the option to revoke the GA secret.
         $elements[] = form_makeCheckboxField('googleauth_disable', '1', $this->getLang('killmodule'), '', 'block');
     } else {
         // The user may opt in using GA.
         //Provide a checkbox to create a personal secret.
         $elements[] = form_makeCheckboxField('googleauth_enable', '1', $this->getLang('enablemodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorgoogleauth,代码行数:30,代码来源: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: __construct

 /**
  * Arguments:
  *  - cmd
  *  - label
  *  - =default (optional)
  *
  * @param array $args The tokenized definition, only split at spaces
  */
 function __construct($args)
 {
     parent::__construct($args);
     $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@DISPLAY@@', '', '@@CLASS@@');
     if (isset($this->opt['class'])) {
         $this->tpl['class'] .= ' ' . $this->opt['class'];
     }
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:16,代码来源:textbox.php


示例6: initialize

 /**
  * Arguments:
  *  - cmd
  *  - label
  *  - ^ (optional)
  *
  * @param array $args The tokenized definition, only split at spaces
  */
 public function initialize($args)
 {
     parent::initialize($args);
     $attr = array('class' => 'timefield edit', 'maxlength' => '8');
     if (!isset($this->opt['optional'])) {
         $attr['required'] = 'required';
         $attr['class'] .= ' required';
     }
     $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@', $attr);
 }
开发者ID:rusidea,项目名称:analitika,代码行数:18,代码来源:fieldtime.php


示例7: handle_registerform_output

 /**
  * custom event handler
  *
  * @param Doku_Event $event  event object by reference
  * @param mixed      $param  the parameters passed to register_hook when this
  *                           handler was registered
  *
  * @return   not required
  */
 public function handle_registerform_output(Doku_Event &$event, $param)
 {
     $pos = $event->data->findElementByAttribute('type', 'submit');
     if (!$pos) {
         return;
     }
     $spam = isset($_POST['spam']) ? $_POST['spam'] : '';
     $out = form_makeTextField('spam', $spam, 'To which email address do you have to send an email now?', '', 'block', array('size' => '50'));
     $event->data->insertElement($pos, $out);
 }
开发者ID:phpsource,项目名称:web-wiki,代码行数:19,代码来源:action.php


示例8: 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


示例9: initialize

 /**
  * Arguments:
  *  - cmd
  *  - label
  *  - =default (optional)
  *  - ^ (optional)
  *
  * @param array $args The tokenized definition, only split at spaces
  */
 function initialize($args)
 {
     parent::initialize($args);
     $attr = array();
     if (!isset($this->opt['optional'])) {
         $attr['required'] = 'required';
     }
     $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@', $attr);
     if (isset($this->opt['class'])) {
         $this->tpl['class'] .= ' ' . $this->opt['class'];
     }
     if (!isset($this->opt['optional'])) {
         $this->tpl['class'] .= ' required';
     }
 }
开发者ID:rusidea,项目名称:analitika,代码行数:24,代码来源:fieldtextbox.php


示例10: 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


示例11: renderProfileForm

 /**
  * This user will need to verify their email.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // If email has not been verified, then do so here.
     if (!$this->attribute->exists("twofactoremail", "verified")) {
         // Render the HTML to prompt for the verification/activation OTP.
         $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
         $elements[] = form_makeTextField('email_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         $elements[] = form_makeCheckboxField('email_send', '1', $this->getLang('resendcode'), '', 'block');
     } else {
         // Render the element to remove email.
         $elements[] = form_makeCheckboxField('email_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactoremail,代码行数:18,代码来源:helper.php


示例12: renderProfileForm

 /**
  * This user will need to supply a phone number and their cell provider.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Provide an input for the phone number.
     $phone = $this->_settingGet("phone", '');
     $elements[] = form_makeTextField('smsappliance_phone', $phone, $this->getLang('phone'), '', 'block', array('size' => '50'));
     // If the phone number has not been verified, then do so here.
     if ($phone) {
         if (!$this->_settingExists("verified")) {
             // Render the HTML to prompt for the verification/activation OTP.
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('smsappliance_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
             $elements[] = form_makeCheckboxField('smsappliance_send', '1', $this->getLang('resendcode'), '', 'block');
         }
         // Render the element to remove the phone since it exists.
         $elements[] = form_makeCheckboxField('smsappliance_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorsmsappliance,代码行数:22,代码来源:helper.php


示例13: renderProfileForm

 /**
  * This user will need to verify their email.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Prompt for an email address.
     $email = $this->_settingGet("email");
     $elements[] = form_makeTextField('altemail_email', $email, $this->getLang('email'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
     // If email has not been verified, then do so here.
     if (!$this->_settingExists("verified") && $email) {
         // Render the HTML to prompt for the verification/activation OTP.
         $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
         $elements[] = form_makeTextField('altemail_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
         $elements[] = form_makeCheckboxField('altemail_send', '1', $this->getLang('resendcode'), '', 'block');
     }
     if ($this->_settingExists("email")) {
         // Render the element to remove email.
         $elements[] = form_makeCheckboxField('altemail_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactoraltemail,代码行数:22,代码来源:helper.php


示例14: renderProfileForm

 /**
  * This user will need to supply a phone number and their cell provider.
  */
 public function renderProfileForm()
 {
     $elements = array();
     // Provide an input for the phone number.
     $phone = $this->attribute->exists("twofactor", "phone") ? $this->attribute->get("twofactor", "phone") : '';
     $elements['phone'] = form_makeTextField('phone', $phone, $this->_getSharedLang('phone'), '', 'block', array('size' => '50'));
     $providers = array_keys($this->_getProviders());
     $provider = $this->attribute->exists("twofactorsmsgateway", "provider") ? $this->attribute->get("twofactorsmsgateway", "provider") : $providers[0];
     $elements[] = form_makeListboxField('smsgateway_provider', $providers, $provider, $this->getLang('provider'), '', 'block');
     // If the phone number has not been verified, then do so here.
     if ($phone) {
         if (!$this->attribute->exists("twofactorsmsgateway", "verified")) {
             // Render the HTML to prompt for the verification/activation OTP.
             $elements[] = '<span>' . $this->getLang('verifynotice') . '</span>';
             $elements[] = form_makeTextField('smsgateway_verify', '', $this->getLang('verifymodule'), '', 'block', array('size' => '50', 'autocomplete' => 'off'));
             $elements[] = form_makeCheckboxField('smsgateway_send', '1', $this->getLang('resendcode'), '', 'block');
         }
         // Render the element to remove the phone since it exists.
         $elements[] = form_makeCheckboxField('smsgateway_disable', '1', $this->getLang('killmodule'), '', 'block');
     }
     return $elements;
 }
开发者ID:wilminator,项目名称:dokuwiki-plugin-twofactorsmsgateway,代码行数:25,代码来源:helper.php


示例15: __construct

 function __construct($syntax_plugin, $args)
 {
     $dthlp =& plugin_load('helper', 'data');
     if (!$dthlp) {
         msg('Loading the data helper failed. Make sure the data plugin is installed.', -1);
     }
     $this->init($syntax_plugin, $args);
     $n_args = array();
     foreach ($args as $arg) {
         if ($arg[0] !== '_') {
             $n_args[] = $arg;
             continue;
         }
         $datatype = $dthlp->_column($arg);
         if (is_array($datatype['type'])) {
             $datatype['basetype'] = $datatype['type']['type'];
             $datatype['enum'] = $datatype['type']['enum'];
             $datatype['type'] = $datatype['origtype'];
         } else {
             $datatype['basetype'] = $datatype['type'];
         }
     }
     $this->standardArgs($n_args);
     if (isset($datatype['enum'])) {
         $values = preg_split('/\\s*,\\s*/', $datatype['enum']);
         if (!$datatype['multi'] && $this->opt['optional']) {
             array_unshift($values, '');
         }
         $this->opt['args'] = $values;
         $this->additional = $datatype['multi'] ? array('multiple' => 'multiple') : array();
     } else {
         $classes = 'data_type_' . $datatype['type'] . ($datatype['multi'] ? 's' : '') . ' ' . 'data_type_' . $datatype['basetype'] . ($datatype['multi'] ? 's' : '');
         $content = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@LABEL@@', '', '@@CLASS@@ ' . $classes);
         $this->tpl = $content;
     }
 }
开发者ID:stretchyboy,项目名称:dokuwiki-plugin-data,代码行数:36,代码来源:bureaucracy_field.php


示例16: 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


示例17: GUI_simpleForm

 /**
  * Display the simple move form
  */
 protected function GUI_simpleForm()
 {
     global $ID;
     echo $this->locale_xhtml('move');
     $treelink = wl($ID, array('do' => 'admin', 'page' => 'move_tree'));
     echo '<p id="plugin_move__treelink">';
     printf($this->getLang('treelink'), $treelink);
     echo '</p>';
     $form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'plugin_move_form'));
     $form->addHidden('page', 'move_main');
     $form->addHidden('id', $ID);
     $form->startFieldset($this->getLang('legend'));
     $form->addElement(form_makeRadioField('class', 'page', $this->getLang('movepage') . ' <code>' . $ID . '</code>', '', 'block radio click-page', array('checked' => 'checked')));
     $form->addElement(form_makeRadioField('class', 'namespace', $this->getLang('movens') . ' <code>' . getNS($ID) . '</code>', '', 'block radio click-ns'));
     $form->addElement(form_makeTextField('dst', $ID, $this->getLang('dst'), '', 'block indent'));
     $form->addElement(form_makeMenuField('type', array('pages' => $this->getLang('move_pages'), 'media' => $this->getLang('move_media'), 'both' => $this->getLang('move_media_and_pages')), 'both', $this->getLang('content_to_move'), '', 'block indent select'));
     $form->addElement(form_makeCheckboxField('autoskip', '1', $this->getLang('autoskip'), '', 'block', $this->getConf('autoskip') ? array('checked' => 'checked') : array()));
     $form->addElement(form_makeCheckboxField('autorewrite', '1', $this->getLang('autorewrite'), '', 'block', $this->getConf('autorewrite') ? array('checked' => 'checked') : array()));
     $form->addElement(form_makeButton('submit', 'admin', $this->getLang('btn_start')));
     $form->endFieldset();
     $form->printForm();
 }
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:25,代码来源:main.php


示例18: __construct

 function __construct($args)
 {
     parent::__construct($args);
     $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@LABEL@@', '', '@@CLASS@@', array('class' => 'datepicker edit', 'maxlength' => '10'));
 }
开发者ID:nefercheprure,项目名称:dokuwiki-plugin-bureaucracy,代码行数:5,代码来源:date.php


示例19: 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


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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP form_makeWikiText函数代码示例发布时间:2022-05-15
下一篇:
PHP form_makePasswordField函数代码示例发布时间: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