Bugzilla – Attachment 137751 Details for
Bug 31137
Error editing label template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31137: Only display label printer profiles when editing labels
Bug-31137-Only-display-label-printer-profiles-when.patch (text/plain), 1.70 KB, created by
Nick Clemens (kidclamp)
on 2022-07-15 12:13:20 UTC
(
hide
)
Description:
Bug 31137: Only display label printer profiles when editing labels
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-07-15 12:13:20 UTC
Size:
1.70 KB
patch
obsolete
>From ed9b8690380315158f9d86846f4e85b9c88bf0e5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Adolfo=20Rodr=C3=ADguez?= <adolfo.rodriguez@xercode.es> >Date: Tue, 12 Jul 2022 09:20:45 +0200 >Subject: [PATCH] Bug 31137: Only display label printer profiles when editing > labels > >This patch filters the printer profiles in the label edition template so you may only choose Printer Profiles created for Labels. > >To test >1 Create a new Printer Profile in Patron Cards >2 Edit a Label template, pick the Printer Profile you just created. >3 Save the Label Template. You get an error 500 >4 apply patch, restart services >5 Edit a Label template and check that you can't pick the Printer Profile you created in Patron Cards > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > labels/label-edit-template.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/labels/label-edit-template.pl b/labels/label-edit-template.pl >index 9e6a019d09..5f6462b18f 100755 >--- a/labels/label-edit-template.pl >+++ b/labels/label-edit-template.pl >@@ -46,7 +46,7 @@ my $units = get_unit_values(); > > if ($op eq 'edit') { > $label_template = C4::Labels::Template->retrieve(template_id => $template_id); >- $profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => { template_id => [ $template_id, '' ] } } ); >+ $profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => { template_id => [ $template_id, '' ], creator => 'Labels'} } ); > push @$profile_list, {paper_bin => 'N/A', profile_id => 0, printer_name => 'No Profile'}; > foreach my $profile (@$profile_list) { > if ($profile->{'profile_id'} == $label_template->get_attr('profile_id')) { >-- >2.30.2
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 31137
:
137607
|
137749
|
137750
| 137751 |
137752