use default submit button for PDF

This commit is contained in:
Roland Gruber 2010-05-02 15:34:44 +00:00
parent 2c90b5dc67
commit 34e0316305
1 changed files with 3 additions and 2 deletions

View File

@ -407,7 +407,8 @@ class lamList {
echo "</a>\n ";
}
// pdf image
echo "<input type=\"image\" style=\"background:transparent;\" name=\"createPDF_" . $id . "\" src=\"../../graphics/pdf.png\" title=\"" . _('Create PDF file') . "\">\n ";
$pdfButtonStyle = "background-image: url(../../graphics/pdf.png);background-position: -1px -1px;background-repeat: no-repeat;width:20px;height:20px;background-color:transparent;border-style:none;";
echo "<input type=\"submit\" style=\"$pdfButtonStyle\" name=\"createPDF_" . $id . "\" value=\" \" title=\"" . _('Create PDF file') . "\">\n ";
// additional tools
$tools = $this->getAdditionalTools();
for ($i = 0; $i < sizeof($tools); $i++) {
@ -470,7 +471,7 @@ class lamList {
foreach ($_POST as $key => $value) {
if (strpos($key, 'createPDF_') > -1) {
$parts = explode("_", $key);
if (sizeof($parts) == 3) {
if (sizeof($parts) == 2) {
$this->showPDFPage($parts[1]);
exit;
}