From 5e9bbbe490e40da103e0a7960312ab1c814dafa3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 19:41:45 -0800 Subject: Convert the Simple Uploader form over to Forge, and use the event model to let the Tags module modify it. This brings it inline with our other module-extensible form based interactions. --- modules/gallery/libraries/Form_Uploadify.php | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 modules/gallery/libraries/Form_Uploadify.php (limited to 'modules/gallery/libraries/Form_Uploadify.php') diff --git a/modules/gallery/libraries/Form_Uploadify.php b/modules/gallery/libraries/Form_Uploadify.php new file mode 100644 index 00000000..b1d9fa74 --- /dev/null +++ b/modules/gallery/libraries/Form_Uploadify.php @@ -0,0 +1,54 @@ + false, + "type" => "UNKNOWN", + "url" => "", + "text" => ""); + + public function __construct($name) { + parent::__construct($name); + $this->data["script_data"] = array( + "g3sid" => Session::instance()->id(), + "user_agent" => Input::instance()->server("HTTP_USER_AGENT"), + "csrf" => access::csrf_token()); + } + + public function album(Item_Model $album) { + $this->data["album"] = $album; + return $this; + } + + public function script_data($key, $value) { + $this->data["script_data"][$key] = $value; + } + + public function render() { + $v = new View("form_uploadify.html"); + $v->album = $this->data["album"]; + $v->script_data = $this->data["script_data"]; + return $v; + } + + public function validate() { + return true; + } +} \ No newline at end of file -- cgit v1.2.3