Url.php 662 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Url element
  5. *
  6. * Class Url
  7. */
  8. class Url extends HTML_QuickForm_text
  9. {
  10. /**
  11. * Constructor of Url class
  12. * @param type $elementName
  13. * @param type $elementLabel
  14. * @param type $attributes
  15. */
  16. public function Url($elementName = null, $elementLabel = null, $attributes = null)
  17. {
  18. if (!isset($attributes['id'])) {
  19. $attributes['id'] = $elementName;
  20. }
  21. $attributes['type'] = 'url';
  22. $attributes['class'] = 'form-control';
  23. parent::__construct($elementName, $elementLabel, $attributes);
  24. $this->setType('url');
  25. }
  26. }