Bugzilla – Attachment 161818 Details for
Bug 36017
Dead code in admin/clone-rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36017: Remove dead code in admin/clone-rules
Bug-36017-Remove-dead-code-in-adminclone-rules.patch (text/plain), 4.35 KB, created by
Owen Leonard
on 2024-02-07 15:51:31 UTC
(
hide
)
Description:
Bug 36017: Remove dead code in admin/clone-rules
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-02-07 15:51:31 UTC
Size:
4.35 KB
patch
obsolete
>From 57067e845552c3e377ddfae88ea900d40eb6b513 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Feb 2024 15:42:40 +0100 >Subject: [PATCH] Bug 36017: Remove dead code in admin/clone-rules > >Since > commit 61628c97c245e72c750b61d9df6fa9b9100f3093 > Bug 18936: (follow-up) Add cloning of circulation rules back to Koha > >There are some dead code in admin/clone-rules. > >"result" is always passed to the template. > >Test plan: >Confirm the above and that cloning rules from the circ rules page still >works correctly. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > admin/clone-rules.pl | 3 -- > .../prog/en/modules/admin/clone-rules.tt | 52 ++++--------------- > 2 files changed, 10 insertions(+), 45 deletions(-) > >diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl >index 9dc78d8094..6700055bcf 100755 >--- a/admin/clone-rules.pl >+++ b/admin/clone-rules.pl >@@ -59,8 +59,5 @@ if ($frombranch && $tobranch && $frombranch ne $tobranch) { > $template->param(error => 1); > } > >-$template->param(result => 1); >- >- > output_html_with_http_headers $input, $cookie, $template->output; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt >index c3c1eefeef..8d6c09e371 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt >@@ -37,49 +37,17 @@ > <main> > [% INCLUDE 'messages.inc' %] > >- <h1>Cloning circulation and fine rules >- [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %] >- [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %] >- </h1> >+ <h1>Cloning circulation and fine rules >+ [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %] >+ [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %] >+ </h1> > >- [% IF ( result ) %] >- [% IF ( error ) %] >- <div class="dialog alert">Cloning of circulation and fine rules failed!</div> >- [% ELSE %] >- <div class="dialog message"><p>The rules have been cloned.</p></div> >- [% END %] >- <a href="/cgi-bin/koha/admin/smart-rules.pl">Return to circulation and fine rules</a> >- [% ELSE %] >- >- <p class="help">Use carefully! If the destination library already has circulation and fine rules, they will be deleted without warning!</p> >- <form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"> >- [% UNLESS ( frombranch ) %] >- <fieldset> >- <legend>Please choose a library to clone rules from:</legend> >- <label for="frombranch">Source library:</label> >- <select name="frombranch" id="frombranch"> >- <option value="">Default</option> >- [% PROCESS options_for_libraries libraries => Branches.all() %] >- </select> >- [% IF ( tobranch ) %]<input type="hidden" name="tobranch" value="[% tobranch | html %]" />[% END %] >- </fieldset> >- [% END %] >- >- [% UNLESS ( tobranch ) %] >- <fieldset> >- <legend>Please choose the library to clone the rules to:</legend> >- <label for="tobranch">Destination library:</label> >- <select name="tobranch" id="tobranch"> >- <option value="">Default</option> >- [% PROCESS options_for_libraries libraries => Branches.all() %] >- </select> >- [% IF ( frombranch ) %]<input type="hidden" name="frombranch" value="[% frombranch | html %]" />[% END %] >- </fieldset> >- [% END %] >- <input type="submit" class="btn btn-primary" value="Submit" /> >- </form> >- >- [% END %] >+ [% IF ( error ) %] >+ <div class="dialog alert">Cloning of circulation and fine rules failed!</div> >+ [% ELSE %] >+ <div class="dialog message"><p>The rules have been cloned.</p></div> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/smart-rules.pl">Return to circulation and fine rules</a> > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> > >-- >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 36017
:
161809
|
161818
|
161950