PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/libraries/jxtended/form/fields/file.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 44 lines | 14 code | 5 blank | 25 comment | 0 complexity | 3c2fe30a70ac3ab6b4e86e7e552ddd8b MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: file.php 484 2010-12-20 23:40:27Z eddieajau $
  4. * @package JXtended.Libraries
  5. * @subpackage Form
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('JPATH_BASE') or die;
  11. juimport('jxtended.form.formfield');
  12. /**
  13. * Form Field class for JXtended Libraries.
  14. *
  15. * @package JXtended.Libraries
  16. * @subpackage Form
  17. * @since 1.1
  18. */
  19. class JFormFieldFile extends JFormField
  20. {
  21. /**
  22. * The field type.
  23. *
  24. * @var string
  25. */
  26. public $type = 'File';
  27. /**
  28. * Method to get the field input.
  29. *
  30. * @return string The field input.
  31. */
  32. protected function _getInput()
  33. {
  34. $size = $this->_element->attributes('size') ? ' size="'.$this->_element->attributes('size').'"' : '';
  35. $class = $this->_element->attributes('class') ? 'class="'.$this->_element->attributes('class').'"' : 'class="text_area"';
  36. $onchange = $this->_element->attributes('onchange') ? ' onchange="'.$this->_element->attributes('onchange').'"' : '';
  37. return '<input type="file" name="'.$this->inputName.'" id="'.$this->inputId.'" value="" '.$class.$size.$onchange.' />';
  38. }
  39. }