open PDF in separate window

This commit is contained in:
Roland Gruber 2010-01-04 20:50:39 +00:00
parent 443bb0474e
commit fea2bc2514
2 changed files with 7 additions and 10 deletions

View File

@ -610,7 +610,7 @@ class lamList {
$this->listPrintHeader();
echo "<br>\n";
echo "<form action=\"list.php?type=" . $this->type . "&amp;norefresh=true\" method=\"post\">\n";
echo "<form target=\"_blank\" action=\"list.php?type=" . $this->type . "&amp;norefresh=true\" method=\"post\">\n";
echo '<fieldset class="' . $this->type . 'edit"><legend>' . _('Create PDF file') . '</legend><br>';
echo '<table class="' . $this->type . 'edit">';
@ -763,6 +763,11 @@ class lamList {
* Sets some internal parameters.
*/
protected function listGetParams() {
// check if only PDF should be shown
if (isset($_GET['printPDF'])) {
$this->showPDFPage($_GET['dn']);
exit();
}
// get current page
if (isset($_GET["page"])) $this->page = $_GET["page"];
else $this->page = 1;

View File

@ -1070,8 +1070,7 @@ class accountContainer {
}
// create PDF file
if (isset($_POST['accountContainerCreatePDF'])) {
// display PDf-file
createModulePDF(array($_SESSION[$this->base]), $_POST['pdfStructure']);
metaRefresh('../lists/list.php?printPDF=1&amp;type=' . $this->type . "&amp;dn=" . base64_encode($this->finalDN));
exit;
}
// module actions
@ -1383,7 +1382,6 @@ class accountContainer {
*
*/
private function printSuccessPage() {
$pdfStructures = getPDFStructureDefinitions($this->type);
$this->printPageHeader();
// Show success message
if ($this->dn_orig == '') {
@ -1401,13 +1399,7 @@ class accountContainer {
echo "<input name=\"accountContainerCreateAgain\" type=\"submit\" value=\"" . $type->LABEL_CREATE_ANOTHER_ACCOUNT . "\"> \n";
echo "<input name=\"accountContainerBackToList\" type=\"submit\" value=\"" . $type->LABEL_BACK_TO_ACCOUNT_LIST . "\"> \n";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "<select name=\"pdfStructure\" size=1>\n";
for ($i = 0; $i < sizeof($pdfStructures); $i++) {
echo "<option>" . $pdfStructures[$i] . "</option>\n";
}
echo "</select>\n";
echo "<input name=\"accountContainerCreatePDF\" type=\"submit\" value=\"" . _('Create PDF file') . "\">\n";
printHelpLink(getHelp('', '403'), '403');
echo "</td></tr></table>\n";
$this->printPageFooter();
}