function render($params, $form) { $id = 'bureaucracy__' . md5(rand()); $params = array_merge(array('value' => false), $this->opt, $params); $check = $params['value'] ? 'checked="checked"' : ''; $this->tpl = '<label class="@@CLASS@@" for="' . $id . '"><span>@@LABEL@@</span>' . '<input type="hidden" name="@@NAME@@" value="0" />' . '<input type="checkbox" name="@@NAME@@" value="1" id="' . $id . '" ' . $check . ' /></label>'; parent::render($params, $form); }
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); }
function render($params, $form) { if (isset($this->tpl)) { parent::render($params, $form); } else { $this->_handlePreload(); if (!$form->_infieldset) { $form->startFieldset(''); } if ($this->error) { $params['class'] = 'bureaucracy_error'; } $params = array_merge($this->opt, $params); $form->addElement(call_user_func_array('form_makeListboxField', $this->_parse_tpl(array('@@NAME@@', $params['args'], '@@VALUE|' . $params['args'][0] . '@@', '@@LABEL@@', '', '@@CLASS@@', $this->additional), $params))); } }
function render($params, $form) { if (isset($this->tpl)) { parent::render($params, $form); } else { // Is an enum type, otherwise $this->tpl would be set in __construct $this->_handlePreload(); if (!$form->_infieldset) { $form->startFieldset(''); } if ($this->error) { $params['class'] = 'bureaucracy_error'; } $params = array_merge($this->opt, $params); $params['value'] = preg_split('/\\s*,\\s*/', $params['value'], -1, PREG_SPLIT_NO_EMPTY); if (count($params['value']) === 0) { $params['value'] = $params['args'][0]; } $form->addElement(call_user_func_array('form_makeListboxField', $this->_parse_tpl(array('@@NAME@@[]', $params['args'], $params['value'], '@@LABEL@@', '', '@@CLASS@@', $this->additional), $params))); } }