From afc02bc1c3db9ffe8c9bf660c8aa08666752edfb Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 8 May 2011 15:26:22 +0000 Subject: h-source:added new EasyGiant SVN version --- h-source/Library/Form/File.php | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 h-source/Library/Form/File.php (limited to 'h-source/Library/Form/File.php') diff --git a/h-source/Library/Form/File.php b/h-source/Library/Form/File.php new file mode 100644 index 0000000..48030f7 --- /dev/null +++ b/h-source/Library/Form/File.php @@ -0,0 +1,47 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of a file upload entry +class Form_File extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements($value); + $returnString = $wrap[0]; + $returnString .= "
\n\t"; + $returnString .= $wrap[1]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[2]; + $returnString .= Html_Form::fileUpload($this->entryName, $value, $this->className, $this->idName); + $returnString .= $wrap[3]; + $returnString .="
\n"; + $returnString .= $wrap[4]; + return $returnString; + } + +} -- cgit v1.2.3