Bug 15766: (follow-up) Hide description field if the batch is empty
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / edit-batch.tt
index c92c52c..5b1780a 100644 (file)
@@ -44,7 +44,7 @@
                             <form name="add_by_bor_num" action="/cgi-bin/koha/patroncards/edit-batch.pl" method="post">
                                 <div>
                                     <fieldset class="rows" style="border-bottom: 0px; border: 0px;">
-                                    <ol><li>
+                                    <ol><li id="description">
                                         <input type="hidden" name="op" value="add" />
                                         <input type="hidden" name="batch_id" value="[% batch_id | html %]" />
                                         <label for="description">Batch description: </label>
         };
 
         $(document).ready(function() {
+            [% IF table_loop %]
+                $("#description").show();
+            [% ELSE %]
+                $("#description").hide();
+            [% END %]
             $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
                 "aoColumnDefs": [
                     { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false }