Bug 12904: Force browser to load new javascript files after upgrade
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / uncertainprice.tt
index 7bbad51..4564bb3 100644 (file)
@@ -1,10 +1,9 @@
+[% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+[% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
 //<![CDATA[
  $(document).ready(function() {
         ],
         "sPaginationType": "four_button"
     } ) );
+    $(".check_uncertain").on("change",function(){
+        var form = document.getElementById("uncertainprices");
+        var ordernumber = $(this).data("ordernumber");
+        uncheckbox( form, ordernumber );
+    });
  });
+var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
  //]]>
 </script>
-<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
-<script type="text/javascript">
-//<![CDATA[
-function check(form) {
-    form.submit();
-}
-//]]>
-</script>
+<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
 </head>
 <body id="acq_uncertainprice" class="acq">
 [% INCLUDE 'header.inc' %]
@@ -40,7 +38,8 @@ function check(form) {
 
 [% INCLUDE 'acquisitions-toolbar.inc' %]
         [% IF ( validate ) %]
-            <META HTTP-EQUIV=Refresh CONTENT="0; url=[% scriptname %]?booksellerid=[% booksellerid %]">
+            [% SET metacontent = '0; url=' _  scriptname  _ '?booksellerid=' _  booksellerid %]
+            <META HTTP-EQUIV=Refresh CONTENT="[% metacontent %]">
         [% ELSE %]
         [% IF ( booksellername ) %]
             <h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a></h1>
@@ -57,14 +56,16 @@ function check(form) {
                 [% booksellerphone %] / Fax:
                 [% booksellerfax %]</p>
             <dl>
-                <dt><strong>Contact: </strong></dt>
-                <dd>[% booksellercontact %]
-                [% booksellercontpos %]
-                [% booksellercontphone %]
-                [% booksellercontaltphone %]
-                [% booksellercontemail %]
-                [% booksellercontnotes %]
-                </dd>
+                [% FOREACH contact IN contacts %]
+                    <dt><strong>Contact: </strong></dt>
+                    <dd>[% contact.name %]
+                        [% contact.position %]
+                        [% contact.phone %]
+                        [% contact.altphone %]
+                        [% contact.email %]
+                        [% contact.notes %]
+                    </dd>
+                [% END %]
             </dl>
             [% IF ( booksellernotes ) %]
             <p><strong>Notes: </strong>
@@ -73,10 +74,10 @@ function check(form) {
         [% END %]
 
         <h2>Orders with uncertain prices</h2>
-        <form action="[% scriptname %]" method="post" name="uncertainprices">
+        <form action="[% scriptname %]" method="post">
         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
-        Orders from:
-        <select name="owner">
+        <label for="owner">Orders from:</label>
+        <select id="owner" name="owner">
             [% IF ( owner ) %]
             <option value="0">Everyone</option>
             <option value="1" selected="selected">me</option>
@@ -87,7 +88,7 @@ function check(form) {
         </select>
         <input type="submit" value="Filter" />
         </form>
-        <form action="[% scriptname %]" method="post" name="uncertainprices">
+        <form action="[% scriptname %]" method="post" id="uncertainprices">
         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
         <input type="hidden" name="op" value="validate" />
         <table id="uncertainpricet">
@@ -108,11 +109,20 @@ function check(form) {
             [% uncertainpriceorder.basketname %]
         </td>
            <td>
-               [% uncertainpriceorder.bibtitle %] / [% uncertainpriceorder.bibauthor %] <br /> [% uncertainpriceorder.bibpublishercode %], [% uncertainpriceorder.bibpublicationyear %]<br />[% uncertainpriceorder.bibisbn %]<br />
-               <a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]">
-                   edit
-               </a>
-           </td>
+            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber %]">[% uncertainpriceorder.title |html %]</a>
+            [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author %][% END %]
+            [% IF ( uncertainpriceorder.publishercode ) %]
+                <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode %]
+                [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear %]
+                [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate %]
+                [% END %]
+            [% END %]
+            [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn %][% END %]
+            <br />
+            <a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]">
+                Edit
+            </a>
+        </td>
         <td>
             [% uncertainpriceorder.firstname %] [% uncertainpriceorder.surname %]
         </td>
@@ -120,19 +130,21 @@ function check(form) {
                <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber %]" value="1" checked="checked" />
            </td>
            <td>
-               <input type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]"
-                                               onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
+            <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]" />
            </td>
            <td>
-               
-               <input type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]"
-                                               onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
+        [% IF basket.effective_create_items == 'ordering' %]
+            [% uncertainpriceorder.quantity %]
+            <input type="hidden" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
+        [% ELSE %]
+            <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
+        [% END %]
            </td>
            </tr>
            [% END %]
     </tbody>
        </table>
-       <fieldset class="action"><input type="button" value="Save" onclick="check(this.form)" /></fieldset>
+    <fieldset class="action"><input type="submit" value="Save" /></fieldset>
        </form>
        [% END %]