-<FORM ACTION="process/tax-import.cgi" METHOD="post" ENCTYPE="multipart/form-data">
-
-<% &ntable("#cccccc", 2) %>
-
-<TR>
- <TH ALIGN="right">Format</TH>
- <TD>
- <SELECT NAME="format">
- <OPTION VALUE="cch">CCH
-<!-- <OPTION VALUE="extended" SELECTED>Extended
- <OPTION VALUE="extended-plus_company">Extended plus company -->
- </SELECT>
- </TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">code CSV filename</TH>
- <TD><INPUT TYPE="file" NAME="codefile"></TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">plus4 CSV filename</TH>
- <TD><INPUT TYPE="file" NAME="plus4file"></TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">txmatrix CSV filename</TH>
- <TD><INPUT TYPE="file" NAME="txmatrix"></TD>
-</TR>
-
-<TR>
- <TH ALIGN="right">detail CSV filename</TH>
- <TD><INPUT TYPE="file" NAME="detail"></TD>
-</TR>
-
-
-<TR><TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px"><INPUT TYPE="submit" VALUE="Import CSV files"></TD></TR>
+<& /elements/form-file_upload.html,
+ 'name' => 'TaxRateUpload',
+ 'action' => 'process/tax-import.cgi',
+ 'fields' => [ 'format', 'reload' ],
+ 'num_files' => $vendor_info{$data_vendor}->{num_files},
+ 'message' => 'Tax rates imported',
+ 'onsubmit' => "document.TaxRateUpload.submitButton.disabled=true;",
+&>
+
+<& /elements/table-grid.html &>
+
+ <TR>
+ <TH ALIGN="right">Format</TH>
+ <TD>
+ <SELECT NAME="format">
+% my @formats = @{ $vendor_info{$data_vendor}->{formats} };
+% while (@formats) {
+ <OPTION VALUE="<% shift @formats %>"><% shift @formats %></OPTION>
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
+ <TR>
+ <TH ALIGN="right">Replace existing data from this vendor</TH>
+ <TD>
+ <INPUT NAME="reload" TYPE="checkbox" VALUE="1" CHECKED>
+ </TD>
+ </TR>
+
+ <& /elements/file-upload.html,
+ 'field' => $vendor_info{$data_vendor}->{field},
+ 'label' => $vendor_info{$data_vendor}->{label},
+ 'debug' => 0,
+ &>
+
+ <TR>
+ <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
+ <INPUT TYPE = "submit"
+ NAME = "submitButton"
+ ID = "submitButton"
+ VALUE = "Import CSV files"
+ >
+ </TD>
+ </TR>