From dcc553538ede04c0783bc92d3942c905c29131c1 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 15 Sep 2008 07:18:57 +0000 Subject: add internal did database & ability to query for availability, plus upload tool --- httemplate/misc/phone_avail-import.html | 77 +++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 httemplate/misc/phone_avail-import.html (limited to 'httemplate/misc/phone_avail-import.html') diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html new file mode 100644 index 000000000..98dcc8abb --- /dev/null +++ b/httemplate/misc/phone_avail-import.html @@ -0,0 +1,77 @@ +<% include('/elements/header.html', 'Phone number (DID) import') %> + +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' ], + 'message' => 'DID import successful', + 'url' => $p."search/phone_avail.html?availbatch=$availbatch", + ) +%> + +<% &ntable("#cccccc", 2) %> + + + + + + + + <% include( '/elements/tr-select-table.html', + 'table' => 'part_export', + 'name_col' => 'machine', + 'label' => 'Export', + 'empty_label' => 'Select export', + 'hashref' => { 'exporttype' => 'internal_diddb', }, + #'label_callback' => + ) + %> + + <% include( '/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + ) + %> + + + + + + + + + + + +
+ +Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension. +

+ +Default format has the following field order: state, number +

+ +Field information: + + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + +my $availbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + + -- cgit v1.2.1