8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Acquisitions › Basket [% basketno | html %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber | html %])[% ELSE %]New order[% END %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
13 <body id="acq_neworderempty" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber | html %])[% ELSE %]New order[% END %]</div>
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
26 [% IF ( ordernumber ) %]
33 <div class="dialog alert order_error" style="display:none"></div>
36 <div id="acqui_basket_summary" class="yui-g">
37 <fieldset class="rows">
38 <legend>Basket details</legend>
40 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
41 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
42 [% IF ( basketcontractno ) %]
43 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
44 <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno | uri %]">[% basketcontractname | html %]</a></li>
46 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
47 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
48 [% IF ( closedate ) %]
49 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
50 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
51 [% IF ( basketgroups ) %]
52 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
53 [% FOREACH basketgroup IN basketgroups %]
54 [% IF ( basketgroup.default ) %]
55 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
57 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
61 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
62 <input type="hidden" value="mod_basket" name="op" />
63 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
65 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
74 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated" id="Aform" onsubmit="return Check(this);" >
76 <fieldset class="rows">
77 <legend>Patrons</legend>
80 <span class="label">To notify on receiving:</span>
81 <div style="float:left">
82 <ul id="users_names" style="padding-left:0">
83 [% FOREACH user IN users %]
84 <li id="user_[% user.borrowernumber | html %]">
85 [% user.firstname | html %] [% user.surname | html %]
86 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
90 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
91 <input type="hidden" id="op" name="op" value="mod_users" />
92 <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
98 <fieldset class="rows">
101 [% IF ( biblionumber ) %]
102 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]"> Edit record</a></span>
105 [% UNLESS ( existing ) %]
106 <input type="hidden" name="existing" value="no" />
108 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
109 <input type="hidden" name="basketno" value="[% basketno | html %]" />
110 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
111 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
112 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
113 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
114 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
115 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
117 [% FOREACH c IN currencies %]
118 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
121 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
123 [% IF ( biblionumber ) %]
124 <span class="label">Title</span>
125 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
127 <label for="entertitle">Title: </label>
128 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
129 <span class="required">Required</span>
133 [% IF ( biblionumber ) %]
134 <span class="label">Author: </span>
135 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
137 <label for="author">Author: </label>
138 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
142 [% IF ( biblionumber ) %]
143 <span class="label">Publisher: </span>
144 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
146 <label for="publishercode"> Publisher: </label>
147 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
151 [% IF ( biblionumber ) %]
152 <span class="label">Edition: </span>
153 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
156 <label for="editionstatement">Edition: </label>
157 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
161 [% IF ( biblionumber ) %]
162 <span class="label">Publication year: </span>
163 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
165 <label for="publicationyear">Publication year: </label>
166 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
170 [% IF ( biblionumber ) %]
171 <span class="label">ISBN: </span>
172 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
174 <label for="ISBN">ISBN: </label>
175 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
180 [% IF ( biblionumber ) %]
181 <span class="label">EAN: </span>
182 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
184 <label for="EAN">EAN: </label>
185 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
190 [% IF ( biblionumber ) %]
191 <span class="label">Series: </span>
192 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
194 <label for="series">Series: </label>
195 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
198 [% UNLESS ( biblionumber ) %]
199 [% IF ( itemtypeloop ) %]
201 <span class="label">Item type:</span>
202 <select name="itemtype" style="width:12em;">
203 [% FOREACH itemtype IN itemtypeloop %]
204 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
212 <input type="hidden" name="use_ACQ_framework" value="1" />
213 [% IF biblionumber %]
215 [% FOREACH field IN catalog_details %]
217 <div class="subfield_line">
218 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
219 [% field.value | html %]
226 [% FOREACH field IN catalog_details %]
228 <div class="subfield_line">
229 [% PROCESS display_subfield field=field %]
238 [% IF ( suggestionid ) %]
239 <fieldset class="rows">
240 <legend>Suggestion</legend>
243 <span class="label">Suggested by: </span>
244 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&op=show">suggestion #[% suggestionid | html %]</a>)
250 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
251 [% IF (AcqCreateItemOrdering) %]
253 <div id="items_list" style="display:none">
254 <p><b>Items list</b></p>
255 <div style="width:100%;overflow:auto;">
261 <th>Home library</th>
262 <th>Holding library</th>
263 <th>Not for loan</th>
268 <th>Inventory number</th>
269 <th>Collection code</th>
281 <fieldset class="rows" id="itemfieldset">
282 <legend>Item</legend>
283 [% IF ( NoACQframework ) %]
284 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
287 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
288 <div class="dialog message">The autoBarcode system preference is set to [% Koha.Preference('autoBarcode') | html %] and items with blank barcodes will have barcodes generated upon save to database</div>
291 <div id="outeritemblock"></div>
294 [% END %][%# | html UNLESS subscriptionid %]
295 [% END %][%# IF (AcqCreateItemOrdering) %]
296 <fieldset class="rows">
297 <legend>Accounting details</legend>
301 <span class="label required">Quantity: </span>
302 <input type="hidden" name="quantity" value="[% quantity | html %]" />[% quantity | html %]
304 <label class="required" for="quantity">Quantity: </label>
305 [% IF subscriptionid %]
306 <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
307 [% ELSIF AcqCreateItemOrdering %]
308 [% IF basket.is_standing %]
309 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
311 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
314 [% IF basket.is_standing %]
315 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
317 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
320 <span class="required">Required</span>
322 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
323 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
325 [% IF subscription %]
328 Frequency: [% subscription.frequency.description | html %] |
329 [% IF subscription.numberlength %]Number of issues: [% subscription.numberlength | html %][% END %]
330 [% IF subscription.weeklength %]Number of weeks: [% subscription.weeklength | html %][% END %]
331 [% IF subscription.monthlength %]Number of months: [% subscription.monthlength | html %][% END %]
337 <span class="label required">Fund: </span>
338 <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
340 <label class="required" for="budget_id">Fund: </label>
341 [% active_count = 0 %]
342 [% IF !ordernumber %]
343 [% FOREACH budget_loo IN budget_loop %]
344 [% active_count= active_count + budget_loo.b_active %]
347 <select id="budget_id" size="1" name="budget_id">
348 <option value="">Select a fund</option>
349 [% FOREACH budget_loo IN budget_loop %]
350 [% IF ( budget_loo.b_sel ) %]
351 [% active_count = 0 #select no other fund %]
352 <option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
353 style="padding-left:[% budget_loo.b_level | html %]em;"
355 [% ELSIF active_count==1 && budget_loo.b_active %]
356 <option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
357 style="padding-left:[% budget_loo.b_level | html %]em;"
360 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
361 <option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
362 style="padding-left:[% budget_loo.b_level | html %]em;"
365 [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
369 <span class="required">Required</span>
370 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
371 <input type="checkbox" id="showallbudgets" />
376 <span class="label">Currency: </span>
377 <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
379 <label for="currency">Currency:</label>
380 <select name="currency" id="currency" onchange="updateCosts();">
381 [% FOREACH c IN currencies %]
382 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
383 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
384 [% ELSIF not c.archived %]
385 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
393 <span class="label">Vendor price: </span>
394 <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
396 <label for="listprice">Vendor price: </label>
397 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
400 [% UNLESS ( close ) %]
402 <label for="uncertainprice">Uncertain price: </label>
403 [% IF ( uncertainprice ) %]
404 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
406 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
410 [% IF ( gst_values ) %]
413 <span class="label">Tax rate: </span>
414 <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
416 <label for="tax_rate">Tax rate: </label>
417 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
418 [% FOREACH gst IN gst_values %]
419 [% IF ( gst.option == tax_rate ) %]
420 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
422 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
428 <input type="hidden" name="tax_rate" value="0" />
432 <label for="discount">Discount: </label>
434 [% IF ( orderdiscount ) %]
435 <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
437 <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
440 [% IF ( orderdiscount ) %]
441 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
443 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
449 <span class="label">Retail price: </span>
450 <input type="hidden" name="rrp" id="rrp" value="[% rrp | html %]" />[% rrp | html %] (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
452 <label for="rrp">Retail price: </label>
453 <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
457 <label for="replacementprice">Replacement cost: </label>
458 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
461 <label for="ecost">Budgeted cost: </label>
462 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
465 <label for="total">Total: </label>
466 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
469 <label for="order_internalnote">Internal note: </label>
470 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
473 <label for="order_vendornote">Vendor note: </label>
474 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
476 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
477 <label for="sort1">Statistic 1: </label>
478 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
480 <label for="sort2">Statistic 2: </label>
481 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
485 <fieldset class="action">
486 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
487 <input type="submit" value="Save" />
488 [% IF (suggestionid) %]
489 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
491 [% IF subscriptionid %]
492 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
494 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
500 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
501 <div class="modal-dialog">
502 <div class="modal-content">
503 <div class="modal-body">
504 <h3>Processing multiple items</h3>
510 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
511 <div class="modal-dialog">
512 <div class="modal-content">
513 <h3>Invalid number of copies</h3>
514 <p>Please enter a <b>number</b>, greater than or equal to 1</p>
520 </div> <!-- /.col-sm-10.col-sm-push-2 -->
522 <div class="col-sm-2 col-sm-pull-10">
524 [% INCLUDE 'acquisitions-menu.inc' %]
526 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
527 </div> <!-- /.row -->
529 [% MACRO jsinclude BLOCK %]
530 [% Asset.js("js/acquisitions-menu.js") | $raw %]
531 [% Asset.js("js/acq.js") | $raw %]
532 [% INCLUDE 'additem.js.inc' %]
533 [% Asset.js("js/additem.js") | $raw %]
534 [% Asset.js("js/cataloging.js") | $raw %]
535 [% Asset.js("js/prevent_submit.js") | $raw %]
540 [% IF (AcqCreateItemOrdering) %]
541 // Remove last itemblock if it is not in items_list
542 var lastitemblock = $("#outeritemblock > div:last");
543 var tobedeleted = true;
544 var listitems = $("#items_list tr");
545 $(listitems).each(function(){
546 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
551 $(lastitemblock).remove();
556 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
558 _alertString +="-------------------------------------------------------------------\n\n";
560 if(isNull(ff.budget_id,1)){
562 _alertString += "\n- "+ _("You must select a fund");
565 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
567 _alertString += "\n- " + _("Quantity must be greater than '0'");
570 if (!(isNum(ff.listprice,0))){
572 _alertString += "\n- " + _("Vendor price must be a number");
575 if (!(isNum(ff.total,0))){
577 _alertString += "\n- " + _("Total must be a number");
580 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
582 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
585 if ( ff.field_value ) {
586 var empty_item_mandatory = CheckMandatorySubfields(ff);
587 if (empty_item_mandatory > 0) {
590 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
597 [% IF (AcqCreateItemOrdering) %]
599 $(lastitemblock).appendTo('#outeritemblock');
605 [% IF (AcqCreateItemOrdering) %]
606 if(check_additem('[% UniqueItemFields | html %]') == false) {
607 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
609 $(lastitemblock).appendTo('#outeritemblock');
616 $(document).ready(function(){
617 [% IF AcqCreateItemOrdering and not basket.is_standing %]
618 cloneItemBlock(0, '[% UniqueItemFields | html %]');
621 [% IF ( suggestionid ) %]updateCosts();[% END %]
622 $("#quantity").change(function() {
626 //We apply the fonction only for modify option
627 [% IF ( quantityrec and not subscriptionid ) %]
628 [% IF ( acqcreate ) %]
629 $('#quantity').blur(function(){
630 // if user decreases the quantity
631 if($(this).val() < [% quantityrec | html %]){
632 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
635 // if user increases the quantity
636 alert(_("You can't add a new item, please create a new order line"));
637 // and we replace the original value
638 $(this).val([% quantityrec | html %])
639 updateCosts(); // blur is invoked after change which updated values
646 //keep a copy of all budgets before removing the inactives
647 disabledBudgetsCopy = $('#budget_id').html();
648 $('#budget_id .b_inactive').remove();
650 $('#showallbudgets').click(function() {
651 if ($(this).is(":checked")) {
652 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
655 $('#budget_id .b_inactive').remove();
659 $("#budget_id").change(function(){
660 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
661 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
662 var sort1 = $(destination_sort1).val() || "";
663 if ( destination_sort1.length < 1 ) {
664 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
666 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
667 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
668 var sort2 = $(destination_sort2).val() || "";
669 if ( destination_sort2.length < 1 ) {
670 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
672 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
673 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
675 $("#budget_id").change();
678 function UserSearchPopup(f) {
680 "/cgi-bin/koha/acqui/add_user_search.pl",
682 'width=740, height=450, scrollbars=yes, toolbar=no,'
686 function add_user(borrowernumber, borrowername) {
687 var ids = $("#users_ids").val();
689 ids = ids.split(':');
693 if (ids.indexOf(borrowernumber.toString()) < 0) {
694 ids.push(borrowernumber);
695 $("#users_ids").val(ids.join(':'));
696 var li = '<li id="user_'+borrowernumber+'">'+borrowername
697 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
698 + _("Delete user") + '</a>]</li>';
699 $("#users_names").append(li);
705 function del_user(borrowernumber) {
706 $("#user_"+borrowernumber).remove();
707 var ids = $("#users_ids").val().split(':');
708 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
709 $("#users_ids").val(ids.join(':'));
714 [% INCLUDE 'intranet-bottom.inc' %]
716 [% BLOCK display_subfield %]
717 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
718 [% IF field.authorised_value %]
719 [% SWITCH field.authorised_value %]
720 [% CASE 'branches' %]
721 [% IF field.mandatory %]
722 <select name="bib_field_value" required="required">
724 <select name="bib_field_value">
726 <option value=""></option>
727 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
729 [% CASE 'itemtypes' %]
730 [% IF field.mandatory %]
731 <select name="bib_field_value" required="required">
733 <select name="bib_field_value">
735 <option value=""></option>
736 [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
738 [% CASE 'cn_source' %]
740 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
743 [% IF field.mandatory %]
744 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
746 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
750 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
751 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
752 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
753 [% IF field.mandatory %] <span class="required">Required</span>[% END %]