From ec66217a2b8202eca274f26a64335c4412ee695e Mon Sep 17 00:00:00 2001 From: james Date: Thu, 20 Mar 2008 20:07:13 +0000 Subject: [PATCH] Split label_box into two separate options: label_box and field_box. label_box draws a border around the entire label, field_box draws a boarder around each field of text on the label --- admin/reports.inc.php | 7 +++++-- lpdf.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 7853c05..950a5e1 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -60,6 +60,9 @@ $report_options['label_box'] = array('desc' => 'Draw a box around each label', 'values' => array('no'=>'No', 'yes'=>'Yes') ); + $report_options['field_box'] = array('desc' => 'Draw a box around each text field on the label', + 'values' => array('no'=>'No', 'yes'=>'Yes') + ); $report_options['label_fairname'] = array('desc' => 'Print the fair name at the top of each label', 'values' => array('no'=>'No', 'yes'=>'Yes') ); @@ -770,8 +773,8 @@ foreach($report_stock as $n=>$v) { if($d['face'] == 'bold') $opt[] = 'bold'; $opt[] = $d['align']; $opt[] = $d['valign']; - if($report['option']['label_box'] == 'yes') - $opt[] = 'label_box'; + if($report['option']['field_box'] == 'yes') + $opt[] = 'field_box'; /* Special column, draw a box */ diff --git a/lpdf.php b/lpdf.php index eaac41c..a2ef6b0 100644 --- a/lpdf.php +++ b/lpdf.php @@ -341,7 +341,7 @@ class lpdf if(in_array('vtop', $options)) $valign = 'top'; if(in_array('vcenter', $options)) $valign = 'center'; if(in_array('vbottom', $options)) $valign = 'bottom'; - if(in_array('label_box', $options)) $boxtext = true; + if(in_array('field_box', $options)) $boxtext = true; /* Find the correct font size for the lineheight */