X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fform-file_upload.html;h=3542a5a8e9ffb8143f0f59f554e6d2aebbc66e77;hp=f398ba42dfcd3f21313c433f9b9e70696666f914;hb=f48ffc61601d08024aeff19ecd07d7420fc4e5b3;hpb=5da73ac30a52234cc126ead03cddaf5a4e131019 diff --git a/httemplate/elements/form-file_upload.html b/httemplate/elements/form-file_upload.html index f398ba42d..3542a5a8e 100644 --- a/httemplate/elements/form-file_upload.html +++ b/httemplate/elements/form-file_upload.html @@ -10,7 +10,7 @@ Example: 'num_files' => 1, #or more 'url' => $url - #OR + #AND/OR 'message' => 'Message', #optional @@ -53,7 +53,7 @@ Example: var uploaded = document.getElementById('uploaded_files'); var a = uploaded.value.split(','); - if (uploaded.value.split(',').length == <% $opt{num_files} %>){ + if (success && uploaded.value.split(',').length == <% $opt{num_files} %>){ process(); }else{ var p = document.getElementById('uploadError'); @@ -69,10 +69,11 @@ Example:
<%init> @@ -90,4 +91,6 @@ my $msg_or_url = $opt{message} } : $opt{url}; +$opt{onsubmit} .= ';' if $opt{onsubmit} && $opt{onsubmit} !~ /;\s*$/; +