Merge pull request #3305 from alchemy-fr/PHRAS-2890-print-fiel-attribute-gui-visible-false

PHRAS-2890 : #comment merge 4.1 Don't print the field with attribute "Displayed in Graphical Interface" to false
This commit is contained in:
Nicolas Maillat
2020-01-24 12:55:28 +01:00
committed by GitHub

View File

@@ -354,6 +354,7 @@ class PDFRecords extends PDF
$this->pdf->SetY($y + 2); $this->pdf->SetY($y + 2);
foreach ($rec->get_caption()->get_fields() as $field) { foreach ($rec->get_caption()->get_fields() as $field) {
if ($field->get_databox_field()->get_gui_visible()) {
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $field->get_name() . " : "); $this->pdf->Write(5, $field->get_name() . " : ");
@@ -367,6 +368,7 @@ class PDFRecords extends PDF
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
} }
}
$this->pdf->SetY($this->pdf->GetY() + 10); $this->pdf->SetY($this->pdf->GetY() + 10);
} }
} }
@@ -679,6 +681,8 @@ class PDFRecords extends PDF
$this->pdf->Write(12, "\n"); $this->pdf->Write(12, "\n");
foreach ($rec->get_caption()->get_fields() as $field) { foreach ($rec->get_caption()->get_fields() as $field) {
/* @var $field caption_field */ /* @var $field caption_field */
if ($field->get_databox_field()->get_gui_visible()) {
if ($nf > 0) { if ($nf > 0) {
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
} }
@@ -700,6 +704,7 @@ class PDFRecords extends PDF
} }
} }
} }
}
return; return;
} }