advanced_settings.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * HTML class for static data
  4. * @example $form->addElement('advanced_settings', '<a href="#">advanced settings</a>');
  5. */
  6. require_once 'HTML/QuickForm/static.php';
  7. /**
  8. * A pseudo-element used for adding raw HTML to form
  9. *
  10. * Intended for use with the default renderer only, template-based
  11. * ones may (and probably will) completely ignore this
  12. *
  13. * @category HTML
  14. * @package HTML_QuickForm
  15. * @author Alexey Borzov <avb@php.net>
  16. * @version Release: 3.2.11
  17. * @since 3.0
  18. * @deprecated Please use the templates rather than add raw HTML via this element
  19. */
  20. class HTML_QuickForm_advanced_settings extends HTML_QuickForm_static
  21. {
  22. // {{{ constructor
  23. /**
  24. * Class constructor
  25. *
  26. * @param string $text raw HTML to add
  27. * @access public
  28. * @return void
  29. */
  30. function HTML_QuickForm_advanced_settings($text = null)
  31. {
  32. $this->HTML_QuickForm_static(null, null, $text);
  33. $this->_type = 'html';
  34. }
  35. /**
  36. * Accepts a renderer
  37. *
  38. * @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
  39. * @access public
  40. * @return void
  41. */
  42. function accept(&$renderer, $required=false, $error=null)
  43. {
  44. $renderer->renderHtml($this);
  45. } // end func accept
  46. function toHtml() {
  47. return '<div class="control-group ">
  48. <label class="control-label"></label>
  49. <div class="controls">
  50. '.HTML_QuickForm_static::toHtml().'
  51. </div>
  52. </div>
  53. ';
  54. } //end func toHtml
  55. } //end class HTML_QuickForm_html