X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Finventory_item-import.html;h=37898739ad8d46a34f7777eb8193a1a2623650bc;hp=65a123e2a584e63dc4a400268b7fca2cbb699530;hb=75e11f1d1a5ced24496b5732e290f7762403feb8;hpb=de1e1a1c2563a9741a5be44f997889f7c37c36ed diff --git a/httemplate/misc/inventory_item-import.html b/httemplate/misc/inventory_item-import.html index 65a123e2a..37898739a 100644 --- a/httemplate/misc/inventory_item-import.html +++ b/httemplate/misc/inventory_item-import.html @@ -3,17 +3,18 @@ Import a file containing <% PL($inventory_class->classname) %>, one per line.

-<% include( '/elements/form-file_upload.html', - 'name' => 'InventoryItemImportForm', - 'action' => 'process/inventory_item-import.html', - 'num_files' => 1, - #'fields' => [ 'format', 'itembatch', 'classnum', ], - 'fields' => [ 'format', 'classnum', ], - 'message' => 'Inventory import successful', - #XXX redirect via $itembatch? or just back to class browse? - 'url' => $p."search/inventory_item.html?classnum=$classnum;avail=1", - ) -%> +<& /elements/form-file_upload.html, + 'name' => 'InventoryImportForm', + 'action' => 'process/inventory_item-import.html', + 'num_files' => 1, + #'fields' => [ 'format', 'itembatch', 'classnum', 'agentnum' ], + 'fields' => [ 'format', 'classnum', 'agentnum', ], + 'message' => 'Inventory import successful', + #XXX redirect via $itembatch? or just back to class browse? + #'url' => $p."search/phone_avail.html?availbatch=$availbatch", + 'url' => $p."search/inventory_item.html?classnum=$classnum;avail=1", + 'onsubmit' => "document.InventoryImportForm.submitButton.disabled=true;", +&> <% &ntable("#cccccc", 2) %> @@ -23,6 +24,11 @@ Import a file containing <% PL($inventory_class->classname) %>, one per line. %# + <% include('/elements/tr-select-agent.html', + 'viewall_right' => 'None', + ) + %> + <% include( '/elements/file-upload.html', 'field' => 'file', 'label' => 'Filename', @@ -31,10 +37,10 @@ Import a file containing <% PL($inventory_class->classname) %>, one per line. - @@ -56,7 +62,7 @@ Upload file can be a text file or Excel spreadsheet. If an Excel spreadsheet, die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); -$cgi->param =~ /^(\d+)$/ or errorpage("illegal classnum"); +$cgi->param('classnum') =~ /^(\d+)$/ or errorpage("illegal classnum"); my $classnum = $1; my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );