updated PDF functions
This commit is contained in:
parent
6a265412ea
commit
ee87d6f6cd
|
@ -821,7 +821,7 @@ class accountContainer {
|
|||
if ($post['outputpdf']) {
|
||||
// Create / display PDf-file
|
||||
// TODO: add selection for PDF structure in final page
|
||||
createModulePDF(array($_SESSION[$this->base]), 'default.xml');
|
||||
createModulePDF(array($_SESSION[$this->base]), $post['pdfStructure']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -954,8 +954,16 @@ class accountContainer {
|
|||
0 => array('kind' => 'text', 'text' => '', 'td' => array('colspan' => 3)));
|
||||
$return[] = array(
|
||||
0 => array('kind' => 'input', 'type' => 'submit', 'name' => 'createagain', 'value' => _('Create another account')),
|
||||
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'outputpdf', 'value' => _('Create PDF file') ),
|
||||
2 => array('kind' => 'input', 'type' => 'submit', 'name' => 'backmain', 'value' => _('Back to account list')));
|
||||
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'backmain', 'value' => _('Back to account list')));
|
||||
$return[] = array(
|
||||
0 => array('kind' => 'text', 'text' => ' ')
|
||||
);
|
||||
$pdfStructures = getAvailablePDFStructures($type);
|
||||
$return[] = array(
|
||||
0 => array('kind' => 'fieldset', 'legend' => '<b>PDF</b>', 'td' => array('colspan' => 2), 'value' => array(array(
|
||||
0 => array('kind' => 'select', 'name' => 'pdfStructure', 'options' => $pdfStructures),
|
||||
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'outputpdf', 'value' => _('Create PDF file')))
|
||||
)));
|
||||
}
|
||||
else {
|
||||
// loop through all suffixes
|
||||
|
|
|
@ -242,7 +242,7 @@ if (sizeof($info) > 0) {
|
|||
echo ("<b>" . _('PDF structure') . ":</b> <select name=\"pdf_structure\">\n");
|
||||
$pdf_structures = getAvailablePDFStructures($scope);
|
||||
foreach($pdf_structures as $pdf_structure) {
|
||||
echo "<option value=\"" . $pdf_structure . "\"" . (($pdf_structure == 'default.xml') ? " selected" : "") . ">" . substr($pdf_structure,0,strlen($pdf_structure)-4) . "</option>";
|
||||
echo "<option " . (($pdf_structure == 'default') ? " selected" : "") . ">" . $pdf_structure . "</option>";
|
||||
}
|
||||
echo "</select> \n";
|
||||
echo ("<input type=\"submit\" name=\"pdf\" value=\"" . _("Create PDF for selected group(s)") . "\">\n");
|
||||
|
|
|
@ -227,7 +227,7 @@ if (sizeof($info) > 0) {
|
|||
echo ("<b>" . _('PDF structure') . ":</b> <select name=\"pdf_structure\">\n");
|
||||
$pdf_structures = getAvailablePDFStructures('host');
|
||||
foreach($pdf_structures as $pdf_structure) {
|
||||
echo "<option value=\"" . $pdf_structure . "\"" . (($pdf_structure == 'default.xml') ? " selected" : "") . ">" . substr($pdf_structure,0,strlen($pdf_structure)-4) . "</option>";
|
||||
echo "<option " . (($pdf_structure == 'default') ? " selected" : "") . ">" . $pdf_structure . "</option>";
|
||||
}
|
||||
echo "</select> \n";
|
||||
echo ("<input type=\"submit\" name=\"pdf\" value=\"" . _("Create PDF for selected host(s)") . "\">\n");
|
||||
|
|
|
@ -287,7 +287,7 @@ if (sizeof($info) != 0) {
|
|||
echo ("<b>" . _('PDF structure') . ":</b> <select name=\"pdf_structure\">\n");
|
||||
$pdf_structures = getAvailablePDFStructures($scope);
|
||||
foreach($pdf_structures as $pdf_structure) {
|
||||
echo "<option value=\"" . $pdf_structure . "\"" . (($pdf_structure == 'default.xml') ? " selected" : "") . ">" . substr($pdf_structure,0,strlen($pdf_structure)-4) . "</option>";
|
||||
echo "<option " . (($pdf_structure == 'default') ? " selected" : "") . ">" . $pdf_structure . "</option>";
|
||||
}
|
||||
echo "</select> \n";
|
||||
echo ("<input type=\"submit\" name=\"pdf\" value=\"" . _("Create PDF for selected user(s)") . "\">\n");
|
||||
|
|
Loading…
Reference in New Issue