Created
October 23, 2012 16:10
-
-
Save mcfdn/3939735 to your computer and use it in GitHub Desktop.
Form_Jquery_File_Upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is aimed for use with jQueryFileUpload | |
* | |
* @link https://github.com/blueimp/jQuery-File-Upload | |
* @author James McFadden <james@jamesmcfadden.co.uk> | |
*/ | |
class Form_Jquery_File_Upload extends Form_Upload | |
{ | |
function init() | |
{ | |
$this->resolveDependencies(); | |
$this->setAttrib('id', 'fileupload'); | |
$this->addElement( | |
'file', | |
'Photo' | |
); | |
$this->addElement( | |
'Button', | |
'Start', | |
array( | |
'label' => 'Start Upload', | |
'class' => 'btn btn-primary start', | |
'escape' => false | |
) | |
); | |
$this->addElement( | |
'Button', | |
'Cancel', | |
array( | |
'label' => 'Cancel Upload', | |
'class' => 'btn btn-warning cancel', | |
'escape' => false | |
) | |
); | |
$this->addElement( | |
'Button', | |
'Delete', | |
array( | |
'label' => 'Delete', | |
'class' => 'btn btn-danger delete', | |
'escape' => false | |
) | |
); | |
} | |
private function resolveDependencies() | |
{ | |
// Include your jQueryFileUpload scripts here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment