Bugzilla – Attachment 33937 Details for
Bug 13215
letter.code is considered as a primary key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13215: Fix notice deletion
Bug-13215-Fix-notice-deletion.patch (text/plain), 4.19 KB, created by
Chris Cormack
on 2014-11-26 02:24:49 UTC
(
hide
)
Description:
Bug 13215: Fix notice deletion
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-11-26 02:24:49 UTC
Size:
4.19 KB
patch
obsolete
>From 8987839040fc09ba34f30b1e9e88c44bff6241bb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 21 Nov 2014 10:28:02 +0100 >Subject: [PATCH] Bug 13215: Fix notice deletion > >This patch could have only been >- name => $values[0]->{name}, >+ name => $letter->{name}, > >Other changes are just indentation and variable names (send an hashref >$letter to the template and use the Branches TT plugin to display the >branch name) > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 63 +++++++++++----------- > tools/letter.pl | 6 +-- > 2 files changed, 33 insertions(+), 36 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 7c68f22..cfda11c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -1,4 +1,5 @@ > [% USE Koha %] >+[% USE Branches %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -424,40 +425,40 @@ $(document).ready(function() { > <input type="submit" value="OK" /> > </form> > [% END %] >- >-[% IF ( delete_confirm ) %] >- <div class="dialog alert"><h3>Delete notice?</h3> >- <table> >- <thead> >- <tr> >- <th>Library</th> >- <th>Module</th> >- <th>Code</th> >- <th>Name</th> >- </tr> >- </thead> >- <tr> >- <td>[% branchname %]</td> >- <td>[% module %]</td> >- <td>[% code %]</td> >- <td>[% name %]</td> >- </tr> >- </table> >- <form action="[% action %]" method="post"> >- <input type="hidden" name="op" value="delete_confirmed"> >- <input type="hidden" name="branchcode" value="[% branchcode %]" /> >- <input type="hidden" name="code" value="[% code %]" /> >- <input type="hidden" name="module" value="[% module %]" /> >- <input type="submit" value="Yes, delete" class="approve" /> >- </form> > >- <form action="[% action %]" method="get"> >- <input type="submit" value="No, do not delete" class="deny" /> >- </form> >- </div> >+[% IF ( delete_confirm ) %] >+ <div class="dialog alert"> >+ <h3>Delete notice?</h3> >+ <table> >+ <thead> >+ <tr> >+ <th>Library</th> >+ <th>Module</th> >+ <th>Code</th> >+ <th>Name</th> >+ </tr> >+ </thead> >+ <tr> >+ <td>[% Branches.GetName( letter.branchcode ) %]</td> >+ <td>[% letter.module %]</td> >+ <td>[% letter.code %]</td> >+ <td>[% letter.name %]</td> >+ </tr> >+ </table> >+ <form action="[% action %]" method="post"> >+ <input type="hidden" name="op" value="delete_confirmed"> >+ <input type="hidden" name="branchcode" value="[% letter.branchcode %]" /> >+ <input type="hidden" name="code" value="[% letter.code %]" /> >+ <input type="hidden" name="module" value="[% letter.module %]" /> >+ <input type="submit" value="Yes, delete" class="approve" /> >+ </form> > >+ <form action="[% action %]" method="get"> >+ <input type="submit" value="No, do not delete" class="deny" /> >+ </form> >+ </div> > [% END %] >- >+ > [% IF ( delete_confirmed ) %] > Data deleted > <form action="[% action %]" method="post"> >diff --git a/tools/letter.pl b/tools/letter.pl >index 66d78be..4fcd8a8 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -289,11 +289,7 @@ sub delete_confirm { > my $letter = C4::Letters::getletter($module, $code, $branchcode); > my @values = values %$letter; > $template->param( >- branchcode => $branchcode, >- branchname => GetBranchName($branchcode), >- code => $code, >- module => $module, >- name => $values[0]->{name}, >+ letter => $letter, > ); > return; > } >-- >2.1.0
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 13215
:
33316
|
33637
|
33772
|
33773
|
33788
|
33909
|
33930
|
33931
|
33932
|
33933
|
33934
|
33935
|
33936
|
33937
|
33938
|
33939
|
33971
|
33972
|
33973
|
33974
|
33975
|
33995