reindenting
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 17 Nov 2009 14:07:29 +0000 (15:07 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 17 Nov 2009 15:27:13 +0000 (16:27 +0100)
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
suggestion/suggestion.pl

index 1784a29..e0d9e4d 100755 (executable)
@@ -3,38 +3,38 @@
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <!--TMPL_IF Name="op_else"--> <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/JavaScript">
- // <![CDATA[
+// <![CDATA[
 
-       function yuiToolbar() {
-           new YAHOO.widget.Button("newsuggestion");
-       }
-  $.tablesorter.addParser({
-      id: 'articles', 
-      is: function(s) {return false;  }, 
-      format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
-      type: 'text' 
-  });
-  /**
-   *  displayOther.
-   *  This function display the select or an textaera to write a reason.
-   */
-  function displayOther(id,show,hide) {$("#"+hide+id).hide(); $("#"+show+id).show(); }
-  $(document).ready(function() {
-         yuiToolbar();
-      $('#suggestiontabs > ul').tabs({
-       select: function(ui) {
+    function yuiToolbar() {
+        new YAHOO.widget.Button("newsuggestion");
+    }
+$.tablesorter.addParser({
+    id: 'articles', 
+    is: function(s) {return false;  }, 
+    format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
+    type: 'text' 
+});
+/**
+*  displayOther.
+*  This function display the select or an textaera to write a reason.
+*/
+function displayOther(id,show,hide) {$("#"+hide+id).hide(); $("#"+show+id).show(); }
+$(document).ready(function() {
+    yuiToolbar();
+    $('#suggestiontabs > ul').tabs({
+        select: function(ui) {
             $("#loadingtab").show();
         },
         show: function(ui) {
             $("#loadingtab").hide();
         }
-       });
+        });
     $.tablesorter.defaults.widgets = ['zebra'];
 
 <!--TMPL_LOOP Name="suggestions"-->
     $("#<!--TMPL_VAR Name="suggestiontype"-->t").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
     dateFormat: 'uk',<!-- /TMPL_IF -->
-      headers: {0:{sorter: false}, 1: { sorter: 'articles' },5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false},9:{sorter: false},10:{sorter: false}}
+    headers: {0:{sorter: false}, 1: { sorter: 'articles' },5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false},9:{sorter: false},10:{sorter: false}}
     });
     $("#CheckAll<!--TMPL_VAR Name="suggestiontype"-->").click(function(){
         $("#<!--TMPL_VAR Name="suggestiontype"-->t :checkbox").attr('checked', $("#CheckAll<!--TMPL_VAR Name="suggestiontype"-->").is(':checked'));
     $("div[id*=other_reason<!--TMPL_VAR Name="suggestiontype"-->]").hide();
     $("input[name*=other_reason<!--TMPL_VAR Name="suggestiontype"-->]").focus(function(){ $(this).val(""); });
     $("select[name*=reason<!--TMPL_VAR Name="suggestiontype"-->]").change(function(){
-      if($(this).children("[selected]").val() == "other"){
-      displayOther($(this).attr("name").replace(/reason/,""),"other_reason<!--TMPL_VAR Name="suggestiontype"-->","select-reason<!--TMPL_VAR Name="suggestiontype"-->");
-      }
+    if($(this).children("[selected]").val() == "other"){
+    displayOther($(this).attr("name").replace(/reason/,""),"other_reason<!--TMPL_VAR Name="suggestiontype"-->","select-reason<!--TMPL_VAR Name="suggestiontype"-->");
+    }
     });
 <!--/TMPL_LOOP-->
     $("a[href*=back]").click(function(){
-      var sid = $(this).attr("href").replace(/#back/,"");
-      displayOther(sid,"select-reason","other_reason");
-      $("#reason"+sid).find("option[value='']").attr("selected","selected");
+    var sid = $(this).attr("href").replace(/#back/,"");
+    displayOther(sid,"select-reason","other_reason");
+    $("#reason"+sid).find("option[value='']").attr("selected","selected");
     });
-  }); 
+}); 
 // ]]>
 </script>
 <style type="text/css">
 <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; <!-- TMPL_IF name="op_save" --><!-- TMPL_IF name="suggestionid" -->Suggestion edit #<!-- TMPL_VAR name="suggestionid" --><!--TMPL_ELSE-->New purchase suggestion<!-- /TMPL_IF --><!--TMPL_ELSE-->Suggestions<!-- /TMPL_IF --> </div>
 
 <div id="doc3" class="yui-t2">
-   <div id="bd">
-       <div id="yui-main">
-       <div class="yui-b">
+<div id="bd">
+    <div id="yui-main">
+    <div class="yui-b">
 <!-- TMPL_IF name="op_save" -->
     <form id="add_edit" action="suggestion.pl" method="post">
-<!-- TMPL_IF name="suggestionid" -->
-    <h1>Edit purchase suggestion #<!-- TMPL_VAR name="suggestionid" --></h1>
-    <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR name="suggestionid" -->"/>
-<!--TMPL_ELSE-->  
-    <h1>Enter a new purchase suggestion</h1>
-<!--/TMPL_IF-->    
-   <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
-    <li><label for="title">Title:</label><input type="text" id="title" name="title" size="50" maxlentgh="80" value="<!--TMPL_VAR Name="title"-->"/></li>
-    <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="<!--TMPL_VAR Name="author"-->"/></li>
-    <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="<!--TMPL_VAR Name="copyrightdate"-->" /></li>
-    <li><label for="isbn">ISBN or ISSN or other standard number:</label></label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="<!--TMPL_VAR Name="isbn"-->"/></li>
-    <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="<!--TMPL_VAR Name="publishercode"-->"/></li>
-    <li><label for="place">Publication Place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="<!--TMPL_VAR Name="place"-->"/></li>
-    <li><label for="collectiontitle">Collection Title :</label></label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="<!--TMPL_VAR Name="collectiontitle"-->"/></li>
-    <li><label for="itemtype">Document Type :</label><select name="itemtype" >
-      <!--TMPL_LOOP Name="itemtypeloop"--><!--TMPL_IF Name="selected"--><option selected="selected" value="<!--TMPL_VAR Name="code" -->"><!--TMPL_ELSE--><option value="<!--TMPL_VAR Name="code" -->"><!--/TMPL_IF--><!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF --><!--TMPL_VAR Name="description" --></option>
-      <!--/TMPL_LOOP-->
-        </select></li>
-    <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40" value="<!--TMPL_VAR Name="note"-->"></textarea></li>       
-    <li><label for="sort1">Sort1:</label><textarea name="sort1" id="sort1" rows="5" cols="40" value="<!--TMPL_VAR Name="sort1"-->"></textarea></li>       
-    </ol></fieldset>
-   <fieldset class="rows"> <legend>Suggestion management</legend><ol>
-    <!--TMPL_IF Name="suggestionid"--><li><label for="status"> status :</label><select name="status"><option value="">No Status</option>
-<!-- TMPL_LOOP name="status_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP --></select><!--/TMPL_IF-->
-       <table>
-       <thead><th>&nbsp;</th><th>date</th><th>by</th></thead>
-       <tbody>
-    <tr><td>Suggestion creation </td><td><input type="text" id="createdon" name="createdon" size="10" maxlentgh="10" value="<!--TMPL_VAR Name="createdon"-->"/></td>
-    <td><input type="hidden" id="suggestedby" name="suggestedby" value="<!--TMPL_VAR Name="suggestedby"-->"/><!-- TMPL_IF NAME="guarantorid" --><input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" /><!-- TMPL_ELSE --><input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl');" /><!-- /TMPL_IF -->
-            <input id="guarantordelete" type="button" value="Delete" /><!--TMPL_VAR Name="suggestedbyinformation"-->
-       </td>
-       </tr>
-    <tr><td>Suggestion management </td><td><input type="text" id="managedon" name="managedon" size="10" maxlength="10" value="<!--TMPL_VAR Name="managedon"-->" /></td>
-    <td><input type="hidden" id="managedby" name="managedby" value="<!--TMPL_VAR Name="managedby"-->"/><!--TMPL_VAR Name="managedbyinformation"--></td></tr>
-    <tr><td>Suggestion Accepted </td><td><input type="text" id="acceptedon" name="acceptedon" size="10" maxlength="10" value="<!--TMPL_VAR Name="acceptedon"-->" /></td>
-    <td><input type="hidden" id="acceptedby" name="acceptedby" value="<!--TMPL_VAR Name="acceptedby"-->"/><!--TMPL_VAR Name="acceptedbyinformation"--></td></tr>
-       </tbody>
-       </table>
-   </fieldset>   
-   <fieldset class="rows"> <legend>Acquisition information</legend><ol>
-    <li><label for="branchcode">Branchcode:</label> 
-        <select name="branchcode" id="branchcode">
-            <option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
-            <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-        </select>
+    <!-- TMPL_IF name="suggestionid" -->
+        <h1>Edit purchase suggestion #<!-- TMPL_VAR name="suggestionid" --></h1>
+        <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR name="suggestionid" -->"/>
+    <!--TMPL_ELSE-->  
+        <h1>Enter a new purchase suggestion</h1>
+    <!--/TMPL_IF-->    
+    <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
+        <li><label for="title">Title:</label><input type="text" id="title" name="title" size="50" maxlentgh="80" value="<!--TMPL_VAR Name="title"-->"/></li>
+        <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="<!--TMPL_VAR Name="author"-->"/></li>
+        <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="<!--TMPL_VAR Name="copyrightdate"-->" /></li>
+        <li><label for="isbn">ISBN or ISSN or other standard number:</label></label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="<!--TMPL_VAR Name="isbn"-->"/></li>
+        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="<!--TMPL_VAR Name="publishercode"-->"/></li>
+        <li><label for="place">Publication Place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="<!--TMPL_VAR Name="place"-->"/></li>
+        <li><label for="collectiontitle">Collection Title :</label></label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="<!--TMPL_VAR Name="collectiontitle"-->"/></li>
+        <li><label for="itemtype">Document Type :</label>
+            <select name="itemtype" >
+            <!--TMPL_LOOP Name="itemtypeloop"-->
+                <!--TMPL_IF Name="selected"--><option selected="selected" value="<!--TMPL_VAR Name="code" -->"><!--TMPL_ELSE--><option value="<!--TMPL_VAR Name="code" -->"><!--/TMPL_IF-->
+                <!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
+                <!--TMPL_VAR Name="description" --></option>
+            <!--/TMPL_LOOP-->
+            </select>
+        </li>
+        <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40" value="<!--TMPL_VAR Name="note"-->"></textarea></li>
+        <li><label for="sort1">Sort1:</label><textarea name="sort1" id="sort1" rows="5" cols="40" value="<!--TMPL_VAR Name="sort1"-->"></textarea></li>
+        </ol>
+    </fieldset>
+    <fieldset class="rows"> <legend>Suggestion management</legend><ol>
+        <!--TMPL_IF Name="suggestionid"-->
+            <li><label for="status"> status :</label><select name="status"><option value="">No Status</option>
+                <!-- TMPL_LOOP name="status_loop" -->
+                    <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF -->
+                <!-- /TMPL_LOOP -->
+            </select>
+        <!--/TMPL_IF-->
+        <table>
+            <thead><th>&nbsp;</th><th>date</th><th>by</th></thead>
+            <tbody>
+            <tr>
+                <td>Suggestion creation </td>
+                <td><input type="text" id="createdon" name="createdon" size="10" maxlentgh="10" value="<!--TMPL_VAR Name="createdon"-->"/></td>
+                <td><input type="hidden" id="suggestedby" name="suggestedby" value="<!--TMPL_VAR Name="suggestedby"-->"/>
+                    <!-- TMPL_IF NAME="guarantorid" -->
+                        <input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" />
+                    <!-- TMPL_ELSE -->
+                        <input id="guarantorsearch" type="button" value="Set to Patron" onclick="Dopopguarantor('guarantor_search.pl');" />
+                    <!-- /TMPL_IF -->
+                    <input id="guarantordelete" type="button" value="Delete" /><!--TMPL_VAR Name="suggestedbyinformation"-->
+                </td>
+            </tr>
+            <tr>
+                <td>Suggestion management </td>
+                <td><input type="text" id="managedon" name="managedon" size="10" maxlength="10" value="<!--TMPL_VAR Name="managedon"-->" /></td>
+                <td><input type="hidden" id="managedby" name="managedby" value="<!--TMPL_VAR Name="managedby"-->"/><!--TMPL_VAR Name="managedbyinformation"--></td>
+            </tr>
+            <tr>
+                <td>Suggestion Accepted </td>
+                <td><input type="text" id="acceptedon" name="acceptedon" size="10" maxlength="10" value="<!--TMPL_VAR Name="acceptedon"-->" /></td>
+                <td><input type="hidden" id="acceptedby" name="acceptedby" value="<!--TMPL_VAR Name="acceptedby"-->"/><!--TMPL_VAR Name="acceptedbyinformation"--></td>
+            </tr>
+            </tbody>
+        </table>
+    </fieldset>
+    <fieldset class="rows"> <legend>Acquisition information</legend><ol>
+        <li><label for="branchcode">Branchcode:</label> 
+            <select name="branchcode" id="branchcode">
+                <option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
+                <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+            </select>
+        </li>
+        <li><label for="budgetid">Budget:</label>
+            <select name="budgetid" id="budgetid">
+                <option value="">Any</option><!-- TMPL_LOOP name="budgetsloop" -->
+                <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="budget_id" -->" selected="selected"><!-- TMPL_VAR name="budget_name" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="budget_id" -->"><!-- TMPL_VAR name="budget_name" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+            </select>
     </li>
-    <li><label for="budgetid">Budget:</label>
-        <select name="budgetid" id="budgetid">
-            <option value="">Any</option><!-- TMPL_LOOP name="budgetsloop" -->
-            <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="budget_id" -->" selected="selected"><!-- TMPL_VAR name="budget_name" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="budget_id" -->"><!-- TMPL_VAR name="budget_name" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-        </select>
-   </li>
-   </fieldset>   
-        <fieldset class="action"><input type="hidden" name="op" value="<!--TMPL_VAR Name="op"-->" /><!--TMPL_IF Name="suggestionid"--><input type="submit" value="Save" /><a class="action" href="suggestion.pl?suggestionid=<!--TMPL_VAR Name="suggestionid"-->">Cancel</a><!--TMPL_ELSE--><input type="submit" value="Submit Your Suggestion" /><a class="action" href="add.pl">Cancel</a><!--/TMPL_IF-->
-        </fieldset>
+    </fieldset>
+    <fieldset class="action"><input type="hidden" name="op" value="<!--TMPL_VAR Name="op"-->" /><!--TMPL_IF Name="suggestionid"--><input type="submit" value="Save" /><a class="action" href="suggestion.pl?suggestionid=<!--TMPL_VAR Name="suggestionid"-->">Cancel</a><!--TMPL_ELSE--><input type="submit" value="Submit Your Suggestion" /><a class="action" href="add.pl">Cancel</a><!--/TMPL_IF-->
+    </fieldset>
     </form>
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF name="op_else" -->
-         <div id="toolbar">
-      <ul class="toolbar">
-       <li> <a id="newsuggestion" href="suggestion.pl?op=add">New purchase suggestion</a></li>
+    <div id="toolbar">
+    <ul class="toolbar">
+    <li> <a id="newsuggestion" href="suggestion.pl?op=add">New purchase suggestion</a></li>
     </ul></div>
 <!--Filter block-->
     <form name="suggestionfilter" action="suggestion.pl" method="get">
 <a onclick="javascript:if (document.getElementsByName('limits')[0].style.display=='none'){document.getElementsByName('limits')[0].style.display='block';} else {document.getElementsByName('limits')[0].style.display='none';}">Filters</a>
-                               <div style="display:none;" name="limits">
-                               <fieldset><legend> Bibliographic information : </legend>
+                <div style="display:none;" name="limits">
+                <fieldset><legend> Bibliographic information : </legend>
                     <label for="title"> Title :</label><input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" />
                     <label for="author"> Author :</label><input type="text" name="author" value="<!-- TMPL_VAR name="author"-->" />
                     <label for="isbn"> isbn :</label><input type="text" name="isbn" value="<!-- TMPL_VAR name="isbn"-->" /><br/>
                     <label for="collectiontitle"> Collection Title :</label><input type="text" name="collectiontitle" value="<!-- TMPL_VAR name="collectiontitle"-->" />
                 </fieldset>
                 <fieldset><legend> Suggestion information: </legend>
-                    <label for="status"> status :</label><select name="status"><option value="">Any</option>
-<!-- TMPL_LOOP name="status_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-                                                          </select><br/>
-                    <label for="suggestedby"> suggested By :</label><select name="suggestedby"><option value="">Any</option>
-<!-- TMPL_LOOP name="suggestedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-                                                                     </select>
-                    <label for="suggestedon"> suggested on :</label><br/>
-                    <label for="managedby"> management user :</label><select name="suggestionmanagedby"><option value="">Any</option>
-<!-- TMPL_LOOP name="suggestionmanagedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-                                                                     </select>
-                    <label for="managedon"> management date :</label><br/>
-                    <label for="acceptedby"> Accepted by :</label><select name="suggestionacceptedby"><option value="">Any</option>
-<!-- TMPL_LOOP name="suggestionacceptedby_loop" --><!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
-                                                     </select>
+                    <label for="status"> status :</label>
+                    <select name="status"><option value="">Any</option>
+                        <!-- TMPL_LOOP name="status_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+                    </select>
+                    <br/>
+                    <label for="suggestedby"> suggested By :</label>
+                    <select name="suggestedby"><option value="">Any</option>
+                        <!-- TMPL_LOOP name="suggestedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+                    </select>
+                    <label for="suggestedon"> suggested on :</label>
+                    <br/>
+                    <label for="managedby"> management user :</label>
+                    <select name="suggestionmanagedby"><option value="">Any</option>
+                        <!-- TMPL_LOOP name="suggestionmanagedby_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+                    </select>
+                    <label for="managedon"> management date :</label>
+                    <br/>
+                    <label for="acceptedby"> Accepted by :</label>
+                    <select name="suggestionacceptedby"><option value="">Any</option>
+                        <!-- TMPL_LOOP name="suggestionacceptedby_loop" --><!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="desc" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="desc" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+                    </select>
                     <label for="acceptedon"> Accepted on:</label>
                 </fieldset>
                 <fieldset ><legend> Acquistion information :</legend>
-                    <label for="bookfundid"> BookFund :</label><select name="bookfundid"><option value="">Any</option><!-- TMPL_LOOP name="bookfundsloop" -->
-        <!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundname" --></option><!-- /TMPL_IF -->
-      <!-- /TMPL_LOOP --></select>
-                    <label for="branchcode"> For :</label><select name="branchcode" id="branchcode">
-        <option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
-               <!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE --> <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF -->
-      <!-- /TMPL_LOOP --></select>
+                    <label for="bookfundid"> BookFund :</label>
+                    <select name="bookfundid"><option value="">Any</option><!-- TMPL_LOOP name="bookfundsloop" -->
+                        <!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundname" --></option><!-- /TMPL_IF -->
+                        <!-- /TMPL_LOOP -->
+                    </select>
+                    <label for="branchcode"> For :</label>
+                    <select name="branchcode" id="branchcode">
+                        <option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
+                            <!-- TMPL_IF NAME="selected" --> <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE --> <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF -->
+                            <!-- /TMPL_LOOP -->
+                    </select>
                 </fieldset>
-                               </div>
+                </div>
                 <label for="displayby">Organise By</label>
                 <select name="displayby" id="displayby">
-        <option value="">No tabs</option>
-        <option value="STATUS">status</option>
-        <option value="branchcode">Library</option>
-        <option value="itemtype">Item Type</option>
-        <option value="sort1">Sort1</option>
-        <option value="managedby">Managed by</option>
-        <option value="acceptedby">Accepted by</option>
-                                       </select><br/>
-                    <input type="submit" value="Search" />
+                    <option value="">No tabs</option>
+                    <option value="STATUS">status</option>
+                    <option value="branchcode">Library</option>
+                    <option value="itemtype">Item Type</option>
+                    <option value="sort1">Sort1</option>
+                    <option value="managedby">Managed by</option>
+                    <option value="acceptedby">Accepted by</option>
+                </select><br/>
+                <input type="submit" value="Search" />
             </form>
 <!--TMPL_UNLESS Name="notabs"-->        
-  <div id="sorting" class="overlay">Sorting...</div>
-  <div id="loadingtab" class="overlay">Loading tab...</div>
-  <div id="suggestiontabs" class="toptabs">
-  <ul class="ui-tabs-nav">
+<div id="sorting" class="overlay">Sorting...</div>
+<div id="loadingtab" class="overlay">Loading tab...</div>
+<div id="suggestiontabs" class="toptabs">
+<ul class="ui-tabs-nav">
 <!--TMPL_LOOP Name="suggestions"-->
 <!--TMPL_IF Name="first"--><li class="ui-tabs-selected"><!--TMPL_ELSE--><li><!--/TMPL_IF--><a href="suggestion.pl#<!--TMPL_VAR Name="suggestiontype"-->"><!--TMPL_IF Name="suggestiontypelabel"--><!--TMPL_VAR Name="suggestiontypelabel"--><!--TMPL_ELSE-->No name<!--/TMPL_IF--> (<!--TMPL_VAR Name="suggestionscount"-->)</a></li>
 <!--/TMPL_LOOP -->
     </ul>
-       </div>
+    </div>
 <!--/TMPL_UNLESS -->        
-  
- <!--TMPL_LOOP Name="suggestions"-->
-  <div id="<!--TMPL_VAR Name="suggestiontype"-->">
+
+<!--TMPL_LOOP Name="suggestions"-->
+<div id="<!--TMPL_VAR Name="suggestiontype"-->">
 <form name="f<!--TMPL_VAR Name="suggestiontype"-->" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#<!--TMPL_VAR Name="suggestiontype"-->">
 
 <!-- TMPL_IF NAME="suggestions_loop" -->
             <th>Budget</th>
             <th>Status</th>
     </thead>
-        <tbody><!-- TMPL_LOOP NAME="suggestions_loop" -->
+        <tbody>
+            <!-- TMPL_LOOP NAME="suggestions_loop" -->
             <!-- TMPL_IF name="even" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
                 <td>
                     <input type="checkbox" name="edit_field" value="<!--TMPL_VAR name="suggestionid" -->" />
                 </td>
-                <td><a href="suggestion.pl?suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&op=edit" title="suggestion" >
-    <!-- TMPL_VAR NAME="title" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></a><br />
+                <td>
+                    <a href="suggestion.pl?suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&op=edit" title="suggestion" >
+                        <!-- TMPL_VAR NAME="title" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
+                    </a>
+                    <br />
                     <!-- TMPL_IF name="copyrightdate" -->&copy; <!-- TMPL_VAR name="copyrightdate" --> <!-- /TMPL_IF -->
                         <!-- TMPL_IF name="volumedesc" -->; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i> <!-- /TMPL_IF -->
                         <!-- TMPL_IF name="isbn" -->; ISBN :<i><!-- TMPL_VAR name="isbn" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->; Published by <!-- TMPL_VAR name="publishercode" --> <!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR name="publicationyear" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="place" --> in <i><!-- TMPL_VAR name="place" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="collectiontitle" -->;<!-- TMPL_VAR name="collectiontitle" --> <!-- /TMPL_IF --><!-- TMPL_IF name="itemtype" -->;<!-- TMPL_VAR name="itemtype" --> <!-- /TMPL_IF --><br /><!-- TMPL_IF name="note" --><!-- TMPL VAR NAME="note" --><!-- /TMPL_IF --><!-- TMPL_IF name="sort1" -->;<!-- TMPL_VAR name="sort1" --> <!-- /TMPL_IF -->
                 <td>
                     <!-- TMPL_IF name="ASKED" -->Requested<!-- /TMPL_IF --> <!-- TMPL_IF name="ACCEPTED" -->Accepted<!-- /TMPL_IF --> <!-- TMPL_IF name="ORDERED" -->Ordered<!-- /TMPL_IF --> <!-- TMPL_IF name="REJECTED" -->Rejected<!-- /TMPL_IF --> <!-- TMPL_IF name="CHECKED" -->Checked<!-- /TMPL_IF --> <!-- TMPL_IF name="reason" --><br />(<!-- TMPL_VAR name="reason" -->)<!-- /TMPL_IF -->
                 </td>
-         </tr>
+        </tr>
         <!-- /TMPL_LOOP --></tbody>
         </table>  <fieldset>
-         <div id="select-reason<!-- TMPL_VAR NAME="suggestiontype" -->">
-     <label for="reason<!-- TMPL_VAR NAME="suggestiontype" -->">Choose a reason for all marked entries:</label>                 <select id="reason<!-- TMPL_VAR NAME="suggestiontype" -->" name="reason<!-- TMPL_VAR NAME="suggestiontype" -->">
-                      <option value=""> -- Choose a reason -- </option>
+    <div id="select-reason<!-- TMPL_VAR NAME="suggestiontype" -->">
+    <label for="reason<!-- TMPL_VAR NAME="suggestiontype" -->">Choose a reason for all marked entries:</label>                 <select id="reason<!-- TMPL_VAR NAME="suggestiontype" -->" name="reason<!-- TMPL_VAR NAME="suggestiontype" -->">
+                    <option value=""> -- Choose a reason -- </option>
                         <!--TMPL_LOOP Name="reasonsloop"-->
                         <option value="<!--TMPL_VAR Name="lib" -->"><!--TMPL_VAR Name="lib" --></option>
                         <!--/TMPL_LOOP-->
-                      <option value="other">Others...</option>
-                      </select>  
-      </div>
+                    <option value="other">Others...</option>
+                    </select>  
+    </div>
         <div id="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->">
-               <label for="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->">Enter a reason for all marked entries:</label>
-                       <input type="text" size="31" id="select-other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" name="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" value="please note your reason here..." /> <a href="#back<!-- TMPL_VAR NAME="suggestiontype" -->">Cancel</a>
-               </div>
-               <div id="status<!-- TMPL_VAR NAME="suggestiontype" -->">
-               <input type="radio" name="STATUS" value="ACCEPTED">Accept
-               <input type="radio" name="STATUS" value="CHECKED">Check
-               <input type="radio" name="STATUS" value="REJECTED">Reject
-               </div>
-               <div id="action<!-- TMPL_VAR NAME="suggestiontype" -->">
-               <input type="checkbox" onclick="javascript:if (this.checked){document.f<!-- TMPL_VAR NAME="suggestiontype" -->.op.value='delete';}else{document.f<!-- TMPL_VAR NAME="suggestiontype" -->.op.value='change'}"/> Delete
-               </div>
+        <label for="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->">Enter a reason for all marked entries:</label>
+            <input type="text" size="31" id="select-other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" name="other_reason<!-- TMPL_VAR NAME="suggestiontype" -->" value="please note your reason here..." /> <a href="#back<!-- TMPL_VAR NAME="suggestiontype" -->">Cancel</a>
+        </div>
+        <div id="status<!-- TMPL_VAR NAME="suggestiontype" -->">
+        <input type="radio" name="STATUS" value="ACCEPTED">Accept
+        <input type="radio" name="STATUS" value="CHECKED">Check
+        <input type="radio" name="STATUS" value="REJECTED">Reject
+        </div>
+        <div id="action<!-- TMPL_VAR NAME="suggestiontype" -->">
+        <input type="checkbox" onclick="javascript:if (this.checked){document.f<!-- TMPL_VAR NAME="suggestiontype" -->.op.value='delete';}else{document.f<!-- TMPL_VAR NAME="suggestiontype" -->.op.value='change'}"/> Delete
+        </div>
 
-       <input type="hidden" name="tabcode" value="<!-- TMPL_VAR NAME="suggestiontype" -->"/>
-       <input type="hidden" name="op" value="change"/>
-  </fieldset>
+    <input type="hidden" name="tabcode" value="<!-- TMPL_VAR NAME="suggestiontype" -->"/>
+    <input type="hidden" name="op" value="change"/>
+</fieldset>
         <fieldset class="action">
-       <input type="submit" value="Submit" /></fieldset>
+    <input type="submit" value="Submit" /></fieldset>
 </form>
 <!-- TMPL_ELSE -->
     <b>No Results.</b>
 <!-- /TMPL_IF -->
 </div>
 <!--/TMPL_LOOP-->
-       </div>
-       </div>
+    </div>
+    </div>
 
 </div>
 <!--TMPL_INCLUDE Name="intranet-bottom.inc"-->
index bac81ac..db54654 100755 (executable)
@@ -35,12 +35,12 @@ sub Init{
         $suggestion->{$date}=(($suggestion->{$date} eq "0000-00-00" ||$suggestion->{$date} eq "")?
                                 $suggestion->{$date}=C4::Dates->today:
                                 format_date($suggestion->{$date}) 
-                              );
+                            );
     }               
     $suggestion->{'acceptedon'}=(($suggestion->{'acceptedon'} eq "0000-00-00" ||$suggestion->{'acceptedon'} eq "")?
                                 "":
                                 format_date($suggestion->{'acceptedon'}) 
-                              );
+                            );
     $suggestion->{'managedby'}=C4::Context->userenv->{"id"} unless ($suggestion->{'managedby'});
     $suggestion->{'createdby'}=C4::Context->userenv->{"id"} unless ($suggestion->{'createdby'});
     $suggestion->{'branchcode'}=C4::Context->userenv->{"branch"} unless ($suggestion->{'branchcode'});
@@ -53,7 +53,7 @@ sub GetCriteriumDesc{
     return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/);
     if ($displayby =~/managedby/||$displayby =~/acceptedby/){
         my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue);
-               return "" unless $borr;
+        return "" unless $borr;
 #              warn '$borr : ',Data::Dumper::Dumper($borr);
         return $$borr{firstname}.", ".$$borr{surname};
     }  
@@ -73,7 +73,7 @@ my $tabcode    = $input->param('tabcode');
 my $suggestion_ref  = $input->Vars;
 delete $$suggestion_ref{$_} foreach qw( suggestedbyme op displayby tabcode edit_field );
 foreach (keys %$suggestion_ref){
-       delete $$suggestion_ref{$_} if (!$$suggestion_ref{$_} && ($op eq 'else' || $op eq 'change'));
+    delete $$suggestion_ref{$_} if (!$$suggestion_ref{$_} && ($op eq 'else' || $op eq 'change'));
 }
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         {
@@ -89,18 +89,18 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 ##
 if ($op =~/save/i){
     if ($$suggestion_ref{'suggestionid'}>0){
-      &ModSuggestion($suggestion_ref);
+    &ModSuggestion($suggestion_ref);
     }  
     else {
         ###FIXME:Search here if suggestion already exists.
         my $suggestions_loop =
             SearchSuggestion( $suggestion_ref );
-           if (@$suggestions_loop>=1){
-                   #some suggestion are answering the request Donot Add        
-           } 
-           else {    
-               ## Adding some informations related to suggestion
-               &NewSuggestion($suggestion_ref);
+        if (@$suggestions_loop>=1){
+            #some suggestion are answering the request Donot Add       
+        } 
+        else {    
+            ## Adding some informations related to suggestion
+            &NewSuggestion($suggestion_ref);
         }
         # empty fields, to avoid filter in "SearchSuggestion"
     }  
@@ -119,24 +119,24 @@ elsif ($op=~/edit/) {
     $op ='save';
 }  
 elsif ($op eq "change" ) {
-       if ($$suggestion_ref{"STATUS"}){
-               my $tmpstatus=($$suggestion_ref{"STATUS"} eq "ACCEPTED"?"accepted":"managed");
-               $$suggestion_ref{"$tmpstatus"."on"}=C4::Dates->today;
-               $$suggestion_ref{"$tmpstatus"."by"}=C4::Context->userenv->{number};
-       }
-       if ( my $reason = $$suggestion_ref{"reason$tabcode"}){
-               if ( $reason eq "other" ) {
-                               $reason = $$suggestion_ref{"other_reason$tabcode"};
-               }
-               $$suggestion_ref{'reason'}=$reason;
-       }
-       delete $$suggestion_ref{$_} foreach ("reason$tabcode", "other_reason$tabcode");
-       foreach (keys %$suggestion_ref){
-               delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_});
-       }
+    if ($$suggestion_ref{"STATUS"}){
+        my $tmpstatus=($$suggestion_ref{"STATUS"} eq "ACCEPTED"?"accepted":"managed");
+        $$suggestion_ref{"$tmpstatus"."on"}=C4::Dates->today;
+        $$suggestion_ref{"$tmpstatus"."by"}=C4::Context->userenv->{id};
+    }
+    if ( my $reason = $$suggestion_ref{"reason$tabcode"}){
+        if ( $reason eq "other" ) {
+                $reason = $$suggestion_ref{"other_reason$tabcode"};
+        }
+        $$suggestion_ref{'reason'}=$reason;
+    }
+    delete $$suggestion_ref{$_} foreach ("reason$tabcode", "other_reason$tabcode");
+    foreach (keys %$suggestion_ref){
+        delete $$suggestion_ref{$_} unless ($$suggestion_ref{$_});
+    }
     foreach my $suggestionid (@editsuggestions) {
-               next unless $suggestionid;
-               $$suggestion_ref{'suggestionid'}=$suggestionid;
+        next unless $suggestionid;
+        $$suggestion_ref{'suggestionid'}=$suggestionid;
         &ModSuggestion($suggestion_ref);
     }
     $op = 'else';
@@ -149,7 +149,7 @@ elsif ($op eq "change" ) {
 if ($op=~/else/) {
     $op='else';
     
-       $displayby||="STATUS";
+    $displayby||="STATUS";
     my $criteria_list=GetDistinctValues("suggestions.".$displayby);
     my @allsuggestions;
     foreach my $criteriumvalue (map{$$_{'value'}} @$criteria_list){
@@ -174,27 +174,27 @@ if ($op=~/else/) {
                             "suggestiontypelabel"=>GetCriteriumDesc($criteriumvalue,$displayby)||"",
                             "suggestionscount"=>scalar(@$suggestions),             
                             'suggestions_loop'=>$suggestions,
-                                                       };
-               
+                            };
+
         delete $$suggestion_ref{$displayby} unless $definedvalue;
     }
     my $reasonsloop = GetAuthorisedValues("SUGGEST");
     $template->param(
-        "displayby"=> $displayby,        
-        "notabs"=> $displayby eq "",        
+        "displayby"=> $displayby,
+        "notabs"=> $displayby eq "",
         suggestions       => \@allsuggestions,
         reasonsloop       => $reasonsloop,
     );
 }
 
-foreach my $element qw<managedby createdby suggestedby rejectedby>{
-       warn $$suggestion_ref{$element};
-       if ($$suggestion_ref{$element}){
-               my $member=GetMember(borrowernumber=>$$suggestion_ref{$element});
-               my $presentation_string=$$member{firstname}." ".$$member{surname}." ".GetBranchName($$member{branchcode})." ".$$member{description}." ".$$member{category_type};
-               warn $presentation_string;
-               $template->param($element."information"=>$presentation_string);
-       }
+foreach my $element qw(managedby createdby suggestedby rejectedby){
+    $debug || warn $$suggestion_ref{$element};
+    if ($$suggestion_ref{$element}){
+        my $member=GetMember(borrowernumber=>$$suggestion_ref{$element});
+        my $presentation_string=$$member{firstname}." ".$$member{surname}." ".GetBranchName($$member{branchcode})." ".$$member{description}." ".$$member{category_type};
+        $debug || warn $presentation_string;
+        $template->param($element."information"=>$presentation_string);
+    }
 }
 $template->param(
     %$suggestion_ref,  
@@ -209,36 +209,36 @@ $template->param(
 
 #branch display management
 my $onlymine=C4::Context->preference('IndependantBranches') && 
-             C4::Context->userenv && 
-             C4::Context->userenv->{flags}!=1 && 
-             C4::Context->userenv->{branch};
+            C4::Context->userenv && 
+            C4::Context->userenv->{flags}!=1 && 
+            C4::Context->userenv->{branch};
 my $branches = GetBranches($onlymine);
 my @branchloop;
 
 foreach my $thisbranch ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches ) {
-     my %row = (
+    my %row = (
         value      => $thisbranch,
         branchname => $branches->{$thisbranch}->{'branchname'},
         selected   => ($branches->{$thisbranch}->{'branchcode'} eq $branchfilter)
-                      ||($branches->{$thisbranch}->{'branchcode'} eq $$suggestion_ref{'branchcode'})    
+                    ||($branches->{$thisbranch}->{'branchcode'} eq $$suggestion_ref{'branchcode'})    
     );
     push @branchloop, \%row;
 }
 $branchfilter=C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
 
 $template->param( branchloop => \@branchloop,
-                  branchfilter => $branchfilter);
+                branchfilter => $branchfilter);
 
 # the index parameter is different for item-level itemtypes
 my $supportlist=GetSupportList();                              
 foreach my $support(@$supportlist){
     $$support{'selected'}= $$support{'code'} eq $$suggestion_ref{'itemtype'};
-       if ($$support{'imageurl'}){
-               $$support{'imageurl'}= getitemtypeimagelocation( 'intranet', $$support{'imageurl'} );
-       }
-       else {
-          delete $$support{'imageurl'}
-       }
+    if ($$support{'imageurl'}){
+        $$support{'imageurl'}= getitemtypeimagelocation( 'intranet', $$support{'imageurl'} );
+    }
+    else {
+    delete $$support{'imageurl'}
+    }
 }
 $template->param(itemtypeloop=>$supportlist);
 
@@ -247,7 +247,7 @@ my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter;
 my $budgets = GetBudgets($searchbudgets);
 
 foreach (@$budgets){
-       $_->{'selected'}=1 if ($$suggestion_ref{'budget_id'} && $_{'budget_id'} eq $$suggestion_ref{'budget_id'})
+    $_->{'selected'}=1 if ($$suggestion_ref{'budget_id'} && $_{'budget_id'} eq $$suggestion_ref{'budget_id'})
 };
 
 $template->param( budgetsloop => $budgets);
@@ -257,11 +257,11 @@ foreach my $field qw(managedby acceptedby suggestedby STATUS){
     my $values_list;
     $values_list=GetDistinctValues("suggestions.".$field) ;
     my @codes_list = map{
-                                               { 'code'=>$$_{'value'},
-                                                 'desc'=>GetCriteriumDesc($$_{'value'},$field),
-                                                 'selected'=> $$_{'value'} eq $$suggestion_ref{$field}
-                                               }
-                                     } @$values_list;
+                        { 'code'=>$$_{'value'},
+                        'desc'=>GetCriteriumDesc($$_{'value'},$field),
+                        'selected'=> $$_{'value'} eq $$suggestion_ref{$field}
+                        }
+                    } @$values_list;
     $hashlists{lc($field)."_loop"}=\@codes_list;
 }
 $template->param(%hashlists);