LP#1319519 Add to PO limits to new/pending PO's user/berick/lp1319519-add-to-po-limit-state
authorBill Erickson <berick@esilibrary.com>
Wed, 14 May 2014 18:43:56 +0000 (14:43 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 14 May 2014 18:51:01 +0000 (14:51 -0400)
Limit the auto-select output of the PO name text box when adding
records/lineitems to existing PO's to PO's with the "new" or "pending"
statuses.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/acq/common/add_to_po.tt2

index 370bd28..724cac7 100644 (file)
@@ -44,7 +44,9 @@
                 <tr>
                     <td><label>[% l('Enter the PO Name: ') %]</label></td>
                     <td>
-                        <input jsId="addToPoInput" dojoType="openils.widget.PCrudAutocompleteBox" fmclass="acqpo" searchAttr="name" name="target_po" />
+                        <input jsId="addToPoInput" dojoType="openils.widget.PCrudAutocompleteBox" 
+                          store_options="{base_filter:{state:['new','pending']}}"
+                          fmclass="acqpo" searchAttr="name" name="target_po" />
 
                         </td>
                 </tr>