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


PHP form_makeTextField函数代码示例

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


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


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