Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Improved functionallity and cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
Janis committed Dec 13, 2011
1 parent 684830b commit c6e8cfd
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions lib/Form/Field/upload.php
Expand Up @@ -70,12 +70,16 @@ class Form_Field_Upload extends Form_Field {
public $mode='iframe';
public $multiple=false;
public $debug=false;

public $format_files_template="view/uploaded_files";
function allowMultiple($multiple=50){
// Allow no more than $multiple files to be present in the table
$this->multiple=$multiple;
return $this;
}
}
function setFormatFilesTemplate($template){
$this->format_files_template=$template;
return $this;
}
function setMode($mode){
$this->mode=$mode;
return $this;
Expand Down Expand Up @@ -189,15 +193,7 @@ function getUploadedFiles(){
}
function formatFiles($data){
$this->js(true)->atk4_uploader('addFiles',$data);
$o = $this->add('SMLite')->loadTemplate("view/uploaded_files")->render();

/*
foreach($data as $row){
$o.='<tr><td>'.$row['original_filename'].
'</td><td><a href="javascript:$(this).univ().ajaxec('.
addslashes($this->api->getDestinationURL(null,)).')">del</a></tr>';
}
*/
$o = $this->add('SMLite')->loadTemplate($this->format_files_template)->render();
return $o;
}

Expand Down

0 comments on commit c6e8cfd

Please sign in to comment.