summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorivan <ivan>2008-08-14 11:44:52 +0000
committerivan <ivan>2008-08-14 11:44:52 +0000
commit5d4d60dd8cbe71a96256b6c375f01e0182296f18 (patch)
treed59b1dc32860fdf425e02b2b783d061a6c0fdfe6 /httemplate/misc
parentec5603ae351d4ed8e4873dcd20bf71f8a4d549bb (diff)
customer import: add progress bar & redirect to a search of the imported customers, #3475
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/tax-import.cgi91
1 files changed, 39 insertions, 52 deletions
diff --git a/httemplate/misc/tax-import.cgi b/httemplate/misc/tax-import.cgi
index 9044ac9eb..15f09d518 100644
--- a/httemplate/misc/tax-import.cgi
+++ b/httemplate/misc/tax-import.cgi
@@ -3,63 +3,50 @@
Import a CSV file set containing tax rate records.
<BR><BR>
-<% include( '/elements/progress-init.html',
- 'TaxRateUpload',
- [ 'format', 'uploaded_files' ],
- 'process/tax-import.cgi',
- { 'message' => 'Tax rates imported' },
+<% include( '/elements/form-file_upload.html',
+ 'name' => 'TaxRateUpload',
+ 'action' => 'process/tax-import.cgi',
+ 'num_files' => 4,
+ 'fields' => [ 'format', ],
+ 'message' => 'Tax rates imported',
)
%>
-<SCRIPT>
-
- function gotLoaded(success, message) {
-
- var uploaded = document.getElementById('uploaded_files');
- var a = uploaded.value.split(',');
- if (uploaded.value.split(',').length == 4){
- process();
- }else{
- var p = document.getElementById('uploadError');
- p.innerHTML='<FONT SIZE="+1" COLOR="#ff0000">Error: '+message+'</FONT><BR><BR>';
- p.style='display:visible';
- return false;
- }
-
- }
-
-</SCRIPT>
-
-<div style="display:none:" id="uploadError"></div>
-<FORM NAME="TaxRateUpload" ACTION="<% $fsurl %>misc/file-upload.html" METHOD="post" ENCTYPE="multipart/form-data" onsubmit="return doUpload(this, gotLoaded )">
-
<% &ntable("#cccccc", 2) %>
-<TR>
- <TH ALIGN="right">Format</TH>
- <TD>
- <SELECT NAME="format">
- <OPTION VALUE="cch-update" SELECTED>CCH update
- <OPTION VALUE="cch">CCH initial import
- </SELECT>
- </TD>
-</TR>
-
-<% include('/elements/file-upload.html', 'field' => [ 'codefile',
- 'plus4file',
- 'txmatrix',
- 'detail',
- ],
- 'label' => [ 'code CSV filename',
- 'plus4 CSV filename',
- 'txmatrix CSV filename',
- 'detail CSV filename',
- ],
- 'callback' => 'gotLoaded',
- 'debug' => 0,
- )
-%>
-<TR><TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px"><INPUT TYPE="submit" VALUE="Import CSV files" onClick="document.TaxRateUpload.submit.disabled=true;"></TD></TR>
+ <TR>
+ <TH ALIGN="right">Format</TH>
+ <TD>
+ <SELECT NAME="format">
+ <OPTION VALUE="cch-update" SELECTED>CCH update
+ <OPTION VALUE="cch">CCH initial import
+ </SELECT>
+ </TD>
+ </TR>
+
+ <% include( '/elements/file-upload.html',
+ 'field' => [ 'codefile',
+ 'plus4file',
+ 'txmatrix',
+ 'detail',
+ ],
+ 'label' => [ 'code CSV filename',
+ 'plus4 CSV filename',
+ 'txmatrix CSV filename',
+ 'detail CSV filename',
+ ],
+ 'debug' => 0,
+ )
+ %>
+
+ <TR>
+ <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
+ <INPUT TYPE = "submit"
+ VALUE = "Import CSV files"
+ onClick = "document.TaxRateUpload.submit.disabled=true;"
+ >
+ </TD>
+ </TR>
</TABLE>