X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fphone_avail-import.html;h=0febfbcf5db25de8bf885ba3adab4effb3457087;hb=b6c5d35cc215c18d3fb1d9aeb0239a610eb68c32;hp=635b8f69ce55b45d6ca798b0b37f44c6ec0f7c8a;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html index 635b8f69c..0febfbcf5 100644 --- a/httemplate/misc/phone_avail-import.html +++ b/httemplate/misc/phone_avail-import.html @@ -3,15 +3,16 @@ Import a file containing phone numbers (DIDs).

-<% include( '/elements/form-file_upload.html', - 'name' => 'PhonenumImportForm', - 'action' => 'process/phone_avail-import.html', - 'num_files' => 1, - 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode', 'ordernum', 'confirmed', 'vendor_order_id' ], - 'message' => 'DID import successful', - 'url' => $p."search/phone_avail.html?availbatch=$availbatch", - ) -%> +<& /elements/form-file_upload.html, + 'name' => 'PhonenumImportForm', + 'action' => 'process/phone_avail-import.html', + 'num_files' => 1, + 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode', + 'ordernum', 'confirmed', 'vendor_order_id' ], + 'message' => 'DID import successful', + 'url' => $p."search/phone_avail.html?availbatch=$availbatch", + 'onsubmit' => "document.PhonenumImportForm.submitButton.disabled=true;", +&> <% &ntable("#cccccc", 2) %> @@ -45,6 +46,16 @@ Import a file containing phone numbers (DIDs). <% $format %> +% if ( scalar(@exports) == 1 ) { +% my $export = $exports[0]; + + Export + + + <% $export->exportname %> + + +% } else { <% include( '/elements/tr-select-table.html', 'table' => 'part_export', 'name_col' => 'label', @@ -55,6 +66,7 @@ Import a file containing phone numbers (DIDs). #'label_callback' => ) %> +% } Country code @@ -75,9 +87,9 @@ Import a file containing phone numbers (DIDs). @@ -145,5 +157,7 @@ if ( $order ) { my $availbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + +my @exports = qsearch('part_export', { 'exporttype' => 'internal_diddb', });