email.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * Base class for <input /> form elements
  4. */
  5. require_once 'HTML/QuickForm/input.php';
  6. /**
  7. * HTML class for a password type field
  8. *
  9. * @category HTML
  10. * @package HTML_QuickForm
  11. * @author Adam Daniel <adaniel1@eesus.jnj.com>
  12. * @author Bertrand Mansion <bmansion@mamasam.com>
  13. * @version Release: 3.2.11
  14. * @since 1.0
  15. */
  16. class HTML_QuickForm_email extends HTML_QuickForm_input
  17. {
  18. // {{{ constructor
  19. /**
  20. * Class constructor
  21. *
  22. * @param string $elementName (optional)Input field name attribute
  23. * @param string $elementLabel (optional)Input field label
  24. * @param mixed $attributes (optional)Either a typical HTML attribute string
  25. * or an associative array
  26. * @since 1.0
  27. * @access public
  28. * @return void
  29. * @throws
  30. */
  31. function HTML_QuickForm_email($elementName=null, $elementLabel=null, $attributes=null)
  32. {
  33. HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
  34. $this->setType('email');
  35. } //end constructor
  36. // }}}
  37. // {{{ setSize()
  38. /**
  39. * Sets size of password element
  40. *
  41. * @param string $size Size of password field
  42. * @since 1.0
  43. * @access public
  44. * @return void
  45. */
  46. function setSize($size)
  47. {
  48. $this->updateAttributes(array('size'=>$size));
  49. } //end func setSize
  50. // }}}
  51. // {{{ setMaxlength()
  52. /**
  53. * Sets maxlength of password element
  54. *
  55. * @param string $maxlength Maximum length of password field
  56. * @since 1.0
  57. * @access public
  58. * @return void
  59. */
  60. function setMaxlength($maxlength)
  61. {
  62. $this->updateAttributes(array('maxlength'=>$maxlength));
  63. } //end func setMaxlength
  64. // }}}
  65. // {{{ getFrozenHtml()
  66. // }}}
  67. } //end class HTML_QuickForm_password