From a9d755c3cee7542d3ca552174af0b7b71693ae58 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 14 Aug 2008 11:56:12 +0000 Subject: customer import: add progress bar & redirect to a search of the imported customers, #3475 --- httemplate/misc/cust_main-import.cgi | 65 ++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 21 deletions(-) (limited to 'httemplate/misc/cust_main-import.cgi') diff --git a/httemplate/misc/cust_main-import.cgi b/httemplate/misc/cust_main-import.cgi index e1580e5a1..31bf1ee62 100644 --- a/httemplate/misc/cust_main-import.cgi +++ b/httemplate/misc/cust_main-import.cgi @@ -3,31 +3,44 @@ Import a file containing customer records.

-
+<% include( '/elements/form-file_upload.html', + 'name' => 'CustomerImportForm', + 'action' => 'process/cust_main-import.cgi', + 'num_files' => 1, + 'fields' => [ 'agentnum', 'custbatch', 'format' ], + 'message' => 'Customer import successful', + 'url' => $p."search/cust_main.html?custbatch=$custbatch", + ) +%> <% &ntable("#cccccc", 2) %> -<% include('/elements/tr-select-agent.html', '', #$agentnum, - 'label' => "Agent", - 'empty_label' => 'Select agent', - ) -%> + <% include('/elements/tr-select-agent.html', '', #$agentnum, + 'label' => "Agent", + 'empty_label' => 'Select agent', + ) + %> + + + + + Format + + + + + + <% include( '/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + ) + %> - - Format - - - - - - Filename - - % #include('/elements/tr-select-part_referral.html') % @@ -48,7 +61,15 @@ Import a file containing customer records. --> - + + + + + @@ -108,4 +129,6 @@ my $req = qq!*!; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); +my $custbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + -- cgit v1.2.1