X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fform-file_upload.html;h=45b6c97f267008a8c100c4d4f58a1a0d0b289c0b;hb=b431ece7b4a71aa5771f44393da582692f668817;hp=234438c57fd15f1f7abe8c5d03812ccbbb90ae76;hpb=c739d0183e78521c799772dda3f3346d0461c6e8;p=freeside.git diff --git a/httemplate/elements/form-file_upload.html b/httemplate/elements/form-file_upload.html index 234438c57..45b6c97f2 100644 --- a/httemplate/elements/form-file_upload.html +++ b/httemplate/elements/form-file_upload.html @@ -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'); @@ -72,7 +72,7 @@ Example: ACTION = "<% $fsurl %>misc/file-upload.html" METHOD = "POST" ENCTYPE = "multipart/form-data" - onSubmit = "return doUpload(this, <% $opt{key} %>gotUploaded)" + onSubmit = "<% $opt{onsubmit} %>return doUpload(this, <% $opt{key} %>gotUploaded)" > <%init> @@ -90,4 +90,6 @@ my $msg_or_url = $opt{message} } : $opt{url}; +$opt{onsubmit} .= ';' if $opt{onsubmit} && $opt{onsubmit} !~ /;\s*$/; +