Bug 5349: (follow-up) tweak order transfer form
authorGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 15:21:07 +0000 (15:21 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 15:21:07 +0000 (15:21 +0000)
This patch implements some of the suggestions made
by Owen Leonard and brings the form closer in line
with other popup forms.  In particular:

- sets dimensions for the popup so that clicking on the
  link is more likely to open a new browser window, not
  a tab.
- ensures that the vendor search form is always visible
- adds a cancel link to make it more clear to library
  staff that they can abort the process.
- tweaks markup to better match the patron guarantor
  popup search form

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

acqui/transferorder.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt

index 2c077fb..04e11e6 100755 (executable)
@@ -122,10 +122,6 @@ if( $basketno && $ordernumber) {
             do_search => 1,
             booksellersloop => \@booksellers,
         );
-    } else {
-        $template->param(
-            search_form => 1,
-        );
     }
 }
 
index 08a7ff4..67e299d 100644 (file)
@@ -66,7 +66,7 @@
             function transfer_order_popup(ordernumber) {
                 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
                     + "ordernumber=" + ordernumber
-                window.open(url, 'TransferOrder');
+                window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
             }
 
 //]]>
index c44b583..3671632 100644 (file)
@@ -1,6 +1,9 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Transfer order</title>
 [% INCLUDE 'doc-head-close.inc' %]
+    <style type="text/css">
+    #custom-doc { width:44.46em;*width:43.39em;min-width:578px; margin:auto; text-align:left; }
+    </style>
 [% IF transferred %]
     <script type="text/javascript">
     //<![CDATA[
     </script>
 [% END %]
 </head>
-<body>
+<body id="order_transfer_page">
 
-<div id="doc3" class="yui-t2">
-<div id="bd">
-<div id="yui-main">
-    <div class="yui-b">
+<div id="custom-doc" class="yui-t7">
+   <div id="bd">
+    <div class="yui-g">
+        [% IF ( bookselleridfrom ) %]
+            <h3>Search for a vendor to transfer to</h3>
+        [% ELSE %]
+            <h3>Search for a vendor to transfer from</h3>
+        [% END %]
+        <form method="get" action="transferorder.pl">
+            <fieldset>
+            <input type="hidden" name="op" value="do_search" />
+            [% IF ( ordernumber ) %]
+                <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
+            [% END %]
+            [% IF ( bookselleridfrom ) %]
+                <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom %]" />
+            [% END %]
+            <label for="query">Vendor:</label>
+            <input type="text" name="query" />
+            <input type="submit" value="Search" />
+            </fieldset>
+        </form>
         [% IF ( show_baskets ) %]
-            <h1>Baskets for [% booksellertoname %]</h1>
+            <h3>Baskets for [% booksellertoname %]</h3>
             [% IF ( basketsloop ) %]
                 <table>
                     <thead>
@@ -42,7 +63,7 @@
             [% END %]
         [% END %]
         [% IF ( ordersloop ) %]
-            <h1>Orders for [% booksellerfromname %]</h1>
+            <h3>Orders for [% booksellerfromname %]</h3>
             <table>
                 <thead>
                     <th>Order</th>
@@ -67,9 +88,9 @@
         [% END %]
         [% IF ( do_search ) %]
             [% IF ( bookselleridfrom ) %]
-                <h1>Choose a vendor to transfer to</h1>
+                <h3>Choose a vendor to transfer to</h3>
             [% ELSE %]
-                <h1>Choose a vendor to transfer from</h1>
+                <h3>Choose a vendor to transfer from</h3>
             [% END %]
             [% IF ( booksellersloop ) %]
                 <table>
                 <p>No results found.</p>
             [% END %]
         [% END %]
-        [% IF ( search_form ) %]
-            [% IF ( bookselleridfrom ) %]
-                <h1>Search for a vendor to transfer to</h1>
-            [% ELSE %]
-                <h1>Search for a vendor to transfer from</h1>
-            [% END %]
-            <form method="get" action="transferorder.pl">
-                <input type="hidden" name="op" value="do_search" />
-                [% IF ( ordernumber ) %]
-                    <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
-                [% END %]
-                [% IF ( bookselleridfrom ) %]
-                    <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom %]" />
-                [% END %]
-                <label for="query">Vendor:</label>
-                <input type="text" name="query" />
-                <input type="submit" value="Search" />
-            </form>
-        [% END %]
-    </div>
 </div>
 
+<div id="closewindow"><a href="#" class="close">Cancel</a></div>
 </div>
 </div>
 [% INCLUDE 'intranet-bottom.inc' %]