X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ffile-upload.html;h=f69df343c566928d402056c0d7570965be601486;hp=2859a676f5b51e32b08555675576579674ec4f6c;hb=d4114381c5d95e8acd0d0fc2bbc2b3528bde2ecf;hpb=6a24254d490f3d023728044daba0765f20f6971e diff --git a/httemplate/elements/file-upload.html b/httemplate/elements/file-upload.html index 2859a676f..f69df343c 100644 --- a/httemplate/elements/file-upload.html +++ b/httemplate/elements/file-upload.html @@ -1,10 +1,13 @@ - - +<&| onload.js &> +// force the form to submit as multipart +var thisform = document.getElementById('uploaded_files').form; +thisform.enctype = 'multipart/form-data'; + + + + + + - - % foreach (@field) { - - <% shift @label %> - - +% if($param{'no_table'}) { + <% shift @label %> +% } +% else { + + <% shift @label %> + + +% } % } -
Debugging:
- -<%init> -my %param = @_; -my $debug = $param{'debug'}; +
+ Debugging:

+
-my $callback = $param{'callback'} || "''"; +<%init> -my @label = (); -if ( ref($param{'label'}) ) { - push @label, @{$param{'label'}}; -}else{ - push @label, $param{'label'}; -} +my %param = @_; -my @field = (); -if ( ref($param{'field'}) ) { - push @field, @{$param{'field'}}; -}else{ - push @field, $param{'field'}; -} +my @label = ref($param{'label'}) ? @{$param{'label'}} : ($param{'label'}); +my @field = ref($param{'field'}) ? @{$param{'field'}} : ($param{'field'});