1 [% PROCESS 'i18n.inc' %]
5 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
13 [% IF ( suggestionid ) %]
14 Edit suggestion #[% suggestionid | html %] › Suggestions
16 Add suggestion › Suggestions
19 [% ELSIF ( op == 'show' ) %]
20 Show suggestion #[% suggestionid | html %] › Suggestions
23 Suggestions management
24 [% END %] › Acquisitions › Koha
26 [% INCLUDE 'doc-head-close.inc' %]
32 text-decoration: none;
55 <body id="acq_suggestion" class="acq">
56 [% INCLUDE 'header.inc' %]
57 [% INCLUDE 'cat-search.inc' %]
59 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
62 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
65 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
69 [% IF ( suggestionid ) %]
71 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
74 <a href="#" aria-current="page">
75 Edit suggestion #[% suggestionid | html %]
80 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
83 <a href="#" aria-current="page">
88 [% ELSIF ( op == 'show' ) %]
90 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
93 <a href="#" aria-current="page">
94 Show suggestion #[% suggestionid | html %]
99 <a href="#" aria-current="page">
100 Suggestions management
105 </nav> <!-- /.breadcrumbs -->
107 [% IF ( op == 'show' ) %]
108 <div class="main container-fluid">
110 <div class="col-md-8 col-md-offset-2">
112 <div id="toolbar" class="btn-toolbar">
113 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
114 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
117 <fieldset class="rows">
118 <legend>Bibliographic information</legend>
122 <span class="label">Title:</span>
123 [% IF suggestion.biblionumber %]
124 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
132 <span class="label">Author:</span>
136 [% IF ( copyrightdate ) %]
138 <span class="label">Copyright date:</span>
139 [% copyrightdate | html %]
144 <span class="label">ISBN or ISSN or other standard number:</span>
148 [% IF ( publishercode ) %]
150 <span class="label">Publisher:</span>
151 [% publishercode | html %]
156 <span class="label">Publication place:</span>
160 [% IF ( collectiontitle ) %]
162 <span class="label">Collection title:</span>
163 [% collectiontitle | html %]
166 [% IF ( itemtype ) %]
168 <span class="label">Document type:</span>
169 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
172 [% IF ( patron_reason_loop ) %]
174 <span class="label">Reason for suggestion: </span>
175 [% FOREACH patron_reason_loo IN patron_reason_loop %]
176 [% IF patron_reason_loo.authorised_value == patronreason %]
177 [% patron_reason_loo.lib | html %]
184 <span class="label">Notes:</span>
188 [% IF ( staff_note ) %]
190 <span class="label">Notes:</span>
191 [% staff_note | html %]
197 <fieldset class="rows">
198 <legend>Suggestion management</legend>
201 <span class="label">Status:</span>
202 [% SET status_found = 0 %]
203 [% IF ( STATUS == 'ASKED' ) %]
205 [% SET status_found = 1 %]
206 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
207 <span>Accepted</span>
208 [% SET status_found = 1 %]
209 [% ELSIF ( STATUS == 'CHECKED' ) %]
211 [% SET status_found = 1 %]
212 [% ELSIF ( STATUS == 'REJECTED' ) %]
213 <span>Rejected</span>
214 [% SET status_found = 1 %]
215 [% ELSIF ( STATUS == 'ORDERED' ) %]
217 [% SET status_found = 1 %]
218 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
219 <span>Available</span>
220 [% SET status_found = 1 %]
222 [% FOREACH s IN SuggestionStatuses %]
223 [% IF STATUS == s.authorised_value %]
225 [% SET status_found = 1 %]
231 <span class="label">Reason:</span>
233 [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
248 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
249 <td>[% suggesteddate | $KohaDates %]</td>
251 [% IF ( suggestedby_patron.borrowernumber ) %]
252 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
253 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
259 <td>[% manageddate | $KohaDates %]</td>
261 [% IF ( managedby_patron.borrowernumber ) %]
262 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% managedby_patron.cardnumber | html %])</a>
263 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
268 <th>Accepted on:</th>
269 <td>[% accepteddate | $KohaDates %]</td>
271 [% IF ( acceptedby_patron.borrowernumber ) %]
272 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
273 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
278 <th>Last modification on:</th>
279 <td>[% lastmodificationdate | $KohaDates %]</td>
281 [% IF ( lastmodificationby_patron.borrowernumber ) %]
282 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% lastmodificationby_patron.borrowernumber | uri %]">[% lastmodificationby_patron.surname | html %], [% lastmodificationby_patron.firstname | html %] ([% lastmodificationby_patron.cardnumber | html %])</a>
283 [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
291 <fieldset class="rows">
292 <legend>Acquisition information</legend>
295 <span class="label">Library:</span>
296 [% Branches.GetName( branchcode ) | html %]
299 <span class="label">Fund:</span>
300 [% budgetname | html %]
303 <span class="label">Copies:</span>
304 [% quantity | html %]
307 <span class="label">Currency:</span>
308 [% currency | html %]
311 <span class="label">Price:</span>
315 <span class="label">Total</span>
321 <fieldset class="action">
322 <a href="suggestion.pl"><< Back to suggestions</a>
325 </div> <!-- /.col-md-8 col-md-offset-2 -->
326 </div> <!-- /.row -->
327 [% ELSE # IF op == "show" %]
329 [% IF op == 'save' %]
330 <div class="main container-fluid">
332 <div class="col-md-8 col-md-offset-2">
334 <div class="main container-fluid">
336 <div class="col-sm-10 col-sm-push-2">
339 [% IF op == 'save' %]
340 [% FOR m IN messages %]
341 <div class="dialog [% m.type | html %]">
343 [% CASE 'biblio_exists' %]
344 <span>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.</span>
345 [% CASE 'manager_not_enough_permissions' %]
346 <span>The manager you selected does not have sufficient permissions.</span>
348 <span>[% m.code | html %]</span>
350 </div> <!-- /.dialog -->
353 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
354 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
355 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
356 [% IF ( suggestionid ) %]
357 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
358 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
360 <h1>Enter a new purchase suggestion</h1>
363 <fieldset class="rows">
364 <legend>Bibliographic information</legend>
367 <label for="title" class="required">Title:</label>
368 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
369 <span class="required">Required</span>
372 <label for="author">Author:</label>
373 <input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/>
376 <label for="copyrightdate">Copyright date:</label>
377 <input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" />
380 <label for="isbn">ISBN or ISSN or other standard number:</label>
381 <input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/>
384 <label for="publishercode">Publisher:</label>
385 <input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/>
388 <label for="place">Publication place:</label>
389 <input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/>
392 <label for="collectiontitle">Collection title:</label>
393 <input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/>
396 <label for="itemtype">Document type:</label>
397 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
399 [% IF patron_reason_loop %]
401 <label for="patronreason">Reason for suggestion: </label>
402 <select name="patronreason" id="patronreason">
403 <option value=""> -- Choose -- </option>
404 [% FOREACH patron_reason_loo IN patron_reason_loop %]
405 [% IF patron_reason_loo.authorised_value == patronreason %]
406 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
408 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
413 [% END # /IF patron_reason_loop %]
415 <label for="note">Notes:</label>
416 <textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea>
419 <label for="note">Non-public notes:</label>
420 <textarea name="staff_note" id="staff_note" rows="5" cols="40">[% staff_note | html %]</textarea>
425 <fieldset class="rows">
426 <legend>Suggestion management</legend>
428 [% IF ( suggestionid ) %]
430 <label for="STATUS">Status:</label>
431 <select id="STATUS" name="STATUS">
432 <option value="">No status</option>
434 [% IF (statusselected_ASKED ) %]
435 <option value="ASKED" selected="selected">Pending</option>
437 <option value="ASKED">Pending</option>
440 [% IF (statusselected_ACCEPTED ) %]
441 <option value="ACCEPTED" selected="selected">Accepted</option>
443 <option value="ACCEPTED">Accepted</option>
446 [% IF (statusselected_CHECKED ) %]
447 <option value="CHECKED" selected="selected">Checked</option>
449 <option value="CHECKED">Checked</option>
452 [% IF ( statusselected_REJECTED ) %]
453 <option value="REJECTED" selected="selected">Rejected</option>
455 <option value="REJECTED">Rejected</option>
458 [% IF ( statusselected_ORDERED ) %]
459 <option value="ORDERED" selected="selected">Ordered</option>
461 <option value="ORDERED">Ordered</option>
464 [% FOREACH s IN SuggestionStatuses %]
465 [% IF s.authorised_value == suggestion.STATUS %]
466 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
468 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
474 <label for="reason">Reason:</label>
475 <select class="select-reason" id="reason" name="reason">
476 <option value=""> -- Choose a reason -- </option>
477 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
478 [% IF (reasonsloo.lib == suggestion.reason) %]
479 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
481 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
484 <option value="other">Others...</option>
487 <span id="other_reason" name="other_reason">
488 [% IF other_reason %]
489 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
491 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
493 <a href="#back">Cancel</a>
510 <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
513 <input type="text" id="suggesteddate" name="suggesteddate" class="flatpickr" size="10" maxlength="10" value="[% suggesteddate | html %]"/> [% INCLUDE 'date-format.inc' %]
515 <td id="tdsuggestedby">
516 <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>
517 [% IF ( suggestedby_patron.borrowernumber ) %]
518 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a> [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
522 <a href="#" id="edit_suggester" class="btn btn-default">Set to patron</a>
527 <label for="accepteddate">Accepted on:</label>
530 <input type="text" id="accepteddate" name="accepteddate" class="flatpickr" size="10" maxlength="10" value="[% accepteddate | html %]" />[% INCLUDE 'date-format.inc' %]
533 <input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>
534 [% IF ( acceptedby_patron.borrowernumber ) %]
535 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
536 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
543 <label for="lastmodificationdate">Last modification on:</label>
546 [% lastmodificationdate | $KohaDates %]
549 [% IF lastmodificationby_patron %]
550 [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
559 <label for="managedon">Managed on:</label>
560 <input type="text" id="managedon" name="manageddate" class="flatpickr" size="10" maxlength="10" value="[% manageddate | html %]" />[% INCLUDE 'date-format.inc' %]
563 <label for="managedby_name">by:</label>
565 <span id="managedby_name" name="managedby_name">
566 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
568 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
569 | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
572 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
573 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
574 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
576 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
579 <label for="notify">Notify manager:</label>
580 <input type="checkbox" id="notify" name="notify" value="notify" disabled="disabled" title="A NOTIFY_MANAGER notice will be generated and send to the manager if a valid email address is defined. This can be checked if a new manager has been selected." />
586 <fieldset class="rows">
587 <legend>Acquisition information</legend>
590 <label for="branchcode">Library:</label>
591 <select name="branchcode" id="branchcode">
592 <option value="">Any</option>
593 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
597 <label for="budgetid">Fund:</label>
598 <select name="budgetid" id="budgetid">
599 <option value="">Any</option>
600 [% FOREACH budget IN sugg_budgets %]
601 [% IF ( budget.selected ) %]
602 <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
603 [% ELSIF ( budget.b_active ) %]
604 <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
606 <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
610 <label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
611 <input type="checkbox" id="showallfunds" />
614 <label for="quantity">Copies:</label>
615 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
618 <label for="currency">Currency:</label>
619 [% FOREACH c IN currencies %]
620 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
621 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
623 <select name="currency" id="currency">
624 [% FOREACH c IN currencies %]
625 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
626 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
627 [% ELSIF not c.archived %]
628 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
634 <label for="price">Price:</label>
635 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
638 <label for="total">Total: </label>
639 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
642 </fieldset> <!-- /.rows -->
644 <input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
646 <fieldset class="action">
647 <input type="hidden" name="op" value="[% op | html %]" />
648 [% IF ( suggestionid ) %]
649 [% IF ( need_confirm ) %]
650 <input type="hidden" name="save_confirmed" value="1" />
651 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
653 <input type="submit" value="Save" />
655 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
657 [% IF ( need_confirm ) %]
658 <input type="hidden" name="save_confirmed" value="1" />
659 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
661 <input type="submit" value="Submit your suggestion" />
663 <a class="cancel" href="suggestion.pl">Cancel</a>
665 </fieldset> <!-- /.action -->
666 </form> <!-- /#add_edit -->
667 [% END # /IF op == 'save' %]
669 [% IF op == 'else' %]
670 <div id="toolbar" class="btn-toolbar">
671 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add&branchcode=[% branchcode | uri %]"><i class="fa fa-plus"></i> New purchase suggestion</a>
674 <h1>Suggestions management</h1>
676 [% IF ( displayby != "branchcode" ) %]
677 <label for="branchcode">Viewing suggestions for library:</label>
678 <select name="branchcode" id="branchcode">
679 <option value="__ANY__">Any</option>
680 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
684 [% FOR m IN messages %]
685 <div class="dialog [% m.type | html %]">
687 [% CASE 'already_exists' %]
688 <span>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>)</span>
689 [% CASE 'biblio_exists' %]
690 <span>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.</span>
692 <span>[% m.code | html %]</span>
694 </div> <!-- /.dialog -->
697 [% IF suggestions.size && !notabs %]
698 <div id="suggestiontabs" class="toptabs">
699 <ul class="nav nav-tabs" role="tablist">
700 [% FOREACH suggestion IN suggestions %]
701 <li role="presentation">
702 <a href="#[% suggestion.suggestiontype | uri %]" aria-controls="[% suggestion.suggestiontype | uri %]" role="tab" data-toggle="tab">
703 [% IF ( suggestion.suggestiontypelabel ) %]
704 [% IF (suggestion.suggestiontypelabel == "Pending") %]<span>Pending</span>
705 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]<span>Accepted</span>
706 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]<span>Checked</span>
707 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]<span>Rejected</span>
708 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]<span>Available</span>
709 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]<span>Ordered</span>
710 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]<span>Status unknown</span>
711 [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]<span>Any</span>
712 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
714 [% IF ( suggestion.suggestiontype ) %]
715 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
720 ([% suggestion.suggestions.size| html %])
723 [% END # /FOREACH suggestion %]
724 </ul> <!-- /.ui-tabs-nav -->
725 <div class="tab-content">
726 [% END # IF suggestions.size && !notabs %]
728 [% FOREACH suggestion IN suggestions %]
729 [% UNLESS ( notabs ) %]
730 <div id="[% suggestion.suggestiontype | html %]" role="tabpanel" class="tab-pane">
732 <div id="[% suggestion.suggestiontype | html %]">
734 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
736 [% IF suggestion.suggestions.size %]
738 <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
741 <table id="table_[% loop.count | html %]" class="sorted">
744 <th class="NoSort noExport"> </th>
745 <th class="anti-the">Suggestion</th>
746 <th>Suggested by</th>
747 <th>Suggested on</th>
748 <th>Patron reason</th>
751 <th>Last modification by</th>
752 <th>Last modification on</th>
753 <th>Last updated</th>
756 <th>Non-public note</th>
758 <th class="NoSort noExport"> </th>
762 [% FOREACH s IN suggestion.suggestions %]
765 <input type="checkbox" name="suggestionid" value="[% s.suggestionid | html %]" />
768 <a href="suggestion.pl?suggestionid=[% s.suggestionid | uri %]&op=show" title="suggestion" >
769 [% s.title | html %][% IF ( s.author ) %], by [% s.author | html %][% END %]
772 [% IF ( s.copyrightdate ) %]
773 © <span class="suggestion_copyrightdate">[% s.copyrightdate | html %]</span>
775 [% IF ( s.volumedesc ) %]
776 ; <span class="suggestion_volume">Volume:<em>[% s.volumedesc | html %]</em></span>
779 ; <span class="suggestion_isbn">ISBN: <em>[% s.isbn | html %]</em></span>
781 [% IF ( s.publishercode ) %]
782 ; <span class="suggestion_publishercode">Published by [% s.publishercode | html %]</span>
784 [% IF ( s.publicationyear ) %]
785 in <span class="suggestion_publicationyear"><em>[% s.publicationyear | html %]</em></span>
788 in <span class="suggestion_place"><em>[% s.place | html %]</em></span>
790 [% IF ( s.collectiontitle ) %]
791 ; <span class="suggestion_collectiontitle">[% s.collectiontitle | html %]</span>
793 [% IF ( s.itemtype ) %]
794 ; <span class="suggestion_itype">[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', s.itemtype, 0 ) | html %]</span>
798 <div class="suggestion_note"><i class="fa fa-comment"></i> [% s.note | html %]</div>
801 <br /><i class="fa fa-archive"></i> Archived
805 [% SET suggester = s.suggester %]
806 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggester.borrowernumber | uri %]">[% suggester.surname | html %][% IF suggester.firstname %], [% suggester.firstname | html %][% END %] [% IF suggester.cardnumber %]([% suggester.cardnumber | html %])[% END %]</a>
808 <td data-order="[% s.suggesteddate | html %]">
809 [% IF ( s.suggesteddate ) %][% s.suggesteddate | $KohaDates %][% END %]
811 <td>[% AuthorisedValues.GetByCode( 'OPAC_SUG', s.patronreason ) | html %]</td>
813 [% SET manager = s.manager %]
814 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% manager.borrowernumber | uri %]">[% manager.surname | html %][% IF manager.firstname %], [% manager.firstname | html %][% END %]</a>
816 <td data-order="[% s.manageddate | html %]">
817 [% IF ( s.manageddate ) %][% s.manageddate | $KohaDates %][% END %]
820 [% SET last_modifier = s.last_modifier %]
821 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% last_modifier.borrowernumber | uri %]">[% last_modifier.surname | html %][% IF last_modifier.firstname %], [% last_modifier.firstname | html %][% END %]</a>
823 <td data-order="[% s.lastmodificationdate | html %]">
824 [% IF ( s.lastmodificationdate ) %][% s.lastmodificationdate | $KohaDates %][% END %]
827 [% s.lastmodificationdate | $KohaDates %]
830 [% Branches.GetName( s.branchcode ) | html %]
833 [% s.fund.budget_name | html %]
836 [% s.staff_note | html %]
839 [% IF s.STATUS == 'ASKED' %]
841 [% ELSIF s.STATUS == 'ACCEPTED' %]
842 <span>Accepted</span>
843 [% ELSIF s.STATUS == 'ORDERED' %]
845 [% ELSIF s.STATUS == 'REJECTED' %]
846 <span>Rejected</span>
847 [% ELSIF s.STATUS == 'CHECKED' %]
849 [% ELSIF s.STATUS == 'AVAILABLE' %]
850 <span>Available</span>
851 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', s.STATUS ) %]
852 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', s.STATUS ) | html %]
854 <span>Status unknown</span>
857 [% IF ( s.reason ) %]
858 <br />([% s.reason | html %])
862 <div class="btn-group dropup">
863 <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
864 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]">
865 <li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
866 [% UNLESS s.archived %]
867 <li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
869 <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
875 [% END # /FOREACH s %]
877 </table> <!-- /#table_[% loop.count | html %] -->
880 <h2 style="padding-left:1em;">Change selected suggestions</h2>
881 <div class="col-sm-4">
883 <div id="select-reason[% loop.index | html %]">
884 <label for="STATUSreason[% loop.index | html %]">Mark selected as: </label>
885 <select name="STATUS" id="STATUSreason[% loop.index | html %]">
886 <option value=""> -- Choose a status --</option>
888 [% IF (statusselected_ASKED ) %]
889 <option value="ASKED" selected="selected">Pending</option>
891 <option value="ASKED">Pending</option>
894 [% IF (statusselected_ACCEPTED ) %]
895 <option value="ACCEPTED" selected="selected">Accepted</option>
897 <option value="ACCEPTED">Accepted</option>
900 [% IF (statusselected_CHECKED ) %]
901 <option value="CHECKED" selected="selected">Checked</option>
903 <option value="CHECKED">Checked</option>
906 [% IF ( statusselected_REJECTED ) %]
907 <option value="REJECTED" selected="selected">Rejected</option>
909 <option value="REJECTED">Rejected</option>
912 [% IF ( statusselected_ORDERED ) %]
913 <option value="ORDERED" selected="selected">Ordered</option>
915 <option value="ORDERED">Ordered</option>
918 [% FOREACH s IN SuggestionStatuses %]
919 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
923 <label for="choosereason[% loop.index | html %]">with this reason:</label>
924 <select name="reason" id="choosereason[% loop.index | html %]">
925 <option value=""> -- Choose a reason -- </option>
926 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
927 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
929 <option value="other">Others...</option>
932 <span class="other_reason">
933 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
934 <a href="#" class="cancel_note">Cancel</a>
938 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
939 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
940 <fieldset class="action">
941 <button type="submit" class="btn btn-default btn-xs" value="update_status">Submit</button>
944 </div> <!-- /.col-sm-4 -->
946 <div class="col-sm-4">
949 Update item types with:
950 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
952 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
953 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
954 <fieldset class="action">
955 <button type="submit" class="btn btn-default btn-xs" value="update_itemtype">Submit</button>
958 </div> <!-- /.col-sm-4 -->
960 <div class="col-sm-2">
962 <span class="label">Update manager</span><br/>
963 <a id="set_manager_[% loop.count | html %]" data-tab="[% loop.count | html %]" class="set_manager" href="#"><i class="fa fa-search"></i> Select manager</a>
964 <span id="managedby_name[% loop.count | html %]"></span>
965 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
966 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
967 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
968 <fieldset class="action">
969 <button type="submit" class="btn btn-default btn-xs" value="update_manager">Submit</button>
972 </div> <!-- /.col-sm-2 -->
974 <div class="col-sm-2">
976 <span class="label">Delete selected</span>
977 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
978 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
979 <fieldset class="action">
980 <button type="submit" class="btn btn-default btn-xs" value="delete">Delete</button>
983 </div> <!-- /.col-sm-2 -->
984 </div> <!-- /.row -->
987 <strong>No results.</strong>
988 [% END # /IF ( suggestion.suggestions_loop ) %]
989 </form> <!-- /.update_suggestions -->
990 </div> <!-- /#[% suggestion.suggestiontype | html %] -->
991 [% END # /FOREACH suggestion %]
992 [% IF suggestions.size && !notabs %]
993 </div> <!-- /.tab-content -->
994 </div> <!-- /.notabs -->
995 [% END # /UNLESS notabs %]
996 [% END # /IF op == 'else' %]
998 [% UNLESS op == 'save' %]
999 [% UNLESS ( op == 'show' ) %]
1000 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1002 <div class="col-sm-2 col-sm-pull-10">
1004 <form name="suggestionfilter" action="suggestion.pl" method="get">
1005 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
1006 <fieldset class="brief">
1007 <ol style="display:block;">
1009 <label for="displayby">Organize by: </label>
1010 <select name="displayby" id="displayby" style="width:auto;">
1011 [% IF ( displayby == "STATUS" ) %]
1012 <option value="STATUS" selected="selected">Status</option>
1014 <option value="STATUS">Status</option>
1016 [% IF ( displayby == "branchcode" ) %]
1017 <option value="branchcode" selected="selected">Library</option>
1019 <option value="branchcode">Library</option>
1021 [% IF ( displayby == "itemtype" ) %]
1022 <option value="itemtype" selected="selected">Item type</option>
1024 <option value="itemtype">Item type</option>
1026 [% IF ( displayby == "managedby" ) %]
1027 <option value="managedby" selected="selected">Managed by</option>
1029 <option value="managedby">Managed by</option>
1031 [% IF ( displayby == "acceptedby" ) %]
1032 <option value="acceptedby" selected="selected">Accepted by</option>
1034 <option value="acceptedby">Accepted by</option>
1037 <input type="submit" value="Go" />
1040 </fieldset> <!-- /.brief -->
1042 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
1045 <fieldset class="brief">
1046 <h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
1049 <label for="title"> Title:</label>
1050 <input type="text" id="title" name="title" value="[% title | html %]" />
1053 <label for="author"> Author:</label>
1054 <input type="text" id="author" name="author" value="[% author | html %]" />
1057 <label for="isbn"> ISBN:</label>
1058 <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" />
1061 <label for="publishercode"> Publisher:</label>
1062 <input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" />
1065 <label for="copyrightdate_filter"> Copyright date:</label>
1066 <input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" />
1069 <label for="collectiontitle"> Collection title:</label>
1070 <input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" />
1073 </fieldset> <!-- /.brief -->
1075 <fieldset class="brief">
1076 <h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
1079 <label for="archived" style="display: inline;">Include archived:</label>
1080 [% IF filter_archived %]
1081 <input type="checkbox" id="archived" value="1" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
1083 <input type="checkbox" id="archived" value="1" name="filter_archived" title="Include archived suggestions in the search" />
1087 <label for="STATUS[% loop.index | html %]"> Status:</label>
1088 <select name="STATUS" id="STATUS[% loop.index | html %]">
1089 <option value="">Any</option>
1090 [% IF (statusselected_ASKED ) %]
1091 <option value="ASKED" selected="selected">Pending</option>
1093 <option value="ASKED">Pending</option>
1096 [% IF (statusselected_ACCEPTED ) %]
1097 <option value="ACCEPTED" selected="selected">Accepted</option>
1099 <option value="ACCEPTED">Accepted</option>
1102 [% IF (statusselected_CHECKED ) %]
1103 <option value="CHECKED" selected="selected">Checked</option>
1105 <option value="CHECKED">Checked</option>
1108 [% IF ( statusselected_REJECTED ) %]
1109 <option value="REJECTED" selected="selected">Rejected</option>
1111 <option value="REJECTED">Rejected</option>
1114 [% IF ( statusselected_ORDERED ) %]
1115 <option value="ORDERED" selected="selected">Ordered</option>
1117 <option value="ORDERED">Ordered</option>
1120 [% FOREACH s IN SuggestionStatuses %]
1121 [% IF s.authorised_value == selected_status %]
1122 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
1124 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
1131 <label for="suggestedby"> Suggested by:</label>
1132 <select id="suggestedby" name="suggestedby">
1133 <option value="">Any</option>
1134 [% FOREACH suggestedby_loo IN suggestedby_loop %]
1135 [% IF ( suggestedby_loo.selected ) %]
1136 <option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>
1138 <option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>
1144 <label for="suggesteddate_from">Suggested date from:</label>
1145 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" data-date_to="suggesteddate_to" class="flatpickr" />
1148 <label for="suggesteddate_to">To:</label>
1149 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" class="flatpickr" />
1152 <label for="managedby"> Managed by:</label>
1153 <select id="managedby" name="managedby">
1154 <option value="">Any</option>
1155 [% FOREACH managedby_loo IN managedby_loop %]
1156 [% IF ( managedby_loo.selected ) %]
1157 <option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>
1159 <option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>
1165 <label for="manageddate_from">Management date from:</label>
1166 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" data-date_to="manageddate_to" class="flatpickr" />
1169 <label for="manageddate_to">To:</label>
1170 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" class="flatpickr" />
1173 <label for="acceptedby"> Accepted by:</label>
1174 <select id="acceptedby" name="acceptedby">
1175 <option value="">Any</option>
1176 [% FOREACH acceptedby_loo IN acceptedby_loop %]
1177 [% IF ( acceptedby_loo.selected ) %]
1178 <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>
1180 <option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>
1186 <label for="accepteddate_from">Accepted date from:</label>
1187 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" data-date_to="accepteddate_to" class="flatpickr" />
1190 <label for="accepteddate_to">To:</label>
1191 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" class="flatpickr" />
1194 <input type="submit" value="Go" />
1199 <fieldset class="brief">
1200 <h4 class="local_collapse">
1201 <a href="#">Acquisition information</a>
1205 <label for="budgetid"> Book fund:</label>
1206 <select name="budgetid" id="budgetid">
1207 <option value="__ANY__">Any</option>
1208 [% IF budgetid == '__NONE__' %]
1209 <option value="__NONE__" selected="selected">None</option>
1211 <option value="__NONE__">None</option>
1213 [% FOREACH budgetsloo IN budgetsloop %]
1214 [% IF ( budgetsloo.selected ) %]
1215 <option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>
1217 <option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>
1223 <input type="submit" value="Go" />
1227 </div> <!-- /#limits -->
1228 </form> <!-- /suggestionsfilter -->
1230 [% INCLUDE 'acquisitions-menu.inc' %]
1233 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1234 [% END # /UNLESS ( op == 'show' ) %]
1235 [% END # /UNLESS op == 'save' %]
1236 </div> <!-- /.row -->
1238 [% END # /IF op == "show" %]
1240 [% MACRO jsinclude BLOCK %]
1241 [% INCLUDE 'calendar.inc' %]
1245 function editManagerPopup(selected_tab) {
1247 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_manager&filter=suggestions_managers",
1249 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1250 + 'scrollbars=yes,resize=yes'
1253 function select_manager(borrowernumber, borrower) {
1254 var managedby_name = $("#managedby_name"+tab);
1255 var managedby = $("#managedby"+tab);
1256 managedby_name.empty();
1258 var borrowername = borrower.firstname + ' ' + borrower.surname;
1259 if (borrowernumber) {
1260 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1261 + '?borrowernumber=' + borrowernumber + '">'
1262 + borrowername + '</a>';
1263 managedby_name.html(managerlink);
1264 managedby.val(borrowernumber);
1267 [% IF op == "save" %]
1268 var notify = $('#notify');
1269 if ( notify.length ) {
1270 [% IF managedby_patron %]
1271 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
1273 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) {
1275 $(notify).prop('checked', false).prop('disabled', true);
1277 $(notify).prop('disabled', false);
1283 function editSuggesterPopup() {
1284 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_suggester",
1286 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1287 + 'scrollbars=yes,resize=yes'
1291 function select_suggester(borrowernumber, borrower) {
1292 var suggested = '<input type="hidden" id="suggestedby" name="suggestedby" value="' + borrowernumber + '" />';
1293 suggested += '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + borrowernumber + '">';
1294 suggested += borrower.surname + ', ' + borrower.firstname + ' (' + borrower.cardnumber + ')';
1295 suggested += '</a> ';
1296 suggested += borrower.branchname + ' (' + borrower.category_description + ')';
1297 $("#tdsuggestedby").html(suggested);
1300 $(document).ready(function(){
1301 $("#edit_manager").on("click",function(e){
1303 editManagerPopup('');
1305 $(".set_manager").on("click",function(e){
1307 var selected_tab = $(this).data('tab');
1308 editManagerPopup(selected_tab);
1311 $("#edit_suggester").on("click", function(e){
1313 editSuggesterPopup();
1318 [% IF ( op == 'show' || op == 'else' ) %]
1320 $(document).ready(function(){
1321 $(".deletesuggestion").on("click",function(){
1322 return confirm(_("Are you sure you want to delete this suggestion?"));
1327 [% IF op == 'else' %]
1328 [% INCLUDE 'datatables.inc' %]
1329 [% INCLUDE 'columns_settings.inc' %]
1331 $(document).ready(function() {
1332 if( $("#suggestiontabs .tab-pane.active").length < 1 ){
1333 $("#suggestiontabs a:first").tab("show");
1336 table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1337 [% FOREACH suggestion IN suggestions %]
1338 [% IF suggestion.suggestions.size %]
1339 KohaTable("table_[% loop.count| html %]", {
1340 "sorting": [[ 3, "asc" ]],
1342 }, table_settings );
1346 $("#branchcode").on('change',function(){
1347 [%# Modify the hidden input in the filters block from the library %]
1348 [%# dropdown list at the top of suggestion list %]
1349 let branchcode = $(this).val();
1350 $('input[name="branchcode"]').val( branchcode );
1351 $('form[name="suggestionfilter"]').submit();
1354 $(".checkall").click(function(e){
1356 $(this).parents('form').find("input:checkbox").each(function(){
1357 $(this).prop("checked", true);
1360 $(".uncheckall").click(function(e){
1362 $(this).parents('form').find("input:checkbox").each(function(){
1363 $(this).prop("checked", false);
1366 $(".other_reason").hide();
1367 $("select[name='reason']").change(function(){
1368 if($(this).val() == "other"){
1370 $(this).siblings(".other_reason").show();
1374 $("a.cancel_note").click(function(e) {
1375 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
1376 $(this).siblings("input[name='other_reason']").hide();
1379 $("h4.local_collapse a").click(function(){
1380 $(this).parent().parent().find("ol").toggle();
1384 $("button[type='submit']").on("click", function(e) {
1385 var submit_button = this;
1386 var form = $(submit_button).parents("form");
1387 var action = $(submit_button).val();
1388 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1389 if ( selected_suggestions.length == 0 ) {
1390 alert(_("Please select at least one suggestion"));
1394 if ( action == "delete" ) {
1395 if ( selected_suggestions.length == 1 ) {
1396 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1400 } else if ( selected_suggestions.length > 1 ) {
1401 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1406 } else if ( action == "update_manager" ) {
1407 var managedby = $(submit_button).siblings("suggestion_managedby");
1408 if ( managedby.val() == "" ) {
1409 alert(_("Please select a manager to assign to the selected suggestions"));
1415 $('<input />').attr('type', 'hidden')
1417 .attr('value', action)
1424 [% IF op == 'save' %]
1427 $(document).ready(function(){
1429 $("#quantity,#price,#currency").on("change",function(){
1433 [% IF other_reason %]
1434 $(".select-reason").hide();
1435 $(".select-reason").find("option[value='other']").attr("selected","selected");
1436 $("#other_reason").show();
1438 $("#other_reason").hide();
1440 $(".select-reason").change(function(){
1441 if($(this).val() == "other"){
1443 $("#other_reason").show();
1446 $("a[href*=back]").click(function(){
1447 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1448 $("#other_reason").hide();
1451 $("#restore_previous_manager").on("click",function(e){
1454 $("#managedby_name").empty();
1455 $("#managedby").val('');
1456 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1457 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1458 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1459 + borrowername + '</a>';
1460 $('#managedby_name').html(managerlink);
1461 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1462 $('#notify').prop('checked', false).prop('disabled', true);
1465 //keep a copy of all budgets before removing the inactives
1466 var budgetId = $("form#add_edit #budgetid");
1467 var disabledBudgetsCopy = budgetId.html();
1468 $('.b_inactive').remove();
1470 $('#showallfunds').click(function() {
1471 if ($(this).is(":checked")) {
1472 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
1475 $('.b_inactive').remove();
1482 [% Asset.js("js/acq.js") | $raw %]
1483 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1485 [% INCLUDE 'intranet-bottom.inc' %]