Bugzilla – Attachment 40010 Details for
Bug 14366
Units doesn't get saved usefully for patroncards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14366 - Units doesn't get saved usefully for patroncards
Bug-14366---Units-doesnt-get-saved-usefully-for-pa.patch (text/plain), 2.02 KB, created by
David Cook
on 2015-06-09 04:27:52 UTC
(
hide
)
Description:
Bug 14366 - Units doesn't get saved usefully for patroncards
Filename:
MIME Type:
Creator:
David Cook
Created:
2015-06-09 04:27:52 UTC
Size:
2.02 KB
patch
obsolete
>From d98a3457b3ae4c4770391d8ddf12500cf98fd306 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 9 Jun 2015 14:25:23 +1000 >Subject: [PATCH] Bug 14366 - Units doesn't get saved usefully for patroncards > >This patch causes the "Units" to be saved and displayed correctly >for the "Edit layout" screen in Patroncards. > >_TEST PLAN_ > >Before applying: >0) Create a new layout >1) Edit the layout, change the units, and click Save >2) Edit the layout again, and notice the units are still "PostScript Points" > >Apply the patch: >3) Edit the layout again, change the units, and click Save >4) Edit the layout again, note that the units have changed to your >selection > >5) Rejoice >--- > patroncards/edit-layout.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/patroncards/edit-layout.pl b/patroncards/edit-layout.pl >index e28dda3..da8b298 100755 >--- a/patroncards/edit-layout.pl >+++ b/patroncards/edit-layout.pl >@@ -141,6 +141,12 @@ if ($op eq 'edit') { > push @barcode, (($barcode_param eq 'type' ? ("barcode_" . $barcode_param => _set_selected($layout_xml->{'barcode'}->[0]->{'barcode_type'}, $barcode_types)) : ("barcode_" . $barcode_param => $layout_xml->{'barcode'}->[0]->{$barcode_param}))); > } > >+ foreach my $unit (@$units){ >+ if ($unit->{'type'} eq $layout->get_attr('units')) { >+ $unit->{'selected'} = 1; >+ } >+ } >+ > $template->param( > layout_id => $layout->get_attr('layout_id') > -1 ? $layout->get_attr('layout_id') : '', > layout_name => $layout->get_attr('layout_name'), >@@ -212,6 +218,7 @@ elsif ($op eq 'save') { > } > $layout->{'text'} = $text_lines; > my @params = (layout_name => $layout_name, layout_id => $layout_id, layout_xml => XMLout($layout)); >+ push(@params,units => $layout->{'units'}) if $layout->{'units'}; > if ($layout_id) { # if a label_id was passed in, this is an update to an existing layout > $layout = C4::Patroncards::Layout->retrieve(layout_id => $layout_id); > $layout->set_attr(@params); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14366
:
40010
|
40085
|
40168