TPac; disallow certain actions for captured holds collab/berick/lp_888239_prevent_post-capture_hold_suspend
authorBill Erickson <berick@esilibrary.com>
Wed, 9 Nov 2011 20:55:50 +0000 (15:55 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 9 Nov 2011 20:57:37 +0000 (15:57 -0500)
In the hold edit page, where users can update the pickup library,
suspend holds, etc. disallow actions that don't make sense for holds
that have already been captured.  These include suspending the hold and
changing the expire time.

This patch also replaces the confusing "Cancel" button in the hold edit
interface (which does not cancel the hold) with a "Go Back" button which
returns to the holds list.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/myopac/holds/edit.tt2

index 7ba1528..fc2d3d9 100644 (file)
@@ -46,6 +46,9 @@
                                 name='pickup_lib' value=ahr.pickup_lib %]
                         </td>
                     </tr>
+                    [% IF hold.hold.status < 3 %]
+                    [%# The following actions cannot be performed on holds that 
+                        have already been captured... %]
                     <tr>
                         <th>
                             [% l('Cancel unless filled by') %]
                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
                         </td>
                     </tr>
+                    [% END %]
                     <tr>
                         <td colspan="2" class="hold-editor-controls">
-                            <input type="submit"
-                                value="[% l('Submit') %]"
-                                class="opac-button" />
-                            <input type="reset"
-                                value="[% l('Cancel') %]"
-                                class="opac-button" />
+                            <a href="[% ctx.opac_root %]/myopac/holds"><button 
+                                class="opac-button">[% l('Go Back') %]</button></a>
+                            <input type="submit" value="[% l('Submit') %]" class="opac-button" />
                         </td>
                     </tr>
                 </table>