X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch-xls.html;h=8323f55de924056e6037fd701b8e7432706a3853;hb=30f9308a0b5b482e1d1f11444078309834a66dd6;hp=8a05e477c2964e21eabcb7b3218300122313b952;hpb=9f73c5d4c0954b3a03bfcb5e010fc288a7071209;p=freeside.git diff --git a/httemplate/search/elements/search-xls.html b/httemplate/search/elements/search-xls.html index 8a05e477c..8323f55de 100644 --- a/httemplate/search/elements/search-xls.html +++ b/httemplate/search/elements/search-xls.html @@ -13,7 +13,9 @@ my %opt = %{ $args{'opt'} }; #http://support.microsoft.com/kb/199841 http_header('Content-Type' => 'application/vnd.ms-excel' ); - +http_header('Content-Disposition' => + 'attachment;filename="'.($opt{'name'} || PL($opt{'name_singular'}) ).'.xls"'); + #http://support.microsoft.com/kb/812935 #http://support.microsoft.com/kb/323308 $HTML::Mason::Commands::r->headers_out->{'Cache-control'} = 'max-age=0'; @@ -79,5 +81,5 @@ foreach my $row ( @$rows ) { $workbook->close();# or die "Error creating .xls file: $!"; http_header('Content-Length' => length($data) ); - +