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;
34 #limits fieldset.brief {
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">Home</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 <div class="col-sm-12">
884 <h2>Change selected suggestions</h2>
888 <div class="col-sm-4">
889 <fieldset class="brief">
890 <div id="select-reason[% loop.index | html %]">
891 <label for="STATUSreason[% loop.index | html %]">Mark selected as: </label>
892 <select name="STATUS" id="STATUSreason[% loop.index | html %]">
893 <option value=""> -- Choose a status --</option>
895 [% IF (statusselected_ASKED ) %]
896 <option value="ASKED" selected="selected">Pending</option>
898 <option value="ASKED">Pending</option>
901 [% IF (statusselected_ACCEPTED ) %]
902 <option value="ACCEPTED" selected="selected">Accepted</option>
904 <option value="ACCEPTED">Accepted</option>
907 [% IF (statusselected_CHECKED ) %]
908 <option value="CHECKED" selected="selected">Checked</option>
910 <option value="CHECKED">Checked</option>
913 [% IF ( statusselected_REJECTED ) %]
914 <option value="REJECTED" selected="selected">Rejected</option>
916 <option value="REJECTED">Rejected</option>
919 [% IF ( statusselected_ORDERED ) %]
920 <option value="ORDERED" selected="selected">Ordered</option>
922 <option value="ORDERED">Ordered</option>
925 [% FOREACH s IN SuggestionStatuses %]
926 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
930 <label for="choosereason[% loop.index | html %]">with this reason:</label>
931 <select name="reason" id="choosereason[% loop.index | html %]">
932 <option value=""> -- Choose a reason -- </option>
933 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
934 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
936 <option value="other">Others...</option>
939 <span class="other_reason">
940 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
941 <a href="#" class="cancel_note">Cancel</a>
945 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
946 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
947 <fieldset class="action">
948 <button type="submit" class="btn btn-primary" value="update_status">Submit</button>
951 </div> <!-- /.col-sm-4 -->
953 <div class="col-sm-4">
954 <fieldset class="brief">
955 <label id="suggestion_itemtype">
956 Update item types with:
958 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
959 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
960 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
961 <fieldset class="action">
962 <button type="submit" class="btn btn-primary" value="update_itemtype">Submit</button>
965 </div> <!-- /.col-sm-4 -->
967 <div class="col-sm-2">
968 <fieldset class="brief">
969 <span class="label">Update manager</span>
970 <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>
971 <span id="managedby_name[% loop.count | html %]"></span>
972 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
973 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
974 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
975 <fieldset class="action">
976 <button type="submit" class="btn btn-primary" value="update_manager">Submit</button>
979 </div> <!-- /.col-sm-2 -->
981 <div class="col-sm-2">
982 <fieldset class="brief">
983 <span class="label">Delete selected</span>
984 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
985 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
986 <fieldset class="action">
987 <button type="submit" class="btn btn-primary" value="delete">Delete</button>
990 </div> <!-- /.col-sm-2 -->
991 </div> <!-- /.row -->
994 <strong>No results.</strong>
995 [% END # /IF ( suggestion.suggestions_loop ) %]
996 </form> <!-- /.update_suggestions -->
997 </div> <!-- /#[% suggestion.suggestiontype | html %] -->
998 [% END # /FOREACH suggestion %]
999 [% IF suggestions.size && !notabs %]
1000 </div> <!-- /.tab-content -->
1001 </div> <!-- /.notabs -->
1002 [% END # /UNLESS notabs %]
1003 [% END # /IF op == 'else' %]
1005 [% UNLESS op == 'save' %]
1006 [% UNLESS ( op == 'show' ) %]
1007 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1009 <div class="col-sm-2 col-sm-pull-10">
1011 <form name="suggestionfilter" action="suggestion.pl" method="get">
1012 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
1013 <fieldset class="brief">
1014 <h4>Organize by:</h4>
1017 <label for="displayby" class="sr-only">Organize by: </label>
1018 <select name="displayby" id="displayby">
1019 [% IF ( displayby == "STATUS" ) %]
1020 <option value="STATUS" selected="selected">Status</option>
1022 <option value="STATUS">Status</option>
1024 [% IF ( displayby == "branchcode" ) %]
1025 <option value="branchcode" selected="selected">Library</option>
1027 <option value="branchcode">Library</option>
1029 [% IF ( displayby == "itemtype" ) %]
1030 <option value="itemtype" selected="selected">Item type</option>
1032 <option value="itemtype">Item type</option>
1034 [% IF ( displayby == "managedby" ) %]
1035 <option value="managedby" selected="selected">Managed by</option>
1037 <option value="managedby">Managed by</option>
1039 [% IF ( displayby == "acceptedby" ) %]
1040 <option value="acceptedby" selected="selected">Accepted by</option>
1042 <option value="acceptedby">Accepted by</option>
1047 <fieldset class="action">
1048 <input type="submit" value="Go" />
1050 </fieldset> <!-- /.brief -->
1052 <fieldset class="brief">
1053 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
1056 <h4 class="local_collapse"><a href="#" data-target="biblio_information">Bibliographic information</a></h4>
1057 <fieldset class="brief" id="biblio_information">
1060 <label for="title"> Title:</label>
1061 <input type="text" id="title" name="title" value="[% title | html %]" />
1064 <label for="author"> Author:</label>
1065 <input type="text" id="author" name="author" value="[% author | html %]" />
1068 <label for="isbn"> ISBN:</label>
1069 <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" />
1072 <label for="publishercode"> Publisher:</label>
1073 <input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" />
1076 <label for="copyrightdate_filter"> Copyright date:</label>
1077 <input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" />
1080 <label for="collectiontitle"> Collection title:</label>
1081 <input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" />
1084 <fieldset class="action">
1085 <input type="submit" value="Go" />
1087 </fieldset> <!-- /#biblio_information -->
1089 <h4 class="local_collapse"><a href="#" data-target="suggestion_information">Suggestion information</a></h4>
1090 <fieldset class="brief" id="suggestion_information">
1093 <label for="archived" style="display: inline;">Include archived:</label>
1094 [% IF filter_archived %]
1095 <input type="checkbox" id="archived" value="1" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
1097 <input type="checkbox" id="archived" value="1" name="filter_archived" title="Include archived suggestions in the search" />
1101 <label for="STATUS[% loop.index | html %]"> Status:</label>
1102 <select name="STATUS" id="STATUS[% loop.index | html %]">
1103 <option value="">Any</option>
1104 [% IF (statusselected_ASKED ) %]
1105 <option value="ASKED" selected="selected">Pending</option>
1107 <option value="ASKED">Pending</option>
1110 [% IF (statusselected_ACCEPTED ) %]
1111 <option value="ACCEPTED" selected="selected">Accepted</option>
1113 <option value="ACCEPTED">Accepted</option>
1116 [% IF (statusselected_CHECKED ) %]
1117 <option value="CHECKED" selected="selected">Checked</option>
1119 <option value="CHECKED">Checked</option>
1122 [% IF ( statusselected_REJECTED ) %]
1123 <option value="REJECTED" selected="selected">Rejected</option>
1125 <option value="REJECTED">Rejected</option>
1128 [% IF ( statusselected_ORDERED ) %]
1129 <option value="ORDERED" selected="selected">Ordered</option>
1131 <option value="ORDERED">Ordered</option>
1134 [% FOREACH s IN SuggestionStatuses %]
1135 [% IF s.authorised_value == selected_status %]
1136 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
1138 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
1145 <label for="suggestedby"> Suggested by:</label>
1146 <select id="suggestedby" name="suggestedby">
1147 <option value="">Any</option>
1148 [% FOREACH suggestedby_loo IN suggestedby_loop %]
1149 [% IF ( suggestedby_loo.selected ) %]
1150 <option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>
1152 <option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>
1158 <label for="suggesteddate_from">Suggested date from:</label>
1159 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" data-date_to="suggesteddate_to" class="flatpickr" />
1162 <label for="suggesteddate_to">To:</label>
1163 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" class="flatpickr" />
1166 <label for="managedby"> Managed by:</label>
1167 <select id="managedby" name="managedby">
1168 <option value="">Any</option>
1169 [% FOREACH managedby_loo IN managedby_loop %]
1170 [% IF ( managedby_loo.selected ) %]
1171 <option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>
1173 <option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>
1179 <label for="manageddate_from">Management date from:</label>
1180 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" data-date_to="manageddate_to" class="flatpickr" />
1183 <label for="manageddate_to">To:</label>
1184 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" class="flatpickr" />
1187 <label for="acceptedby"> Accepted by:</label>
1188 <select id="acceptedby" name="acceptedby">
1189 <option value="">Any</option>
1190 [% FOREACH acceptedby_loo IN acceptedby_loop %]
1191 [% IF ( acceptedby_loo.selected ) %]
1192 <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>
1194 <option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>
1200 <label for="accepteddate_from">Accepted date from:</label>
1201 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" data-date_to="accepteddate_to" class="flatpickr" />
1204 <label for="accepteddate_to">To:</label>
1205 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" class="flatpickr" />
1208 <fieldset class="action">
1209 <input type="submit" value="Go" />
1211 </fieldset> <!-- /#suggestion_information -->
1213 <h4 class="local_collapse">
1214 <a href="#" data-target="acquisition_information">Acquisition information</a>
1216 <fieldset class="brief" id="acquisition_information">
1219 <label for="budgetid"> Book fund:</label>
1220 <select name="budgetid" id="budgetid">
1221 <option value="__ANY__">Any</option>
1222 [% IF budgetid == '__NONE__' %]
1223 <option value="__NONE__" selected="selected">None</option>
1225 <option value="__NONE__">None</option>
1227 [% FOREACH budgetsloo IN budgetsloop %]
1228 [% IF ( budgetsloo.selected ) %]
1229 <option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>
1231 <option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>
1237 <fieldset class="action">
1238 <input type="submit" value="Go" />
1240 </fieldset> <!-- /#acquisition_information -->
1241 </div> <!-- /#limits -->
1242 </fieldset> <!-- /.brief -->
1243 </form> <!-- /suggestionsfilter -->
1245 [% INCLUDE 'acquisitions-menu.inc' %]
1248 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1249 [% END # /UNLESS ( op == 'show' ) %]
1250 [% END # /UNLESS op == 'save' %]
1251 </div> <!-- /.row -->
1253 [% END # /IF op == "show" %]
1255 [% MACRO jsinclude BLOCK %]
1256 [% INCLUDE 'calendar.inc' %]
1260 function editManagerPopup(selected_tab) {
1262 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_manager&filter=suggestions_managers",
1264 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1265 + 'scrollbars=yes,resize=yes'
1268 function select_manager(borrowernumber, borrower) {
1269 var managedby_name = $("#managedby_name"+tab);
1270 var managedby = $("#managedby"+tab);
1271 managedby_name.empty();
1273 var borrowername = borrower.firstname + ' ' + borrower.surname;
1274 if (borrowernumber) {
1275 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1276 + '?borrowernumber=' + borrowernumber + '">'
1277 + borrowername + '</a>';
1278 managedby_name.html(managerlink);
1279 managedby.val(borrowernumber);
1282 [% IF op == "save" %]
1283 var notify = $('#notify');
1284 if ( notify.length ) {
1285 [% IF managedby_patron %]
1286 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
1288 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) {
1290 $(notify).prop('checked', false).prop('disabled', true);
1292 $(notify).prop('disabled', false);
1298 function editSuggesterPopup() {
1299 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,branch,category,action&selection_type=select&callback=select_suggester",
1301 'width=1024,height=768,scrollbars=yes,toolbar=no,'
1302 + 'scrollbars=yes,resize=yes'
1306 function select_suggester(borrowernumber, borrower) {
1307 var suggested = '<input type="hidden" id="suggestedby" name="suggestedby" value="' + borrowernumber + '" />';
1308 suggested += '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + borrowernumber + '">';
1309 suggested += borrower.surname + ', ' + borrower.firstname + ' (' + borrower.cardnumber + ')';
1310 suggested += '</a> ';
1311 suggested += borrower.branchname + ' (' + borrower.category_description + ')';
1312 $("#tdsuggestedby").html(suggested);
1315 $(document).ready(function(){
1316 $("#edit_manager").on("click",function(e){
1318 editManagerPopup('');
1320 $(".set_manager").on("click",function(e){
1322 var selected_tab = $(this).data('tab');
1323 editManagerPopup(selected_tab);
1326 $("#edit_suggester").on("click", function(e){
1328 editSuggesterPopup();
1333 [% IF ( op == 'show' || op == 'else' ) %]
1335 $(document).ready(function(){
1336 $(".deletesuggestion").on("click",function(){
1337 return confirm(_("Are you sure you want to delete this suggestion?"));
1342 [% IF op == 'else' %]
1343 [% INCLUDE 'datatables.inc' %]
1344 [% INCLUDE 'columns_settings.inc' %]
1346 $(document).ready(function() {
1347 if( $("#suggestiontabs .tab-pane.active").length < 1 ){
1348 $("#suggestiontabs a:first").tab("show");
1351 table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1352 [% FOREACH suggestion IN suggestions %]
1353 [% IF suggestion.suggestions.size %]
1354 KohaTable("table_[% loop.count| html %]", {
1355 "sorting": [[ 3, "asc" ]],
1357 }, table_settings );
1361 $("#branchcode").on('change',function(){
1362 [%# Modify the hidden input in the filters block from the library %]
1363 [%# dropdown list at the top of suggestion list %]
1364 let branchcode = $(this).val();
1365 $('input[name="branchcode"]').val( branchcode );
1366 $('form[name="suggestionfilter"]').submit();
1369 $(".checkall").click(function(e){
1371 $(this).parents('form').find("input:checkbox").each(function(){
1372 $(this).prop("checked", true);
1375 $(".uncheckall").click(function(e){
1377 $(this).parents('form').find("input:checkbox").each(function(){
1378 $(this).prop("checked", false);
1381 $(".other_reason").hide();
1382 $("select[name='reason']").change(function(){
1383 if($(this).val() == "other"){
1385 $(this).siblings(".other_reason").show();
1389 $("a.cancel_note").click(function(e) {
1390 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
1391 $(this).siblings("input[name='other_reason']").hide();
1395 $("h4.local_collapse a").on("click", function(e){
1397 const target = $(this).data("target");
1398 $("#" + target).toggle();
1401 $("button[type='submit']").on("click", function(e) {
1402 var submit_button = this;
1403 var form = $(submit_button).parents("form");
1404 var action = $(submit_button).val();
1405 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1406 if ( selected_suggestions.length == 0 ) {
1407 alert(_("Please select at least one suggestion"));
1411 if ( action == "delete" ) {
1412 if ( selected_suggestions.length == 1 ) {
1413 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1417 } else if ( selected_suggestions.length > 1 ) {
1418 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1423 } else if ( action == "update_manager" ) {
1424 var managedby = $(submit_button).siblings("suggestion_managedby");
1425 if ( managedby.val() == "" ) {
1426 alert(_("Please select a manager to assign to the selected suggestions"));
1432 $('<input />').attr('type', 'hidden')
1434 .attr('value', action)
1441 [% IF op == 'save' %]
1444 $(document).ready(function(){
1446 $("#quantity,#price,#currency").on("change",function(){
1450 [% IF other_reason %]
1451 $(".select-reason").hide();
1452 $(".select-reason").find("option[value='other']").attr("selected","selected");
1453 $("#other_reason").show();
1455 $("#other_reason").hide();
1457 $(".select-reason").change(function(){
1458 if($(this).val() == "other"){
1460 $("#other_reason").show();
1463 $("a[href*=back]").click(function(){
1464 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1465 $("#other_reason").hide();
1468 $("#restore_previous_manager").on("click",function(e){
1471 $("#managedby_name").empty();
1472 $("#managedby").val('');
1473 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1474 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1475 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1476 + borrowername + '</a>';
1477 $('#managedby_name').html(managerlink);
1478 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1479 $('#notify').prop('checked', false).prop('disabled', true);
1482 //keep a copy of all budgets before removing the inactives
1483 var budgetId = $("form#add_edit #budgetid");
1484 var disabledBudgetsCopy = budgetId.html();
1485 $('.b_inactive').remove();
1487 $('#showallfunds').click(function() {
1488 if ($(this).is(":checked")) {
1489 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
1492 $('.b_inactive').remove();
1499 [% Asset.js("js/acq.js") | $raw %]
1500 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1502 [% INCLUDE 'intranet-bottom.inc' %]