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="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 | html %]">[% 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 | html %]"> 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 | html %]&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;">
262 <th>Home library</th>
263 <th>Holding library</th>
264 <th>Not for loan</th>
269 <th>Inventory number</th>
270 <th>Collection code</th>
282 <fieldset class="rows" id="itemfieldset">
283 <legend>Item</legend>
284 [% IF ( NoACQframework ) %]
285 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
288 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
289 <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>
292 <div id="outeritemblock"></div>
295 [% END %][%# | html UNLESS subscriptionid %]
296 [% END %][%# IF (AcqCreateItemOrdering) %]
297 <fieldset class="rows">
298 <legend>Accounting details</legend>
302 <span class="label required">Quantity: </span>
303 <input type="hidden" name="quantity" value="[% quantity | html %]" />[% quantity | html %]
305 <label class="required" for="quantity">Quantity: </label>
306 [% IF (AcqCreateItemOrdering) %]
307 [% IF subscriptionid || basket.is_standing %]
308 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
310 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
313 [% IF subscriptionid || basket.is_standing %]
314 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
316 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
319 <span class="required">Required</span>
321 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
322 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
326 <span class="label required">Fund: </span>
327 <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
329 <label class="required" for="budget_id">Fund: </label>
330 [% active_count = 0 %]
331 [% IF !ordernumber %]
332 [% FOREACH budget_loo IN budget_loop %]
333 [% active_count= active_count + budget_loo.b_active %]
336 <select id="budget_id" size="1" name="budget_id">
337 <option value="">Select a fund</option>
338 [% FOREACH budget_loo IN budget_loop %]
339 [% IF ( budget_loo.b_sel ) %]
340 [% active_count = 0 #select no other fund %]
341 <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 %]"
342 style="padding-left:[% budget_loo.b_level | html %]em;"
344 [% ELSIF active_count==1 && budget_loo.b_active %]
345 <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 %]"
346 style="padding-left:[% budget_loo.b_level | html %]em;"
349 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
350 <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 %]"
351 style="padding-left:[% budget_loo.b_level | html %]em;"
354 [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
358 <span class="required">Required</span>
359 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
360 <input type="checkbox" id="showallbudgets" />
365 <span class="label">Currency: </span>
366 <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
368 <label for="currency">Currency:</label>
369 <select name="currency" id="currency" onchange="updateCosts();">
370 [% FOREACH c IN currencies %]
371 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
372 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
373 [% ELSIF not c.archived %]
374 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
382 <span class="label">Vendor price: </span>
383 <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
385 <label for="listprice">Vendor price: </label>
386 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
389 [% UNLESS ( close ) %]
391 <label for="uncertainprice">Uncertain price: </label>
392 [% IF ( uncertainprice ) %]
393 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
395 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
399 [% IF ( gst_values ) %]
402 <span class="label">Tax rate: </span>
403 <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
405 <label for="tax_rate">Tax rate: </label>
406 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
407 [% FOREACH gst IN gst_values %]
408 [% IF ( gst.option == tax_rate ) %]
409 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
411 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
417 <input type="hidden" name="tax_rate" value="0" />
421 <label for="discount">Discount: </label>
423 [% IF ( orderdiscount ) %]
424 <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
426 <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
429 [% IF ( orderdiscount ) %]
430 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
432 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
438 <span class="label">Retail price: </span>
439 <input type="hidden" name="rrp" id="rrp" value="[% rrp | html %]" />[% rrp | html %] (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
441 <label for="rrp">Retail price: </label>
442 <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
446 <label for="replacementprice">Replacement cost: </label>
447 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
450 <label for="ecost">Budgeted cost: </label>
451 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
454 <label for="total">Total: </label>
455 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
459 <label for="unitprice">Actual cost: </label>
460 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" readonly="readonly" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
462 <label for="unitprice">Actual cost: </label>
463 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
467 <label for="order_internalnote">Internal note: </label>
468 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
471 <label for="order_vendornote">Vendor note: </label>
472 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
474 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
475 <label for="sort1">Statistic 1: </label>
476 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
478 <label for="sort2">Statistic 2: </label>
479 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
483 <fieldset class="action">
484 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
485 <input type="submit" value="Save" />
486 [% IF (suggestionid) %]
487 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
489 [% IF subscriptionid %]
490 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
492 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
498 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
499 <div class="modal-dialog">
500 <div class="modal-content">
501 <div class="modal-body">
502 <h3>Processing multiple items</h3>
508 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
509 <div class="modal-dialog">
510 <div class="modal-content">
511 <h3>Invalid number of copies</h3>
512 <p>Please enter a <b>number</b>, greater than or equal to 1</p>
518 </div> <!-- /.col-sm-10.col-sm-push-2 -->
520 <div class="col-sm-2 col-sm-pull-10">
522 [% INCLUDE 'acquisitions-menu.inc' %]
524 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
525 </div> <!-- /.row -->
527 [% MACRO jsinclude BLOCK %]
528 [% Asset.js("js/acquisitions-menu.js") | $raw %]
529 [% Asset.js("js/acq.js") | $raw %]
530 [% INCLUDE 'additem.js.inc' %]
531 [% Asset.js("js/additem.js") | $raw %]
532 [% Asset.js("js/cataloging.js") | $raw %]
533 [% Asset.js("js/prevent_submit.js") | $raw %]
538 [% IF (AcqCreateItemOrdering) %]
539 // Remove last itemblock if it is not in items_list
540 var lastitemblock = $("#outeritemblock > div:last");
541 var tobedeleted = true;
542 var listitems = $("#items_list tr");
543 $(listitems).each(function(){
544 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
549 $(lastitemblock).remove();
554 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
556 _alertString +="-------------------------------------------------------------------\n\n";
558 if(isNull(ff.budget_id,1)){
560 _alertString += "\n- "+ _("You must select a fund");
563 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
565 _alertString += "\n- " + _("Quantity must be greater than '0'");
568 if (!(isNum(ff.listprice,0))){
570 _alertString += "\n- " + _("Vendor price must be a number");
573 if (!(isNum(ff.total,0))){
575 _alertString += "\n- " + _("Total must be a number");
578 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
580 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
583 if ( ff.field_value ) {
584 var empty_item_mandatory = CheckMandatorySubfields(ff);
585 if (empty_item_mandatory > 0) {
588 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
595 [% IF (AcqCreateItemOrdering) %]
597 $(lastitemblock).appendTo('#outeritemblock');
603 [% IF (AcqCreateItemOrdering) %]
604 if(check_additem('[% UniqueItemFields | html %]') == false) {
605 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
607 $(lastitemblock).appendTo('#outeritemblock');
614 $(document).ready(function(){
615 [% IF AcqCreateItemOrdering and not basket.is_standing %]
616 cloneItemBlock(0, '[% UniqueItemFields | html %]');
619 [% IF ( suggestionid ) %]updateCosts();[% END %]
620 $("#quantity").change(function() {
624 //We apply the fonction only for modify option
625 [% IF ( quantityrec ) %]
626 [% IF ( acqcreate ) %]
627 $('#quantity').blur(function(){
628 // if user decreases the quantity
629 if($(this).val() < [% quantityrec | html %]){
630 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
633 // if user increases the quantity
634 alert(_("You can't add a new item, please create a new order line"));
635 // and we replace the original value
636 $(this).val([% quantityrec | html %])
637 updateCosts(); // blur is invoked after change which updated values
644 //keep a copy of all budgets before removing the inactives
645 disabledBudgetsCopy = $('#budget_id').html();
646 $('#budget_id .b_inactive').remove();
648 $('#showallbudgets').click(function() {
649 if ($(this).is(":checked")) {
650 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
653 $('#budget_id .b_inactive').remove();
657 $("#budget_id").change(function(){
658 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
659 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
660 var sort1 = $(destination_sort1).val() || "";
661 if ( destination_sort1.length < 1 ) {
662 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
664 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
665 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
666 var sort2 = $(destination_sort2).val() || "";
667 if ( destination_sort2.length < 1 ) {
668 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
670 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
671 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
673 $("#budget_id").change();
676 function UserSearchPopup(f) {
678 "/cgi-bin/koha/acqui/add_user_search.pl",
680 'width=740, height=450, scrollbars=yes, toolbar=no,'
684 function add_user(borrowernumber, borrowername) {
685 var ids = $("#users_ids").val();
687 ids = ids.split(':');
691 if (ids.indexOf(borrowernumber.toString()) < 0) {
692 ids.push(borrowernumber);
693 $("#users_ids").val(ids.join(':'));
694 var li = '<li id="user_'+borrowernumber+'">'+borrowername
695 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
696 + _("Delete user") + '</a>]</li>';
697 $("#users_names").append(li);
703 function del_user(borrowernumber) {
704 $("#user_"+borrowernumber).remove();
705 var ids = $("#users_ids").val().split(':');
706 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
707 $("#users_ids").val(ids.join(':'));
712 [% INCLUDE 'intranet-bottom.inc' %]
714 [% BLOCK display_subfield %]
715 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
716 [% IF field.authorised_value %]
717 [% SWITCH field.authorised_value %]
718 [% CASE 'branches' %]
719 [% IF field.mandatory %]
720 <select name="bib_field_value" required="required">
722 <select name="bib_field_value">
724 <option value=""></option>
725 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
727 [% CASE 'itemtypes' %]
728 [% IF field.mandatory %]
729 <select name="bib_field_value" required="required">
731 <select name="bib_field_value">
733 <option value=""></option>
734 [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
736 [% CASE 'cn_source' %]
738 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
741 [% IF field.mandatory %]
742 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
744 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
748 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
749 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
750 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
751 [% IF field.mandatory %] <span class="required">Required</span>[% END %]