]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/holds/edit.tt2
Merge remote-tracking branch 'eg-working/collab/berick/lp_888239_prevent_post-capture...
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / holds / edit.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS "opac/parts/hold_status.tt2";
4     PROCESS "opac/parts/org_selector.tt2";
5     WRAPPER "opac/parts/myopac/base.tt2";
6     myopac_page = "holds"; # in this case, just for tab coloring.
7
8     hold = ctx.holds.0;
9     ahr = hold.hold.hold;
10     attrs = {marc_xml => hold.marc_xml};
11     PROCESS get_marc_attrs args=attrs;
12     hold.human_status = PROCESS get_hold_status hold=hold;
13
14     # Do this up front to avoid verbosity later
15     expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
16     thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
17 %]
18 <div class="pad-bottom-five">
19     <div class="header_middle">
20         <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
21         &nbsp; &nbsp; &nbsp; &nbsp;
22         <a href="[% ctx.opac_root %]/myopac/holds">[% l('List all holds') %]</a>
23     </div>
24     <div id="hold_editor">
25         [% IF hold %]
26             <h1>[% attrs.title | html %]</h1>
27             <h2>[% attrs.author | html %]</h2>
28             [% IF attrs.format_icon %]<p>
29                 <strong>[% l('Format:') %]</strong>
30                 <img src="[% attrs.format_icon %]" alt="[% attrs.format_label | html %]" title="[% attrs.format_label | html %]" />
31             </p>[% END %]
32             <p>
33                 <strong>[% l('Status') %]</strong>: [% hold.human_status %]
34             </p>
35             <form method="POST">
36                 <table id="hold_editor_table">
37                     <tr>
38                         <th>
39                             <input type="hidden" name="action" value="edit" />
40                             <input type="hidden" name="hold_id"
41                                 value="[% ahr.id %]" />
42                             [% l('Pickup library') %]
43                         </th>
44                         <td>
45                             [% PROCESS build_org_selector
46                                 name='pickup_lib' value=ahr.pickup_lib %]
47                         </td>
48                     </tr>
49                     [% IF hold.hold.status < 3 %]
50                     [%# The following actions cannot be performed on holds that 
51                         have already been captured... %]
52                     <tr>
53                         <th>
54                             [% l('Cancel unless filled by') %]
55                         </th>
56                         <td>
57                             <input type="text" name="expire_time"
58                                 value="[% expire_time | html %]" />
59                         </td>
60                         <td class="fmt-note">
61                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
62                             <!-- XXX TODO pick out a minimal, simple, reliable
63                             calendar widget that's not part of some giant,
64                             bloated framework and doesn't do anything at onload.
65                             -->
66                         </td>
67                     </tr>
68                     <tr>
69                         <th>
70                             [% l('Active?') %]
71                         </th>
72                         <td>
73                             <select name="frozen">
74                                 <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
75                                     [% l('Yes, this hold is active now') %]
76                                 </option>
77                                 <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
78                                     [% l('No, this hold is suspended') %]
79                                 </option>
80                             </select>
81                         </td>
82                     </tr>
83                     <tr>
84                         <th>
85                             [% l('If suspended, activate on') %]
86                         </th>
87                         <td>
88                             <input type="text" name="thaw_date"
89                                 value="[% thaw_date | html %]" />
90                         </td>
91                         <td class="fmt-note">
92                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
93                         </td>
94                     </tr>
95                     [% END %]
96                     <tr>
97                         <td colspan="2" class="hold-editor-controls">
98                             <a href="[% ctx.opac_root %]/myopac/holds"><button 
99                                 class="opac-button">[% l('Go Back') %]</button></a>
100                             <input type="submit" value="[% l('Submit') %]" class="opac-button" />
101                         </td>
102                     </tr>
103                 </table>
104             </form>
105         [% ELSE;
106             l('Hold not found');
107         END %]
108     </div>
109 </div>
110 [% END %]