Bug 23590: Cleaning - Remove op_* vars
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 6 Nov 2019 18:17:32 +0000 (19:17 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 25 Mar 2020 09:34:32 +0000 (09:34 +0000)
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
suggestion/suggestion.pl

index 4d3bda8..468fab5 100644 (file)
@@ -9,7 +9,7 @@
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions  &rsaquo;
-    [% IF ( op_save ) %]
+    [% IF op == 'save' %]
         [% IF ( suggestionid ) %]
             Suggestions &rsaquo;  Edit suggestion #[% suggestionid | html %]
         [% ELSE %]
@@ -22,9 +22,7 @@
     [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-[% IF ( op_else ) %]
-[% END %]
-[% IF ( op_else ) %]
+[% IF op == 'else' %]
     <style>
         h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
         .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } div.note { background: transparent none; border-style: dotted; border-width: 1px 0 0 0; font-size : 90%; padding: 2px 0 0 0; } div.note i { color: #CCC; }
@@ -37,7 +35,7 @@
 [% INCLUDE 'cat-search.inc' %]
 <div id="breadcrumbs">
     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
-    [% IF ( op_save ) %]
+    [% IF op == 'save' %]
         [% IF ( suggestionid ) %]
             <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;  Edit suggestion #[% suggestionid | html %]
         [% ELSE %]
 </div>
 [% ELSE %]
 
-[% IF ( op_save ) %]
+[% IF op == 'save' %]
     <div class="main container-fluid">
         <div class="row">
             <div class="col-md-8 col-md-offset-2">
 
 [% END %]
 
-[% IF ( op_save ) %]
+[% IF op == 'save' %]
     [% FOR m IN messages %]
         <div class="dialog [% m.type | html %]">
             [% SWITCH m.code %]
     </form>
 [% END %]
 
-[% IF ( op_else ) %]
+[% IF op == 'else' %]
 <div id="toolbar" class="btn-toolbar">
     <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
 </div>
 [% END %]
 [% END %]
 
-[% UNLESS ( op_save ) %]
+[% UNLESS op == 'save' %]
     [% UNLESS ( op == 'show' ) %]
 
             </main>
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
-    [% IF ( op == 'show' || op_else ) %]
+    [% IF ( op == 'show' || op == 'else' ) %]
         <script>
             $(document).ready(function(){
                 $(".deletesuggestion").on("click",function(){
             });
         </script>
     [% END %]
-    [% IF ( op_else ) %]
+    [% IF op == 'else' %]
         [% INCLUDE 'datatables.inc' %]
         [% INCLUDE 'columns_settings.inc' %]
         [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
             });
         </script>
     [% END %]
-    [% IF ( op_save )  %]
+    [% IF op == 'save'  %]
         <script>
 
             function editManagerPopup() {
index b1c9af8..c93aead 100755 (executable)
@@ -334,7 +334,6 @@ $template->param(
 
 $template->param(
     %$suggestion_ref,
-    "op_$op"                => 1,
     "op"             =>$op,
 );