From d91ebf445fc3ad591b9e1b4282088742c3ed501b Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Mon, 8 Feb 2010 15:23:58 -0500 Subject: [PATCH] Bugfix: Enabling guide box configuration parameter This patch enables turning the guide boxes on/off in the patron cards layout editor. Signed-off-by: Galen Charlton --- .../prog/en/modules/patroncards/edit-layout.tmpl | 15 ++++++++++++--- patroncards/create-pdf.pl | 2 +- patroncards/edit-layout.pl | 2 ++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tmpl index 188b88ec93..cc22661ba3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tmpl @@ -179,12 +179,21 @@ Front - Back + Back - Front + Front Back - + +
  • + + + On + Off + + On + Off +
  • diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 656c31f1ad..02ba79348a 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -120,7 +120,7 @@ foreach my $item (@{$items}) { layout => $layout_xml, text_wrap_cols => 30, #FIXME: hardcoded ); - $patron_card->draw_guide_box($pdf); + $patron_card->draw_guide_box($pdf) if $layout_xml->{'guide_box'}; $patron_card->draw_barcode($pdf) if $layout_xml->{'barcode'}; # Do image foo and place binary image data into layout hash diff --git a/patroncards/edit-layout.pl b/patroncards/edit-layout.pl index 09edf42a75..38557b02cf 100755 --- a/patroncards/edit-layout.pl +++ b/patroncards/edit-layout.pl @@ -145,6 +145,7 @@ if ($op eq 'edit') { layout_id => $layout->get_attr('layout_id') > -1 ? $layout->get_attr('layout_id') : '', layout_name => $layout->get_attr('layout_name'), page_side => ($layout_xml->{'page_side'} eq 'F' ? 0 : 1), + guide_box => $layout_xml->{'guide_box'}, units => $units, @barcode, barcode_type => get_barcode_types(), @@ -206,6 +207,7 @@ elsif ($op eq 'save') { $layout_id = $cgi->param($parameter) if $parameter eq 'layout_id'; $layout->{'units'} = $cgi->param($parameter) if $parameter eq 'units'; $layout->{'page_side'} = $cgi->param($parameter) if $parameter eq 'page_side'; + $layout->{'guide_box'} = $cgi->param($parameter) if $parameter eq 'guide_box'; } } $layout->{'text'} = $text_lines; -- 2.39.5