advanced_settings.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. {
  48. return '<div class="control-group">
  49. <label class="control-label"></label>
  50. <div class="controls">
  51. '.HTML_QuickForm_static::toHtml().'
  52. </div>
  53. </div>
  54. ';
  55. }
  56. }