Bug 23594: Fix bad resolution conflict with bug 16784
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / suggestion / suggestion.tt
blob0d7d23a84ab48c54fa184da2716e83cec637527b
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Branches %]
4 [% USE AuthorisedValues %]
5 [% USE KohaDates %]
6 [% USE Price %]
7 [% USE ColumnsSettings %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha &rsaquo; Acquisitions  &rsaquo;
11     [% IF ( op_save ) %]
12         [% IF ( suggestionid ) %]
13             Suggestions &rsaquo;  Edit suggestion #[% suggestionid | html %]
14         [% ELSE %]
15             Suggestions &rsaquo; Add suggestion
16         [% END %]
17     [% ELSIF ( op == 'show' ) %]
18            Suggestions &rsaquo; Show suggestion #[% suggestionid | html %]
19     [% ELSE %]
20         Suggestions management
21     [% END %]
22 </title>
23 [% INCLUDE 'doc-head-close.inc' %]
24 [% IF ( op_else ) %]
25 [% END %]
26 [% IF ( op_else ) %]
27     <style>
28         h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
29         .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } div.note { background: transparent none; border-style: dotted; border-width: 1px 0 0 0; font-size : 90%; padding: 2px 0 0 0; } div.note i { color: #CCC; }
30     </style>
31 [% END %]
32 </head>
34 <body id="acq_suggestion" class="acq">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
37 <div id="breadcrumbs">
38     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
39     [% IF ( op_save ) %]
40         [% IF ( suggestionid ) %]
41             <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;  Edit suggestion #[% suggestionid | html %]
42         [% ELSE %]
43             <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Add suggestion
44         [% END %]
45     [% ELSIF ( op == 'show' ) %]
46            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Show suggestion #[% suggestionid | html %]
47     [% ELSE %]
48         Suggestions management
49     [% END %]
50 </div>
52 [% IF ( op == 'show' ) %]
53     <div class="main container-fluid">
54         <div class="row">
55             <div class="col-md-8 col-md-offset-2">
57     <div id="toolbar" class="btn-toolbar">
58         <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
59         <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
60     </div>
62     <fieldset class="rows">
63       <legend>Bibliographic information</legend>
64       <ol>
65             [% IF ( title ) %]
66                 <li>
67                     <span class="label">Title:</span>
68                     [% title | html %]
69                 </li>
70             [% END %]
71             [% IF ( author ) %]
72                 <li>
73                     <span class="label">Author:</span>
74                     [% author | html %]
75                 </li>
76             [% END %]
77             [% IF ( copyrightdate ) %]
78                 <li>
79                     <span class="label">Copyright date:</span>
80                     [% copyrightdate | html %]
81                 </li>
82             [% END %]
83             [% IF ( isbn ) %]
84                 <li>
85                     <span class="label">ISBN or ISSN or other standard number:</span>
86                     [% isbn | html %]
87                 </li>
88             [% END %]
89             [% IF ( publishercode ) %]
90                 <li>
91                     <span class="label">Publisher:</span>
92                     [% publishercode | html %]
93                 </li>
94             [% END %]
95             [% IF ( place ) %]
96                 <li>
97                     <span class="label">Publication place:</span>
98                     [% place | html %]
99                 </li>
100             [% END %]
101             [% IF ( collectiontitle ) %]
102                 <li>
103                     <span class="label">Collection title:</span>
104                     [% collectiontitle | html %]
105                 </li>
106             [% END %]
107             [% IF ( itemtype ) %]
108                 <li>
109                     <span class="label">Document type:</span>
110                     [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
111                 </li>
112             [% END %]
113         [% IF ( patron_reason_loop ) %]
114           <li><span class="label">Reason for suggestion: </span>
115             [% FOREACH patron_reason_loo IN patron_reason_loop %]
116               [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
117             [% END %]
118           </li>
119         [% END %]
120             [% IF ( note ) %]
121                 <li>
122                     <span class="label">Notes:</span>
123                     [% note | html %]
124                 </li>
125             [% END %]
126       </ol>
127     </fieldset>
128     <fieldset class="rows"> <legend>Suggestion management</legend>
129       <ol>
130         <li>
131           <span class="label">Status:</span>
132           [% SET status_found = 0 %]
133           [% IF ( STATUS == 'ASKED' ) %]
134               Pending
135               [% SET status_found = 1 %]
136           [% ELSIF ( STATUS == 'ACCEPTED' ) %]
137               Accepted
138               [% SET status_found = 1 %]
139           [% ELSIF ( STATUS == 'CHECKED' ) %]
140               Checked
141               [% SET status_found = 1 %]
142           [% ELSIF ( STATUS == 'REJECTED' ) %]
143               Rejected
144               [% SET status_found = 1 %]
145           [% ELSIF ( STATUS == 'ORDERED' ) %]
146               Ordered
147               [% SET status_found = 1 %]
148           [% ELSIF ( STATUS == 'AVAILABLE' ) %]
149               Available
150               [% SET status_found = 1 %]
151           [% ELSE %]
152               [% FOREACH s IN SuggestionStatuses %]
153                   [% IF STATUS == s.authorised_value %]
154                       [% s.lib | html %]
155                       [% SET status_found = 1 %]
156                   [% END %]
157               [% END %]
158           [% END %]
160         </li>
161         <li>
162           <table>
163             <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
164             <tbody>
165             <tr>
166                 <th>Created by:</th>
167                 <td>[% suggesteddate | $KohaDates %]</td>
168                 <td>
169                     [% IF ( suggestedby_borrowernumber ) %]
170                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
171                         [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
172                     [% END %]
173                 </td>
174             </tr>
175             <tr>
176                 <th>Managed by:</th>
177                 <td>[% manageddate | $KohaDates %]</td>
178                 <td>
179                         [% IF ( managedby_borrowernumber ) %]
180                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
181                             [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
182                         [% END %]
183                 </td>
184             </tr>
185             <tr>
186                 <th>Accepted on:</th>
187                 <td>[% accepteddate | $KohaDates %]</td>
188                 <td>
189                     [% IF ( acceptedby_borrowernumber ) %]
190                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
191                         [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
192                     [% END %]
193                 </td>
194             </tr>
195             </tbody>
196         </table></li></ol>
197     </fieldset>
198     <fieldset class="rows"> <legend>Acquisition information</legend>
199       <ol>
200         <li>
201           <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
202         </li>
203         <li>
204           <span class="label">Fund:</span> [% budgetname | html %]
205         </li>
206         <li>
207           <span class="label">Copies:</span>[% quantity | html %]
208         </li>
209         <li>
210           <span class="label">Currency:</span>[% currency | html %]
211         </li>
212         <li>
213           <span class="label">Price:</span>[% price | $Price %]
214         </li>
215         <li>
216           <span class="label">Total</span>[% total | $Price %]
217         </li>
218       </ol>
219     </fieldset>
221     <fieldset class="action">
222         <a href="suggestion.pl">&lt;&lt; Back to suggestions</a>
223     </fieldset>
225     </div>
226     </div>
227 </div>
228 [% ELSE %]
230 [% IF ( op_save ) %]
231     <div class="main container-fluid">
232         <div class="row">
233             <div class="col-md-8 col-md-offset-2">
234 [% ELSE %]
235     <div class="main container-fluid">
236         <div class="row">
237             <div class="col-sm-10 col-sm-push-2">
238                 <main>
240 [% END %]
242 [% IF ( op_save ) %]
243     [% FOR m IN messages %]
244         <div class="dialog [% m.type | html %]">
245             [% SWITCH m.code %]
246             [% CASE 'biblio_exists' %]
247                 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
248             [% CASE %]
249                 [% m.code | html %]
250             [% END %]
251         </div>
252     [% END %]
253     <form id="add_edit" action="suggestion.pl" method="post" class="validated">
254     <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
255     <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
256     [% IF ( suggestionid ) %]
257         <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
258         <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
259     [% ELSE %]
260         <h1>Enter a new purchase suggestion</h1>
261     [% END %]
262     <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
263         <li>
264             <label for="title" class="required">Title:</label>
265             <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
266             <span class="required">Required</span>
267         </li>
268         <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
269         <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
270         <li><label for="isbn">ISBN or ISSN or other standard number:</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/></li>
271         <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
272         <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
273         <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
274         <li><label for="itemtype">Document type:</label>
275             [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
276         </li>
277         [% IF patron_reason_loop %]
278             <li>
279                 <label for="patronreason">Reason for suggestion: </label>
280                 <select name="patronreason" id="patronreason">
281                     <option value=""> -- Choose -- </option>
282                     [% FOREACH patron_reason_loo IN patron_reason_loop %]
283                         [% IF patron_reason_loo.authorised_value == patronreason %]
284                             <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
285                         [% ELSE %]
286                             <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
287                         [% END %]
288                     [% END %]
289                 </select>
290             </li>
291         [% END %]
292         <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
293         </ol>
294     </fieldset>
295     <fieldset class="rows"> <legend>Suggestion management</legend>
296        <ol>
297             [% IF ( suggestionid ) %]
298                 <li>
299                     <label for="STATUS">Status:</label>
300                     <select id="STATUS" name="STATUS">
301                         <option value="">No status</option>
303                         [% IF (statusselected_ASKED ) %]
304                             <option value="ASKED" selected="selected">Pending</option>
305                         [% ELSE %]
306                             <option value="ASKED">Pending</option>
307                         [% END %]
309                         [% IF (statusselected_ACCEPTED ) %]
310                             <option value="ACCEPTED" selected="selected">Accepted</option>
311                         [% ELSE %]
312                             <option value="ACCEPTED">Accepted</option>
313                         [% END %]
315                         [% IF (statusselected_CHECKED ) %]
316                             <option value="CHECKED" selected="selected">Checked</option>
317                         [% ELSE %]
318                             <option value="CHECKED">Checked</option>
319                         [% END %]
321                         [% IF ( statusselected_REJECTED ) %]
322                             <option value="REJECTED" selected="selected">Rejected</option>
323                         [% ELSE %]
324                             <option value="REJECTED">Rejected</option>
325                         [% END %]
327                         [% FOREACH s IN SuggestionStatuses %]
328                             [% IF s.authorised_value == suggestion.STATUS %]
329                                 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
330                             [% ELSE %]
331                                 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
332                             [% END %]
333                         [% END %]
334                     </select>
335                 </li>
336                 <li>
337                     <label for="reason">Reason</label>
338                     <select class="select-reason" id="reason" name="reason">
339                         <option value=""> -- Choose a reason -- </option>
340                         [% FOREACH reasonsloo IN suggestion.reasonsloop %]
341                             [% IF (reasonsloo.lib == suggestion.reason) %]
342                                 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
343                             [% ELSE %]
344                                 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
345                             [% END %]
346                         [% END %]
347                         <option value="other">Others...</option>
348                     </select>
350                     <span id="other_reason" name="other_reason">
351                         [% IF other_reason %]
352                             <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
353                         [% ELSE %]
354                             <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
355                         [% END %]
356                         <a href="#back">Cancel</a>
357                     </span>
358                 </li>
359             [% END %]
360         <li><table>
361             <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
362             <tbody>
363             <tr>
364                 <th><label for="suggesteddate">Created by:</label> </th>
365                 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
366                 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>  [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])[% END %]
367                 </td>
368             </tr>
369             <tr>
370                 <th><label for="managedon">Managed by:</label> </th>
371                 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
372                 <td><input type="hidden" id="managedby" name="managedby" value="[% managedby | html %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])[% END %]</td>
373             </tr>
374             <tr>
375                 <th><label for="accepteddate">Accepted on:</label> </th>
376                 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
377                 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])[% END %]</td>
378             </tr>
379             </tbody>
380         </table></li></ol>
381     </fieldset>
382     <fieldset class="rows"> <legend>Acquisition information</legend><ol>
383         <li><label for="branchcode">Library:</label>
384             <select name="branchcode" id="branchcode">
385                 <option value="">Any</option>
386                 [% IF branchfilter %]
387                     [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
388                 [% ELSE %]
389                     [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
390                 [% END %]
391             </select>
392         </li>
393         <li><label for="budgetid">Fund:</label>
394             <select name="budgetid" id="budgetid">
395                 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
396                 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %][% END %]
397             </select>
398                 </li><li><label for="quantity">Copies:</label>
399             <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
400                 </li>
401                 <li>
402                     <label for="currency">Currency:</label>
403                     [% FOREACH c IN currencies %]
404                         <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
405                         <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
406                     [% END %]
408                     <select name="currency" id="currency">
409                         [% FOREACH c IN currencies %]
410                             [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
411                                 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
412                             [% ELSIF not c.archived %]
413                                 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
414                             [% END %]
415                         [% END %]
416                     </select>
417                 </li>
418                 <li><label for="price">Price:</label>
419             <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
420                 </li><li><label for="total">Total: </label>
421                         <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
422                 </li></ol>
423     </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
424     <fieldset class="action">
425         <input type="hidden" name="op" value="[% op | html %]" />
426         [% IF ( suggestionid ) %]
427             [% IF ( need_confirm ) %]
428                 <input type="hidden" name="save_confirmed" value="1" />
429                 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
430             [% ELSE %]
431                 <input type="submit" value="Save" />
432             [% END %]
433             <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
434         [% ELSE %]
435             [% IF ( need_confirm ) %]
436                 <input type="hidden" name="save_confirmed" value="1" />
437                 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
438             [% ELSE %]
439                 <input type="submit" value="Submit your suggestion" />
440             [% END %]
441             <a class="cancel" href="suggestion.pl">Cancel</a>
442         [% END %]
443     </fieldset>
444     </form>
445 [% END %]
447 [% IF ( op_else ) %]
448 <div id="toolbar" class="btn-toolbar">
449     <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
450 </div>
452 <h1>Suggestions management</h1>
455 [% FOR m IN messages %]
456     <div class="dialog [% m.type | html %]">
457         [% SWITCH m.code %]
458         [% CASE 'already_exists' %]
459             The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id | html %]&op=show'>suggestion #[% m.id | html %]</a>)
460         [% CASE 'biblio_exists' %]
461             A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
462         [% CASE %]
463             [% m.code | html %]
464         [% END %]
465     </div>
466 [% END %]
468 [% UNLESS ( notabs ) %]
469     <div id="suggestiontabs" class="toptabs">
470     <ul class="ui-tabs-nav">
471         [% FOREACH suggestion IN suggestions %]
472                 <li>
473             <a href="#tab_[% loop.count | uri %]">
474             [% IF ( suggestion.suggestiontypelabel ) %]
475                 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
476                 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
477                 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
478                 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
479                 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
480                 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
481                 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
482                 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
483             [% ELSE %]
484                 [% IF ( suggestion.suggestiontype ) %]
485                     [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
486                 [% ELSE %]
487                     No name
488                 [% END %]
489             [% END %]
490             ([% suggestion.suggestions_loop.size | html %])</a></li>
492         [% END %]
493     </ul>
494 [% END %]
496 [% FOREACH suggestion IN suggestions %]
497 <div id="tab_[% loop.count | html %]">
498 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
500 [% IF ( suggestion.suggestions_loop ) %]
501 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
502     <table id="table_[% loop.count | html %]" class="sorted">
503         <thead>
504             <tr>
505                 <th class="NoSort noExport">&nbsp;</th>
506                 <th class="anti-the">Suggestion</th>
507                 <th>Suggested by</th>
508                 <th>Suggested on</th>
509                 <th>Managed by</th>
510                 <th>Managed on</th>
511                 <th>Library</th>
512                 <th>Fund</th>
513                 <th>Status</th>
514                 <th class="NoSort noExport">&nbsp;</th>
515             </tr>
516     </thead>
517         <tbody>
518             [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
519                 <tr>
520                 <td>
521                     <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
522                 </td>
523                 <td>
524                     <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&amp;op=show" title="suggestion" >
525                         [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
526                     <br />
527                     [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
528                         [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
529                         [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn | html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle | html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %]
530                 </td>
531                 <td>
532                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a>
533                 </td>
534                 <td data-order="[% suggestions_loo.suggesteddate | html %]">
535                     [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
536                 </td>
537                 <td>
538                     <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
539                 </td>
540                 <td data-order="[% suggestions_loo.manageddate | html %]">
541                     [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
542                 </td>
543                 <td>
544                     [% Branches.GetName( suggestions_loo.branchcode ) | html %]
545                 </td>
546                 <td>
547                     [% suggestions_loo.budget_name | html %]
548                 </td>
549                 <td>
550                     [% IF ( suggestions_loo.ASKED ) %]
551                         Pending
552                     [% ELSIF ( suggestions_loo.ACCEPTED ) %]
553                         Accepted
554                     [% ELSIF ( suggestions_loo.ORDERED ) %]
555                         Ordered
556                     [% ELSIF ( suggestions_loo.REJECTED ) %]
557                         Rejected
558                     [% ELSIF ( suggestions_loo.CHECKED ) %]
559                         Checked
560                     [% ELSIF ( suggestions_loo.AVAILABLE ) %]
561                         Available
562                     [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
563                         [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
564                     [% ELSE %]
565                         Status unknown
566                     [% END %]
568                     [% IF ( suggestions_loo.reason ) %]
569                         <br />([% suggestions_loo.reason | html %])
570                     [% END %]
571                 </td>
572                 <td class="actions">
573                     <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a>
574                     <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
575                 </td>
576         </tr>
577         [% END %]</tbody>
578         </table>
580         <div class="row">
581             <h2 style="padding-left:1em;">Change selected suggestions</h3>
582             <div class="col-sm-4">
583                 <fieldset>
584                     <div id="select-reason">
585                        <label for="STATUS">Mark selected as: </label>
586                        <select name="STATUS" id="STATUS">
587                            <option value=""> -- Choose a status --</option>
589                            [% IF (statusselected_ASKED ) %]
590                                <option value="ASKED" selected="selected">Pending</option>
591                            [% ELSE %]
592                                <option value="ASKED">Pending</option>
593                            [% END %]
595                            [% IF (statusselected_ACCEPTED ) %]
596                                <option value="ACCEPTED" selected="selected">Accepted</option>
597                            [% ELSE %]
598                                <option value="ACCEPTED">Accepted</option>
599                            [% END %]
601                            [% IF (statusselected_CHECKED ) %]
602                                <option value="CHECKED" selected="selected">Checked</option>
603                            [% ELSE %]
604                                <option value="CHECKED">Checked</option>
605                            [% END %]
607                            [% IF ( statusselected_REJECTED ) %]
608                                <option value="REJECTED" selected="selected">Rejected</option>
609                            [% ELSE %]
610                                <option value="REJECTED">Rejected</option>
611                            [% END %]
613                            [% FOREACH s IN SuggestionStatuses %]
614                                <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
615                            [% END %]
616                        </select>
618                        <label for="reason">with this reason:</label>
619                        <select name="reason">
620                            <option value=""> -- Choose a reason -- </option>
621                            [% FOREACH reasonsloo IN suggestion.reasonsloop %]
622                                <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
623                            [% END %]
624                            <option value="other">Others...</option>
625                        </select>
627                        <span class="other_reason">
628                            <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
629                            <a href="#" class="cancel_note">Cancel</a>
630                        </span>
631                     </div>
633                     <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
634                     <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
635                 </fieldset>
636             </div>
637             <div class="col-sm-4">
638                 <fieldset>
639                     <label for="itemtype">Update item types with: </label>
640                     [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20  %]
641                     <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
642                     <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
643                 </fieldset>
644             </div>
646             <div class="col-sm-4">
647                 <fieldset>
648                     <label for="delete_[% loop.count | html %]">Delete selected</label>
649                     <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
650                     <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
651                 </fieldset>
652             </div>
653         </div>
655 [% ELSE %]
656     <b>No results.</b>
657 [% END %]
658 </form>
659 </div>
660 [% END %]
661 [% END %]
663 [% UNLESS ( op_save ) %]
664     [% UNLESS ( op == 'show' ) %]
666             </main>
667         </div> <!-- /.col-sm-10.col-sm-push-2 -->
669         <div class="col-sm-2 col-sm-pull-10">
670             <aside>
672 <form name="suggestionfilter" action="suggestion.pl" method="get">
673 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
674                 <select name="displayby" id="displayby" style="width:auto;">
675                     [% IF ( displayby == "STATUS" ) %]
676                         <option value="STATUS" selected="selected">Status</option>
677                     [% ELSE %]
678                         <option value="STATUS">Status</option>
679                     [% END %]
680                     [% IF ( displayby == "branchcode" ) %]
681                         <option value="branchcode" selected="selected">Library</option>
682                     [% ELSE %]
683                         <option value="branchcode">Library</option>
684                     [% END %]
685                     [% IF ( displayby == "itemtype" ) %]
686                         <option value="itemtype" selected="selected">Item type</option>
687                     [% ELSE %]
688                         <option value="itemtype">Item type</option>
689                     [% END %]
690                     [% IF ( displayby == "managedby" ) %]
691                         <option value="managedby" selected="selected">Managed by</option>
692                     [% ELSE %]
693                         <option value="managedby">Managed by</option>
694                     [% END %]
695                     [% IF ( displayby == "acceptedby" ) %]
696                         <option value="acceptedby" selected="selected">Accepted by</option>
697                     [% ELSE %]
698                         <option value="acceptedby">Accepted by</option>
699                     [% END %]
700                 </select> <input type="submit" value="Go" /></li></ol></fieldset>
701 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
702                 <div style="display:block;" id="limits">
704                                 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
705                    <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
706                     <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
707                     <li><label for="isbn"> ISBN:</label><input type="text" id="isbn"  name="isbn" value="[% isbn | html %]" /></li>
708                     <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
709                     <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
710                     <li><label for="collectiontitle"> Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" /></li></ol>
711                 </fieldset>
712                                  <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
713                     <ol>
714                       <li>
715                           <label for="STATUS"> Status:</label>
716                           <select name="STATUS" id="STATUS">
717                               <option value="">Any</option>
719                               [% IF (statusselected_ASKED ) %]
720                                   <option value="ASKED" selected="selected">Pending</option>
721                               [% ELSE %]
722                                   <option value="ASKED">Pending</option>
723                               [% END %]
725                               [% IF (statusselected_ACCEPTED ) %]
726                                   <option value="ACCEPTED" selected="selected">Accepted</option>
727                               [% ELSE %]
728                                   <option value="ACCEPTED">Accepted</option>
729                               [% END %]
731                               [% IF (statusselected_CHECKED ) %]
732                                   <option value="CHECKED" selected="selected">Checked</option>
733                               [% ELSE %]
734                                   <option value="CHECKED">Checked</option>
735                               [% END %]
737                               [% IF ( statusselected_REJECTED ) %]
738                                   <option value="REJECTED" selected="selected">Rejected</option>
739                               [% ELSE %]
740                                   <option value="REJECTED">Rejected</option>
741                               [% END %]
743                               [% FOREACH s IN SuggestionStatuses %]
744                                   [% IF s.authorised_value == selected_status %]
745                                       <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
746                                   [% ELSE %]
747                                       <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
748                                   [% END %]
749                               [% END %]
750                           </select>
751                       </li>
753                     <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
754 [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>[% ELSE %]<option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>[% END %][% END %]
755                                                                      </select></li>
756                     <li>
757                         <label for="suggesteddate_from">Suggested date from:</label>
758                         <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
759                     </li>
760                     <li>
761                         <label for="suggesteddate_to">To:</label>
762                         <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
763                     </li>
764                     <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
765 [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>[% ELSE %]<option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>[% END %][% END %]
766                                                                      </select></li>
767                     <li>
768                         <label for="manageddate_from">Management date from:</label>
769                         <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
770                     </li>
771                     <li>
772                         <label for="manageddate_to">To:</label>
773                         <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
774                     </li>
775                     <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
776 [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>[% ELSE %]<option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>[% END %][% END %]
777                                                       </select></li>
778                     <li>
779                         <label for="accepteddate_from">Accepted date from:</label>
780                         <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
781                     </li>
782                     <li>
783                         <label for="accepteddate_to">To:</label>
784                         <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
785                     </li>
786                     <li><input type="submit" value="Go" /></li></ol>
787                 </fieldset>
789                                 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
790                     <ol><li><label for="budgetid"> Book fund:</label>
791                     <select name="budgetid" id="budgetid">
792                       <option value="__ANY__">Any</option>
793                       [% IF budgetid == '__NONE__' %]
794                           <option value="__NONE__" selected="selected">None</option>
795                       [% ELSE %]
796                           <option value="__NONE__">None</option>
797                       [% END %]
798                     [% FOREACH budgetsloo IN budgetsloop %]
799                         [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %]
800                         [% END %]
801                     </select></li>
802                     <li><label for="branchcode">Library:</label>
803                     <select name="branchcode" id="branchcode">
804                         <option value="__ANY__">Any</option>
805                         [% IF branchfilter %]
806                             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
807                         [% ELSE %]
808                             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
809                         [% END %]
810                     </select></li><li><input type="submit" value="Go" /></li></ol>
811                 </fieldset>
812             </form>
813         [% INCLUDE 'acquisitions-menu.inc' %]
815             </aside>
816         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
817      </div> <!-- /.row -->
819     [% END %]
820     [% END %]
821 </div>
822 [% END %]
824 [% MACRO jsinclude BLOCK %]
825     [% INCLUDE 'calendar.inc' %]
826     [% IF ( op == 'show' || op_else ) %]
827         <script>
828             $(document).ready(function(){
829                 $(".deletesuggestion").on("click",function(){
830                     return confirm(_("Are you sure you want to delete this suggestion?"));
831                 });
832             });
833         </script>
834     [% END %]
835     [% IF ( op_else ) %]
836         [% INCLUDE 'datatables.inc' %]
837         [% INCLUDE 'columns_settings.inc' %]
838         [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
840         <script>
841             $(document).ready(function() {
842                 $('#suggestiontabs').tabs();
844                 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
845                 [% FOREACH suggestion IN suggestions %]
846                     [% IF ( suggestion.suggestions_loop ) %]
847                         KohaTable("table_[% loop.count| html %]", {
848                             "sorting": [[ 1, "asc" ]],
849                             "autoWidth": false,
850                             "columnDefs": [
851                                 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
852                                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
853                             ]
854                         }, columns_settings );
855                     [% END %]
856                 [% END %]
858                 $(".checkall").click(function(e){
859                     e.preventDefault();
860                     $(this).parents('form').checkCheckboxes();
861                     return false;
862                 });
863                 $(".uncheckall").click(function(e){
864                     e.preventDefault();
865                     $(this).parents('form').unCheckCheckboxes();
866                     return false;
867                 });
868                 $(".other_reason").hide();
869                 $("select[name='reason']").change(function(){
870                     if($(this).val() == "other"){
871                         $(this).hide();
872                         $(this).siblings(".other_reason").show();
873                     }
874                 });
876                 $("a.cancel_note").click(function(e) {
877                     $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
878                     $(this).siblings("input[name='other_reason']").hide();
879                     e.preventDefault();
880                 });
881                 $("h4.local_collapse a").click(function(){
882                     $(this).parent().parent().find("ol").toggle();
883                     return false;
884                 });
885                 // http://jqueryui.com/demos/datepicker/#date-range
886                 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
887                     changeMonth: true,
888                     numberOfMonths: 1,
889                     onSelect: function( selectedDate ) {
890                         var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
891                             instance = $( this ).data( "datepicker" );
892                             date = $.datepicker.parseDate(
893                                 instance.settings.dateFormat ||
894                                 $.datepicker._defaults.dateFormat,
895                                 selectedDate, instance.settings );
896                         dates.not( this ).datepicker( "option", option, date );
897                     }
898                 });
899                 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
900                     changeMonth: true,
901                     numberOfMonths: 1,
902                     onSelect: function( selectedDate ) {
903                         var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
904                             instance = $( this ).data( "datepicker" );
905                             date = $.datepicker.parseDate(
906                                 instance.settings.dateFormat ||
907                                 $.datepicker._defaults.dateFormat,
908                                 selectedDate, instance.settings );
909                         datesMD.not( this ).datepicker( "option", option, date );
910                     }
911                 });
912                 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
913                     changeMonth: true,
914                     numberOfMonths: 1,
915                     onSelect: function( selectedDate ) {
916                         var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
917                             instance = $( this ).data( "datepicker" );
918                             date = $.datepicker.parseDate(
919                                 instance.settings.dateFormat ||
920                                 $.datepicker._defaults.dateFormat,
921                                 selectedDate, instance.settings );
922                         datesAD.not( this ).datepicker( "option", option, date );
923                     }
924                 });
926                 $("button[type='submit']").on("click", function(e) {
927                     var form = $(this).parents("form");
928                     var action = $(this).val();
929                     var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
930                     if ( selected_suggestions.length == 0 ) {
931                         alert(_("Please select at least one suggestion"));
932                         e.preventDefault();
933                         return false;
934                     }
935                     if ( action == "delete" ) {
936                         if ( selected_suggestions.length == 1 ) {
937                             if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
938                                 e.preventDefault();
939                                 return false;
940                             }
941                         } else if ( selected_suggestions.length > 1 ) {
942                             if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
943                                 e.preventDefault();
944                                 return false;
945                             }
946                         }
947                     }
949                     $('<input />').attr('type', 'hidden')
950                                   .attr('name', "op")
951                                   .attr('value', action)
952                                   .appendTo(form);
953                     return true;
954                 });
955             });
956         </script>
957     [% END %]
958     [% IF ( op_save )  %]
959         <script>
960             $(document).ready(function(){
961                 calcNewsuggTotal();
962                 $("#quantity,#price,#currency").on("change",function(){
963                     calcNewsuggTotal();
964                 });
966                 [% IF other_reason %]
967                     $(".select-reason").hide();
968                     $(".select-reason").find("option[value='other']").attr("selected","selected");
969                     $("#other_reason").show();
970                 [% ELSE %]
971                     $("#other_reason").hide();
972                 [% END %]
973                 $(".select-reason").change(function(){
974                     if($(this).val() == "other"){
975                         $(this).hide();
976                         $("#other_reason").show();
977                     }
978                 });
979                 $("a[href*=back]").click(function(){
980                     $(".select-reason").show().find("option[value='']").attr("selected","selected");
981                     $("#other_reason").hide();
982                 });
983             });
984         </script>
985     [% END %]
986     [% Asset.js("js/acq.js") | $raw %]
987     [% Asset.js("js/acquisitions-menu.js") | $raw %]
988 [% END %]
990 [% INCLUDE 'intranet-bottom.inc' %]