Bugzilla – Attachment 58241 Details for
Bug 15415
Warn when creating new printer profile for patron card creator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15415: Warn when creating a new print profile
Bug-15415-Warn-when-creating-a-new-print-profile.patch (text/plain), 1.46 KB, created by
Marc Véron
on 2016-12-16 10:09:58 UTC
(
hide
)
Description:
Bug 15415: Warn when creating a new print profile
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-12-16 10:09:58 UTC
Size:
1.46 KB
patch
obsolete
>From 5487d1da0a8d8ec57c7b9048956d435106f127db Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 2 Dec 2016 03:04:07 +0000 >Subject: [PATCH] Bug 15415: Warn when creating a new print profile >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >As per Jonathan's comment in Comment 3, I've put that line of code in an >if statement that will only call the get_attr method if we are editing >an existing profile (therefore the profile id will exist). > >To test: >1) Go to Tools -> Patron Card Creator -> New printer profile >2) Notice warn >3) Apply patch >4) Refresh page >5) Confirm warn is gone and page still works as expected > >Sponsored-by: Catalyst IT > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > patroncards/edit-profile.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/patroncards/edit-profile.pl b/patroncards/edit-profile.pl >index 55e903c..0dc312f 100755 >--- a/patroncards/edit-profile.pl >+++ b/patroncards/edit-profile.pl >@@ -88,7 +88,9 @@ foreach my $unit (@$units) { > } > } > >-$template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0; >+if ($profile_id) { # if new layout, there will be no profile id, so shouldn't look for it >+ $template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0; >+} > > $template->param( > label_template => $label_template[0]->{'template_code'} || '', >-- >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 15415
:
46760
|
47567
|
57876
|
58241
|
58316