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 [% WRAPPER 'header.inc' %]
57 [% INCLUDE 'cat-search.inc' %]
60 [% WRAPPER 'sub-header.inc' %]
61 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
64 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
67 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
71 [% IF ( suggestionid ) %]
73 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
76 <a href="#" aria-current="page">
77 Edit suggestion #[% suggestionid | html %]
82 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
85 <a href="#" aria-current="page">
90 [% ELSIF ( op == 'show' ) %]
92 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a>
95 <a href="#" aria-current="page">
96 Show suggestion #[% suggestionid | html %]
101 <a href="#" aria-current="page">
102 Suggestions management
107 </nav> <!-- /.breadcrumbs -->
110 [% IF ( op == 'show' ) %]
111 <div class="main container-fluid">
113 <div class="col-md-8 col-md-offset-2">
115 <div id="toolbar" class="btn-toolbar">
116 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
117 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
120 <fieldset class="rows">
121 <legend>Bibliographic information</legend>
125 <span class="label">Title:</span>
126 [% IF suggestion.biblionumber %]
127 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
135 <span class="label">Author:</span>
139 [% IF ( copyrightdate ) %]
141 <span class="label">Copyright date:</span>
142 [% copyrightdate | html %]
147 <span class="label">ISBN or ISSN or other standard number:</span>
151 [% IF ( publishercode ) %]
153 <span class="label">Publisher:</span>
154 [% publishercode | html %]
159 <span class="label">Publication place:</span>
163 [% IF ( collectiontitle ) %]
165 <span class="label">Collection title:</span>
166 [% collectiontitle | html %]
169 [% IF ( itemtype ) %]
171 <span class="label">Document type:</span>
172 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
175 [% IF ( patron_reason_loop ) %]
177 <span class="label">Reason for suggestion: </span>
178 [% FOREACH patron_reason_loo IN patron_reason_loop %]
179 [% IF patron_reason_loo.authorised_value == patronreason %]
180 [% patron_reason_loo.lib | html %]
187 <span class="label">Notes:</span>
191 [% IF ( staff_note ) %]
193 <span class="label">Notes:</span>
194 [% staff_note | html %]
200 <fieldset class="rows">
201 <legend>Suggestion management</legend>
204 <span class="label">Status:</span>
205 [% SET status_found = 0 %]
206 [% IF ( STATUS == 'ASKED' ) %]
208 [% SET status_found = 1 %]
209 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
210 <span>Accepted</span>
211 [% SET status_found = 1 %]
212 [% ELSIF ( STATUS == 'CHECKED' ) %]
214 [% SET status_found = 1 %]
215 [% ELSIF ( STATUS == 'REJECTED' ) %]
216 <span>Rejected</span>
217 [% SET status_found = 1 %]
218 [% ELSIF ( STATUS == 'ORDERED' ) %]
220 [% SET status_found = 1 %]
221 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
222 <span>Available</span>
223 [% SET status_found = 1 %]
225 [% FOREACH s IN SuggestionStatuses %]
226 [% IF STATUS == s.authorised_value %]
228 [% SET status_found = 1 %]
234 <span class="label">Reason:</span>
236 [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
251 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
252 <td>[% suggesteddate | $KohaDates %]</td>
254 [% IF ( suggestedby_patron.borrowernumber ) %]
255 <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>
256 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
262 <td>[% manageddate | $KohaDates %]</td>
264 [% IF ( managedby_patron.borrowernumber ) %]
265 <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>
266 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
271 <th>Accepted on:</th>
272 <td>[% accepteddate | $KohaDates %]</td>
274 [% IF ( acceptedby_patron.borrowernumber ) %]
275 <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>
276 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
281 <th>Last modification on:</th>
282 <td>[% lastmodificationdate | $KohaDates %]</td>
284 [% IF ( lastmodificationby_patron.borrowernumber ) %]
285 <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>
286 [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
294 <fieldset class="rows">
295 <legend>Acquisition information</legend>
298 <span class="label">Library:</span>
299 [% Branches.GetName( branchcode ) | html %]
302 <span class="label">Fund:</span>
303 [% budgetname | html %]
306 <span class="label">Copies:</span>
307 [% quantity | html %]
310 <span class="label">Currency:</span>
311 [% currency | html %]
314 <span class="label">Price:</span>
318 <span class="label">Total</span>
324 <fieldset class="action">
325 <a href="suggestion.pl"><< Back to suggestions</a>
328 </div> <!-- /.col-md-8 col-md-offset-2 -->
329 </div> <!-- /.row -->
330 [% ELSE # IF op == "show" %]
332 [% IF op == 'save' %]
333 <div class="main container-fluid">
335 <div class="col-md-8 col-md-offset-2">
337 <div class="main container-fluid">
339 <div class="col-sm-10 col-sm-push-2">
342 [% IF op == 'save' %]
343 [% FOR m IN messages %]
344 <div class="dialog [% m.type | html %]">
346 [% CASE 'biblio_exists' %]
347 <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>
348 [% CASE 'manager_not_enough_permissions' %]
349 <span>The manager you selected does not have sufficient permissions.</span>
351 <span>[% m.code | html %]</span>
353 </div> <!-- /.dialog -->
356 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
357 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
358 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
359 [% IF ( suggestionid ) %]
360 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
361 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
363 <h1>Enter a new purchase suggestion</h1>
366 <fieldset class="rows">
367 <legend>Bibliographic information</legend>
370 <label for="title" class="required">Title:</label>
371 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
372 <span class="required">Required</span>
375 <label for="author">Author:</label>
376 <input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/>
379 <label for="copyrightdate">Copyright date:</label>
380 <input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" />
383 <label for="isbn">ISBN or ISSN or other standard number:</label>
384 <input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/>
387 <label for="publishercode">Publisher:</label>
388 <input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/>
391 <label for="place">Publication place:</label>
392 <input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/>
395 <label for="collectiontitle">Collection title:</label>
396 <input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/>
399 <label for="itemtype">Document type:</label>
400 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
402 [% IF patron_reason_loop %]
404 <label for="patronreason">Reason for suggestion: </label>
405 <select name="patronreason" id="patronreason">
406 <option value=""> -- Choose -- </option>
407 [% FOREACH patron_reason_loo IN patron_reason_loop %]
408 [% IF patron_reason_loo.authorised_value == patronreason %]
409 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
411 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
416 [% END # /IF patron_reason_loop %]
418 <label for="note">Notes:</label>
419 <textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea>
422 <label for="note">Non-public notes:</label>
423 <textarea name="staff_note" id="staff_note" rows="5" cols="40">[% staff_note | html %]</textarea>
428 <fieldset class="rows">
429 <legend>Suggestion management</legend>
431 [% IF ( suggestionid ) %]
433 <label for="STATUS">Status:</label>
434 <select id="STATUS" name="STATUS">
435 <option value="">No status</option>
437 [% IF (statusselected_ASKED ) %]
438 <option value="ASKED" selected="selected">Pending</option>
440 <option value="ASKED">Pending</option>
443 [% IF (statusselected_ACCEPTED ) %]
444 <option value="ACCEPTED" selected="selected">Accepted</option>
446 <option value="ACCEPTED">Accepted</option>
449 [% IF (statusselected_CHECKED ) %]
450 <option value="CHECKED" selected="selected">Checked</option>
452 <option value="CHECKED">Checked</option>
455 [% IF ( statusselected_REJECTED ) %]
456 <option value="REJECTED" selected="selected">Rejected</option>
458 <option value="REJECTED">Rejected</option>
461 [% IF ( statusselected_ORDERED ) %]
462 <option value="ORDERED" selected="selected">Ordered</option>
464 <option value="ORDERED">Ordered</option>
467 [% FOREACH s IN SuggestionStatuses %]
468 [% IF s.authorised_value == suggestion.STATUS %]
469 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
471 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
477 <label for="reason">Reason:</label>
478 <select class="select-reason" id="reason" name="reason">
479 <option value=""> -- Choose a reason -- </option>
480 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
481 [% IF (reasonsloo.lib == suggestion.reason) %]
482 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
484 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
487 <option value="other">Others...</option>
490 <span id="other_reason" name="other_reason">
491 [% IF other_reason %]
492 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
494 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
496 <a href="#back">Cancel</a>
513 <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
516 <input type="text" id="suggesteddate" name="suggesteddate" class="flatpickr" size="10" maxlength="10" value="[% suggesteddate | html %]"/> [% INCLUDE 'date-format.inc' %]
518 <td id="tdsuggestedby">
519 <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>
520 [% IF ( suggestedby_patron.borrowernumber ) %]
521 <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 %])
525 <a href="#" id="edit_suggester" class="btn btn-default">Set to patron</a>
530 <label for="accepteddate">Accepted on:</label>
533 <input type="text" id="accepteddate" name="accepteddate" class="flatpickr" size="10" maxlength="10" value="[% accepteddate | html %]" />[% INCLUDE 'date-format.inc' %]
536 <input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>
537 [% IF ( acceptedby_patron.borrowernumber ) %]
538 <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>
539 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
546 <label for="lastmodificationdate">Last modification on:</label>
549 [% lastmodificationdate | $KohaDates %]
552 [% IF lastmodificationby_patron %]
553 [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
562 <label for="managedon">Managed on:</label>
563 <input type="text" id="managedon" name="manageddate" class="flatpickr" size="10" maxlength="10" value="[% manageddate | html %]" />[% INCLUDE 'date-format.inc' %]
566 <label for="managedby_name">by:</label>
568 <span id="managedby_name" name="managedby_name">
569 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
571 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
572 | 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 %])
575 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
576 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
577 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
579 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
582 <label for="notify">Notify manager:</label>
583 <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." />
589 <fieldset class="rows">
590 <legend>Acquisition information</legend>
593 <label for="branchcode">Library:</label>
594 <select name="branchcode" id="branchcode">
595 <option value="">Any</option>
596 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
600 <label for="budgetid">Fund:</label>
601 <select name="budgetid" id="budgetid">
602 <option value="">Any</option>
603 [% FOREACH budget IN sugg_budgets %]
604 [% IF ( budget.selected ) %]
605 <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
606 [% ELSIF ( budget.b_active ) %]
607 <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
609 <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
613 <label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
614 <input type="checkbox" id="showallfunds" />
617 <label for="quantity">Copies:</label>
618 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
621 <label for="currency">Currency:</label>
622 [% FOREACH c IN currencies %]
623 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
624 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
626 <select name="currency" id="currency">
627 [% FOREACH c IN currencies %]
628 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
629 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
630 [% ELSIF not c.archived %]
631 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
637 <label for="price">Price:</label>
638 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
641 <label for="total">Total: </label>
642 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
645 </fieldset> <!-- /.rows -->
647 <input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
649 <fieldset class="action">
650 <input type="hidden" name="op" value="[% op | html %]" />
651 [% IF ( suggestionid ) %]
652 [% IF ( need_confirm ) %]
653 <input type="hidden" name="save_confirmed" value="1" />
654 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
656 <input type="submit" value="Save" />
658 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
660 [% IF ( need_confirm ) %]
661 <input type="hidden" name="save_confirmed" value="1" />
662 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
664 <input type="submit" value="Submit your suggestion" />
666 <a class="cancel" href="suggestion.pl">Cancel</a>
668 </fieldset> <!-- /.action -->
669 </form> <!-- /#add_edit -->
670 [% END # /IF op == 'save' %]
672 [% IF op == 'else' %]
673 <div id="toolbar" class="btn-toolbar">
674 <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>
677 <h1>Suggestions management</h1>
679 [% IF ( displayby != "branchcode" ) %]
680 <label for="branchcode">Viewing suggestions for library:</label>
681 <select name="branchcode" id="branchcode">
682 <option value="__ANY__">Any</option>
683 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
687 [% FOR m IN messages %]
688 <div class="dialog [% m.type | html %]">
690 [% CASE 'already_exists' %]
691 <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>
692 [% CASE 'biblio_exists' %]
693 <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>
695 <span>[% m.code | html %]</span>
697 </div> <!-- /.dialog -->
700 [% IF suggestions.size && !notabs %]
701 <div id="suggestiontabs" class="toptabs">
702 <ul class="nav nav-tabs" role="tablist">
703 [% FOREACH suggestion IN suggestions %]
704 <li role="presentation">
705 <a href="#[% suggestion.suggestiontype | uri %]" aria-controls="[% suggestion.suggestiontype | uri %]" role="tab" data-toggle="tab">
706 [% IF ( suggestion.suggestiontypelabel ) %]
707 [% IF (suggestion.suggestiontypelabel == "Pending") %]<span>Pending</span>
708 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]<span>Accepted</span>
709 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]<span>Checked</span>
710 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]<span>Rejected</span>
711 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]<span>Available</span>
712 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]<span>Ordered</span>
713 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]<span>Status unknown</span>
714 [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]<span>Any</span>
715 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
717 [% IF ( suggestion.suggestiontype ) %]
718 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
723 ([% suggestion.suggestions.size| html %])
726 [% END # /FOREACH suggestion %]
727 </ul> <!-- /.ui-tabs-nav -->
728 <div class="tab-content">
729 [% END # IF suggestions.size && !notabs %]
731 [% FOREACH suggestion IN suggestions %]
732 [% UNLESS ( notabs ) %]
733 <div id="[% suggestion.suggestiontype | html %]" role="tabpanel" class="tab-pane">
735 <div id="[% suggestion.suggestiontype | html %]">
737 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
739 [% IF suggestion.suggestions.size %]
741 <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
744 <table id="table_[% loop.count | html %]" class="sorted">
747 <th class="NoSort noExport"> </th>
748 <th class="anti-the">Suggestion</th>
749 <th>Suggested by</th>
750 <th>Suggested on</th>
751 <th>Patron reason</th>
754 <th>Last modification by</th>
755 <th>Last modification on</th>
756 <th>Last updated</th>
759 <th>Non-public note</th>
761 <th class="NoSort noExport"> </th>
765 [% FOREACH s IN suggestion.suggestions %]
768 <input type="checkbox" name="suggestionid" value="[% s.suggestionid | html %]" />
771 <a href="suggestion.pl?suggestionid=[% s.suggestionid | uri %]&op=show" title="suggestion" >
772 [% s.title | html %][% IF ( s.author ) %], by [% s.author | html %][% END %]
775 [% IF ( s.copyrightdate ) %]
776 © <span class="suggestion_copyrightdate">[% s.copyrightdate | html %]</span>
778 [% IF ( s.volumedesc ) %]
779 ; <span class="suggestion_volume">Volume:<em>[% s.volumedesc | html %]</em></span>
782 ; <span class="suggestion_isbn">ISBN: <em>[% s.isbn | html %]</em></span>
784 [% IF ( s.publishercode ) %]
785 ; <span class="suggestion_publishercode">Published by [% s.publishercode | html %]</span>
787 [% IF ( s.publicationyear ) %]
788 in <span class="suggestion_publicationyear"><em>[% s.publicationyear | html %]</em></span>
791 in <span class="suggestion_place"><em>[% s.place | html %]</em></span>
793 [% IF ( s.collectiontitle ) %]
794 ; <span class="suggestion_collectiontitle">[% s.collectiontitle | html %]</span>
796 [% IF ( s.itemtype ) %]
797 ; <span class="suggestion_itype">[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', s.itemtype, 0 ) | html %]</span>
801 <div class="suggestion_note"><i class="fa fa-comment"></i> [% s.note | html %]</div>
804 <br /><i class="fa fa-archive"></i> Archived
808 [% SET suggester = s.suggester %]
809 <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>
811 <td data-order="[% s.suggesteddate | html %]">
812 [% IF ( s.suggesteddate ) %][% s.suggesteddate | $KohaDates %][% END %]
814 <td>[% AuthorisedValues.GetByCode( 'OPAC_SUG', s.patronreason ) | html %]</td>
816 [% SET manager = s.manager %]
817 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% manager.borrowernumber | uri %]">[% manager.surname | html %][% IF manager.firstname %], [% manager.firstname | html %][% END %]</a>
819 <td data-order="[% s.manageddate | html %]">
820 [% IF ( s.manageddate ) %][% s.manageddate | $KohaDates %][% END %]
823 [% SET last_modifier = s.last_modifier %]
824 <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>
826 <td data-order="[% s.lastmodificationdate | html %]">
827 [% IF ( s.lastmodificationdate ) %][% s.lastmodificationdate | $KohaDates %][% END %]
830 [% s.lastmodificationdate | $KohaDates %]
833 [% Branches.GetName( s.branchcode ) | html %]
836 [% s.fund.budget_name | html %]
839 [% s.staff_note | html %]
842 [% IF s.STATUS == 'ASKED' %]
844 [% ELSIF s.STATUS == 'ACCEPTED' %]
845 <span>Accepted</span>
846 [% ELSIF s.STATUS == 'ORDERED' %]
848 [% ELSIF s.STATUS == 'REJECTED' %]
849 <span>Rejected</span>
850 [% ELSIF s.STATUS == 'CHECKED' %]
852 [% ELSIF s.STATUS == 'AVAILABLE' %]
853 <span>Available</span>
854 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', s.STATUS ) %]
855 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', s.STATUS ) | html %]
857 <span>Status unknown</span>
860 [% IF ( s.reason ) %]
861 <br />([% s.reason | html %])
865 <div class="btn-group dropup">
866 <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>
867 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]">
868 <li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
869 [% UNLESS s.archived %]
870 <li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
872 <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% s.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
878 [% END # /FOREACH s %]
880 </table> <!-- /#table_[% loop.count | html %] -->
883 <h2 style="padding-left:1em;">Change selected suggestions</h2>
884 <div class="col-sm-4">
886 <div id="select-reason[% loop.index | html %]">
887 <label for="STATUSreason[% loop.index | html %]">Mark selected as: </label>
888 <select name="STATUS" id="STATUSreason[% loop.index | html %]">
889 <option value=""> -- Choose a status --</option>
891 [% IF (statusselected_ASKED ) %]
892 <option value="ASKED" selected="selected">Pending</option>
894 <option value="ASKED">Pending</option>
897 [% IF (statusselected_ACCEPTED ) %]
898 <option value="ACCEPTED" selected="selected">Accepted</option>
900 <option value="ACCEPTED">Accepted</option>
903 [% IF (statusselected_CHECKED ) %]
904 <option value="CHECKED" selected="selected">Checked</option>
906 <option value="CHECKED">Checked</option>
909 [% IF ( statusselected_REJECTED ) %]
910 <option value="REJECTED" selected="selected">Rejected</option>
912 <option value="REJECTED">Rejected</option>
915 [% IF ( statusselected_ORDERED ) %]
916 <option value="ORDERED" selected="selected">Ordered</option>
918 <option value="ORDERED">Ordered</option>
921 [% FOREACH s IN SuggestionStatuses %]
922 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
926 <label for="choosereason[% loop.index | html %]">with this reason:</label>
927 <select name="reason" id="choosereason[% loop.index | html %]">
928 <option value=""> -- Choose a reason -- </option>
929 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
930 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
932 <option value="other">Others...</option>
935 <span class="other_reason">
936 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
937 <a href="#" class="cancel_note">Cancel</a>
941 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
942 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
943 <fieldset class="action">
944 <button type="submit" class="btn btn-default btn-xs" value="update_status">Submit</button>
947 </div> <!-- /.col-sm-4 -->
949 <div class="col-sm-4">
952 Update item types with:
953 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
955 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
956 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
957 <fieldset class="action">
958 <button type="submit" class="btn btn-default btn-xs" value="update_itemtype">Submit</button>
961 </div> <!-- /.col-sm-4 -->
963 <div class="col-sm-2">
965 <span class="label">Update manager</span><br/>
966 <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>
967 <span id="managedby_name[% loop.count | html %]"></span>
968 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
969 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
970 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
971 <fieldset class="action">
972 <button type="submit" class="btn btn-default btn-xs" value="update_manager">Submit</button>
975 </div> <!-- /.col-sm-2 -->
977 <div class="col-sm-2">
979 <span class="label">Delete selected</span>
980 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
981 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
982 <fieldset class="action">
983 <button type="submit" class="btn btn-default btn-xs" value="delete">Delete</button>
986 </div> <!-- /.col-sm-2 -->
987 </div> <!-- /.row -->
990 <strong>No results.</strong>
991 [% END # /IF ( suggestion.suggestions_loop ) %]
992 </form> <!-- /.update_suggestions -->
993 </div> <!-- /#[% suggestion.suggestiontype | html %] -->
994 [% END # /FOREACH suggestion %]
995 [% IF suggestions.size && !notabs %]
996 </div> <!-- /.tab-content -->
997 </div> <!-- /.notabs -->
998 [% END # /UNLESS notabs %]
999 [% END # /IF op == 'else' %]
1001 [% UNLESS op == 'save' %]
1002 [% UNLESS ( op == 'show' ) %]
1003 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1005 <div class="col-sm-2 col-sm-pull-10">
1007 <form name="suggestionfilter" action="suggestion.pl" method="get">
1008 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
1009 <fieldset class="brief">
1010 <ol style="display:block;">
1012 <label for="displayby">Organize by: </label>
1013 <select name="displayby" id="displayby" style="width:auto;">
1014 [% IF ( displayby == "STATUS" ) %]
1015 <option value="STATUS" selected="selected">Status</option>
1017 <option value="STATUS">Status</option>
1019 [% IF ( displayby == "branchcode" ) %]
1020 <option value="branchcode" selected="selected">Library</option>
1022 <option value="branchcode">Library</option>
1024 [% IF ( displayby == "itemtype" ) %]
1025 <option value="itemtype" selected="selected">Item type</option>
1027 <option value="itemtype">Item type</option>
1029 [% IF ( displayby == "managedby" ) %]
1030 <option value="managedby" selected="selected">Managed by</option>
1032 <option value="managedby">Managed by</option>
1034 [% IF ( displayby == "acceptedby" ) %]
1035 <option value="acceptedby" selected="selected">Accepted by</option>
1037 <option value="acceptedby">Accepted by</option>
1040 <input type="submit" value="Go" />
1043 </fieldset> <!-- /.brief -->
1045 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
1048 <fieldset class="brief">
1049 <h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
1052 <label for="title"> Title:</label>
1053 <input type="text" id="title" name="title" value="[% title | html %]" />
1056 <label for="author"> Author:</label>
1057 <input type="text" id="author" name="author" value="[% author | html %]" />
1060 <label for="isbn"> ISBN:</label>
1061 <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" />
1064 <label for="publishercode"> Publisher:</label>
1065 <input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" />
1068 <label for="copyrightdate_filter"> Copyright date:</label>
1069 <input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" />
1072 <label for="collectiontitle"> Collection title:</label>
1073 <input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" />
1076 </fieldset> <!-- /.brief -->
1078 <fieldset class="brief">
1079 <h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
1082 <label for="archived" style="display: inline;">Include archived:</label>
1083 [% IF filter_archived %]
1084 <input type="checkbox" id="archived" value="1" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
1086 <input type="checkbox" id="archived" value="1" name="filter_archived" title="Include archived suggestions in the search" />
1090 <label for="STATUS[% loop.index | html %]"> Status:</label>
1091 <select name="STATUS" id="STATUS[% loop.index | html %]">
1092 <option value="">Any</option>
1093 [% IF (statusselected_ASKED ) %]
1094 <option value="ASKED" selected="selected">Pending</option>
1096 <option value="ASKED">Pending</option>
1099 [% IF (statusselected_ACCEPTED ) %]
1100 <option value="ACCEPTED" selected="selected">Accepted</option>
1102 <option value="ACCEPTED">Accepted</option>
1105 [% IF (statusselected_CHECKED ) %]
1106 <option value="CHECKED" selected="selected">Checked</option>
1108 <option value="CHECKED">Checked</option>
1111 [% IF ( statusselected_REJECTED ) %]
1112 <option value="REJECTED" selected="selected">Rejected</option>
1114 <option value="REJECTED">Rejected</option>
1117 [% IF ( statusselected_ORDERED ) %]
1118 <option value="ORDERED" selected="selected">Ordered</option>
1120 <option value="ORDERED">Ordered</option>
1123 [% FOREACH s IN SuggestionStatuses %]
1124 [% IF s.authorised_value == selected_status %]
1125 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
1127 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
1134 <label for="suggestedby"> Suggested by:</label>
1135 <select id="suggestedby" name="suggestedby">
1136 <option value="">Any</option>
1137 [% FOREACH suggestedby_loo IN suggestedby_loop %]
1138 [% IF ( suggestedby_loo.selected ) %]
1139 <option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>
1141 <option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>
1147 <label for="suggesteddate_from">Suggested date from:</label>
1148 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" data-date_to="suggesteddate_to" class="flatpickr" />
1151 <label for="suggesteddate_to">To:</label>
1152 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" class="flatpickr" />
1155 <label for="managedby"> Managed by:</label>
1156 <select id="managedby" name="managedby">
1157 <option value="">Any</option>
1158 [% FOREACH managedby_loo IN managedby_loop %]
1159 [% IF ( managedby_loo.selected ) %]
1160 <option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>
1162 <option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>
1168 <label for="manageddate_from">Management date from:</label>
1169 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" data-date_to="manageddate_to" class="flatpickr" />
1172 <label for="manageddate_to">To:</label>
1173 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" class="flatpickr" />
1176 <label for="acceptedby"> Accepted by:</label>
1177 <select id="acceptedby" name="acceptedby">
1178 <option value="">Any</option>
1179 [% FOREACH acceptedby_loo IN acceptedby_loop %]
1180 [% IF ( acceptedby_loo.selected ) %]
1181 <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>
1183 <option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>
1189 <label for="accepteddate_from">Accepted date from:</label>
1190 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" data-date_to="accepteddate_to" class="flatpickr" />
1193 <label for="accepteddate_to">To:</label>
1194 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" class="flatpickr" />
1197 <input type="submit" value="Go" />
1202 <fieldset class="brief">
1203 <h4 class="local_collapse">
1204 <a href="#">Acquisition information</a>
1208 <label for="budgetid"> Book fund:</label>
1209 <select name="budgetid" id="budgetid">
1210 <option value="__ANY__">Any</option>
1211 [% IF budgetid == '__NONE__' %]
1212 <option value="__NONE__" selected="selected">None</option>
1214 <option value="__NONE__">None</option>
1216 [% FOREACH budgetsloo IN budgetsloop %]
1217 [% IF ( budgetsloo.selected ) %]
1218 <option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>
1220 <option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>
1226 <input type="submit" value="Go" />
1230 </div> <!-- /#limits -->
1231 </form> <!-- /suggestionsfilter -->
1233 [% INCLUDE 'acquisitions-menu.inc' %]
1236 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1237 [% END # /UNLESS ( op == 'show' ) %]
1238 [% END # /UNLESS op == 'save' %]
1239 </div> <!-- /.row -->
1241 [% END # /IF op == "show" %]
1243 [% MACRO jsinclude BLOCK %]
1244 [% INCLUDE 'calendar.inc' %]
1248 function editManagerPopup(selected_tab) {
1250 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_manager&filter=suggestions_managers",
1252 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1253 + 'scrollbars=yes,resize=yes'
1256 function select_manager(borrowernumber, borrower) {
1257 var managedby_name = $("#managedby_name"+tab);
1258 var managedby = $("#managedby"+tab);
1259 managedby_name.empty();
1261 var borrowername = borrower.firstname + ' ' + borrower.surname;
1262 if (borrowernumber) {
1263 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1264 + '?borrowernumber=' + borrowernumber + '">'
1265 + borrowername + '</a>';
1266 managedby_name.html(managerlink);
1267 managedby.val(borrowernumber);
1270 [% IF op == "save" %]
1271 var notify = $('#notify');
1272 if ( notify.length ) {
1273 [% IF managedby_patron %]
1274 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
1276 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) {
1278 $(notify).prop('checked', false).prop('disabled', true);
1280 $(notify).prop('disabled', false);
1286 function editSuggesterPopup() {
1287 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_suggester",
1289 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1290 + 'scrollbars=yes,resize=yes'
1294 function select_suggester(borrowernumber, borrower) {
1295 var suggested = '<input type="hidden" id="suggestedby" name="suggestedby" value="' + borrowernumber + '" />';
1296 suggested += '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + borrowernumber + '">';
1297 suggested += borrower.surname + ', ' + borrower.firstname + ' (' + borrower.cardnumber + ')';
1298 suggested += '</a> ';
1299 suggested += borrower.branchname + ' (' + borrower.category_description + ')';
1300 $("#tdsuggestedby").html(suggested);
1303 $(document).ready(function(){
1304 $("#edit_manager").on("click",function(e){
1306 editManagerPopup('');
1308 $(".set_manager").on("click",function(e){
1310 var selected_tab = $(this).data('tab');
1311 editManagerPopup(selected_tab);
1314 $("#edit_suggester").on("click", function(e){
1316 editSuggesterPopup();
1321 [% IF ( op == 'show' || op == 'else' ) %]
1323 $(document).ready(function(){
1324 $(".deletesuggestion").on("click",function(){
1325 return confirm(_("Are you sure you want to delete this suggestion?"));
1330 [% IF op == 'else' %]
1331 [% INCLUDE 'datatables.inc' %]
1332 [% INCLUDE 'columns_settings.inc' %]
1334 $(document).ready(function() {
1335 if( $("#suggestiontabs .tab-pane.active").length < 1 ){
1336 $("#suggestiontabs a:first").tab("show");
1339 table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1340 [% FOREACH suggestion IN suggestions %]
1341 [% IF suggestion.suggestions.size %]
1342 KohaTable("table_[% loop.count| html %]", {
1343 "sorting": [[ 3, "asc" ]],
1345 }, table_settings );
1349 $("#branchcode").on('change',function(){
1350 [%# Modify the hidden input in the filters block from the library %]
1351 [%# dropdown list at the top of suggestion list %]
1352 let branchcode = $(this).val();
1353 $('input[name="branchcode"]').val( branchcode );
1354 $('form[name="suggestionfilter"]').submit();
1357 $(".checkall").click(function(e){
1359 $(this).parents('form').find("input:checkbox").each(function(){
1360 $(this).prop("checked", true);
1363 $(".uncheckall").click(function(e){
1365 $(this).parents('form').find("input:checkbox").each(function(){
1366 $(this).prop("checked", false);
1369 $(".other_reason").hide();
1370 $("select[name='reason']").change(function(){
1371 if($(this).val() == "other"){
1373 $(this).siblings(".other_reason").show();
1377 $("a.cancel_note").click(function(e) {
1378 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
1379 $(this).siblings("input[name='other_reason']").hide();
1382 $("h4.local_collapse a").click(function(){
1383 $(this).parent().parent().find("ol").toggle();
1387 $("button[type='submit']").on("click", function(e) {
1388 var submit_button = this;
1389 var form = $(submit_button).parents("form");
1390 var action = $(submit_button).val();
1391 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1392 if ( selected_suggestions.length == 0 ) {
1393 alert(_("Please select at least one suggestion"));
1397 if ( action == "delete" ) {
1398 if ( selected_suggestions.length == 1 ) {
1399 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1403 } else if ( selected_suggestions.length > 1 ) {
1404 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1409 } else if ( action == "update_manager" ) {
1410 var managedby = $(submit_button).siblings("suggestion_managedby");
1411 if ( managedby.val() == "" ) {
1412 alert(_("Please select a manager to assign to the selected suggestions"));
1418 $('<input />').attr('type', 'hidden')
1420 .attr('value', action)
1427 [% IF op == 'save' %]
1430 $(document).ready(function(){
1432 $("#quantity,#price,#currency").on("change",function(){
1436 [% IF other_reason %]
1437 $(".select-reason").hide();
1438 $(".select-reason").find("option[value='other']").attr("selected","selected");
1439 $("#other_reason").show();
1441 $("#other_reason").hide();
1443 $(".select-reason").change(function(){
1444 if($(this).val() == "other"){
1446 $("#other_reason").show();
1449 $("a[href*=back]").click(function(){
1450 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1451 $("#other_reason").hide();
1454 $("#restore_previous_manager").on("click",function(e){
1457 $("#managedby_name").empty();
1458 $("#managedby").val('');
1459 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1460 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1461 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1462 + borrowername + '</a>';
1463 $('#managedby_name').html(managerlink);
1464 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1465 $('#notify').prop('checked', false).prop('disabled', true);
1468 //keep a copy of all budgets before removing the inactives
1469 var budgetId = $("form#add_edit #budgetid");
1470 var disabledBudgetsCopy = budgetId.html();
1471 $('.b_inactive').remove();
1473 $('#showallfunds').click(function() {
1474 if ($(this).is(":checked")) {
1475 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
1478 $('.b_inactive').remove();
1485 [% Asset.js("js/acq.js") | $raw %]
1486 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1488 [% INCLUDE 'intranet-bottom.inc' %]