email.php 1.8 KB

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