6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Acquisitions › Basket [% basketno | html %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber | html %])[% ELSE %]New order[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="acq_neworderempty" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
16 <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>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
24 [% IF ( ordernumber ) %]
31 <div class="error" style="display:none"></div>
34 <div id="acqui_basket_summary" class="yui-g">
35 <fieldset class="rows">
36 <legend>Basket details</legend>
38 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
39 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
40 [% IF ( basketcontractno ) %]
41 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
42 <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>
44 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
45 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
46 [% IF ( closedate ) %]
47 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
48 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
49 [% IF ( basketgroups ) %]
50 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
51 [% FOREACH basketgroup IN basketgroups %]
52 [% IF ( basketgroup.default ) %]
53 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
55 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
59 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
60 <input type="hidden" value="mod_basket" name="op" />
61 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
63 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
72 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated" id="Aform" onsubmit="return Check(this);" >
74 <fieldset class="rows">
75 <legend>Patrons</legend>
78 <span class="label">To notify on receiving:</span>
79 <div style="float:left">
80 <ul id="users_names" style="padding-left:0">
81 [% FOREACH user IN users %]
82 <li id="user_[% user.borrowernumber | html %]">
83 [% user.firstname | html %] [% user.surname | html %]
84 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
88 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
89 <input type="hidden" id="op" name="op" value="mod_users" />
90 <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
96 <fieldset class="rows">
99 [% IF ( biblionumber ) %]
100 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]"> Edit record</a></span>
103 [% UNLESS ( existing ) %]
104 <input type="hidden" name="existing" value="no" />
106 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
107 <input type="hidden" name="basketno" value="[% basketno | html %]" />
108 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
109 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
110 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
111 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
112 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
113 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
115 [% FOREACH c IN currencies %]
116 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
119 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
121 [% IF ( biblionumber ) %]
122 <span class="label">Title</span>
123 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
125 <label for="entertitle">Title: </label>
126 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
127 <span class="required">Required</span>
131 [% IF ( biblionumber ) %]
132 <span class="label">Author: </span>
133 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
135 <label for="author">Author: </label>
136 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
140 [% IF ( biblionumber ) %]
141 <span class="label">Publisher: </span>
142 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
144 <label for="publishercode"> Publisher: </label>
145 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
149 [% IF ( biblionumber ) %]
150 <span class="label">Edition: </span>
151 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
154 <label for="editionstatement">Edition: </label>
155 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
159 [% IF ( biblionumber ) %]
160 <span class="label">Publication year: </span>
161 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
163 <label for="publicationyear">Publication year: </label>
164 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
168 [% IF ( biblionumber ) %]
169 <span class="label">ISBN: </span>
170 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
172 <label for="ISBN">ISBN: </label>
173 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
178 [% IF ( biblionumber ) %]
179 <span class="label">EAN: </span>
180 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
182 <label for="EAN">EAN: </label>
183 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
188 [% IF ( biblionumber ) %]
189 <span class="label">Series: </span>
190 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
192 <label for="series">Series: </label>
193 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
196 [% UNLESS ( biblionumber ) %]
197 [% IF ( itemtypeloop ) %]
199 <span class="label">Item type:</span>
200 <select name="itemtype" style="width:12em;">
201 [% FOREACH itemtype IN itemtypeloop %]
202 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
210 <input type="hidden" name="use_ACQ_framework" value="1" />
211 [% IF biblionumber %]
213 [% FOREACH field IN catalog_details %]
215 <div class="subfield_line">
216 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
217 [% field.value | html %]
224 [% FOREACH field IN catalog_details %]
226 <div class="subfield_line">
227 [% PROCESS display_subfield field=field %]
236 [% IF ( suggestionid ) %]
237 <fieldset class="rows">
238 <legend>Suggestion</legend>
241 <span class="label">Suggested by: </span>
242 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | html %]&op=show">suggestion #[% suggestionid | html %]</a>)
248 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
249 [% IF (AcqCreateItemOrdering) %]
251 <div id="items_list" style="display:none">
252 <p><b>Items list</b></p>
253 <div style="width:100%;overflow:auto;">
260 <th>Home library</th>
261 <th>Holding library</th>
262 <th>Not for loan</th>
267 <th>Inventory number</th>
268 <th>Collection code</th>
280 <fieldset class="rows" id="itemfieldset">
281 <legend>Item</legend>
282 [% IF ( NoACQframework ) %]
283 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
286 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
287 <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>
290 <div id="outeritemblock"></div>
293 [% END %][%# | html UNLESS subscriptionid %]
294 [% END %][%# IF (AcqCreateItemOrdering) %]
295 <fieldset class="rows">
296 <legend>Accounting details</legend>
300 <span class="label required">Quantity: </span>
301 <input type="hidden" name="quantity" value="[% quantity | html %]" />[% quantity | html %]
303 <label class="required" for="quantity">Quantity: </label>
304 [% IF (AcqCreateItemOrdering) %]
305 [% IF subscriptionid || basket.is_standing %]
306 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
308 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
311 [% IF subscriptionid || basket.is_standing %]
312 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
314 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
317 <span class="required">Required</span>
319 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
320 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
324 <span class="label required">Fund: </span>
325 <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
327 <label class="required" for="budget_id">Fund: </label>
328 [% active_count = 0 | html %]
329 [% IF !ordernumber %]
330 [% FOREACH budget_loo IN budget_loop %]
331 [% active_count= active_count + budget_loo.b_active | html %]
334 <select id="budget_id" size="1" name="budget_id">
335 <option value="">Select a fund</option>
336 [% FOREACH budget_loo IN budget_loop %]
337 [% IF ( budget_loo.b_sel ) %]
338 [% active_count = 0 #select no other fund | html %]
339 <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 %]"
340 style="padding-left:[% budget_loo.b_level | html %]em;"
342 [% ELSIF active_count==1 && budget_loo.b_active %]
343 <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 %]"
344 style="padding-left:[% budget_loo.b_level | html %]em;"
347 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
348 <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 %]"
349 style="padding-left:[% budget_loo.b_level | html %]em;"
352 [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
356 <span class="required">Required</span>
357 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
358 <input type="checkbox" id="showallbudgets" />
363 <span class="label">Currency: </span>
364 <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
366 <label for="currency">Currency:</label>
367 <select name="currency" id="currency" onchange="updateCosts();">
368 [% FOREACH c IN currencies %]
369 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
370 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
371 [% ELSIF not c.archived %]
372 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
380 <span class="label">Vendor price: </span>
381 <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
383 <label for="listprice">Vendor price: </label>
384 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
387 [% UNLESS ( close ) %]
389 <label for="uncertainprice">Uncertain price: </label>
390 [% IF ( uncertainprice ) %]
391 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
393 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
397 [% IF ( gst_values ) %]
400 <span class="label">Tax rate: </span>
401 <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
403 <label for="tax_rate">Tax rate: </label>
404 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
405 [% FOREACH gst IN gst_values %]
406 [% IF ( gst.option == tax_rate ) %]
407 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
409 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
415 <input type="hidden" name="tax_rate" value="0" />
419 <label for="discount">Discount: </label>
421 [% IF ( orderdiscount ) %]
422 <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
424 <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
427 [% IF ( orderdiscount ) %]
428 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
430 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
436 <span class="label">Retail price: </span>
437 <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 %])
439 <label for="rrp">Retail price: </label>
440 <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 %])
444 <label for="replacementprice">Replacement cost: </label>
445 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html %]" />
448 <label for="ecost">Budgeted cost: </label>
449 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
452 <label for="total">Total: </label>
453 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
457 <label for="unitprice">Actual cost: </label>
458 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" readonly="readonly" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
460 <label for="unitprice">Actual cost: </label>
461 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
465 <label for="order_internalnote">Internal note: </label>
466 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
469 <label for="order_vendornote">Vendor note: </label>
470 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
472 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
473 <label for="sort1">Statistic 1: </label>
474 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
476 <label for="sort2">Statistic 2: </label>
477 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
481 <fieldset class="action">
482 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
483 <input type="submit" value="Save" />
484 [% IF (suggestionid) %]
485 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
487 [% IF subscriptionid %]
488 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
490 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
496 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
497 <div class="modal-dialog">
498 <div class="modal-content">
499 <div class="modal-body">
500 <h3>Processing multiple items</h3>
506 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
507 <div class="modal-dialog">
508 <div class="modal-content">
509 <h3>Invalid number of copies</h3>
510 <p>Please enter a <b>number</b>, greater than or equal to 1</p>
516 </div> <!-- /.col-sm-10.col-sm-push-2 -->
518 <div class="col-sm-2 col-sm-pull-10">
520 [% INCLUDE 'acquisitions-menu.inc' %]
522 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
523 </div> <!-- /.row -->
525 [% MACRO jsinclude BLOCK %]
526 [% Asset.js("js/acquisitions-menu.js") | $raw %]
527 [% Asset.js("js/acq.js") | $raw %]
528 [% INCLUDE 'additem.js.inc' %]
529 [% Asset.js("js/additem.js") | $raw %]
530 [% Asset.js("js/cataloging.js") | $raw %]
531 [% Asset.js("js/prevent_submit.js") | $raw %]
536 [% IF (AcqCreateItemOrdering) %]
537 // Remove last itemblock if it is not in items_list
538 var lastitemblock = $("#outeritemblock > div:last");
539 var tobedeleted = true;
540 var listitems = $("#items_list tr");
541 $(listitems).each(function(){
542 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
547 $(lastitemblock).remove();
552 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
554 _alertString +="-------------------------------------------------------------------\n\n";
556 if(isNull(ff.budget_id,1)){
558 _alertString += "\n- "+ _("You must select a fund");
561 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
563 _alertString += "\n- " + _("Quantity must be greater than '0'");
566 if (!(isNum(ff.listprice,0))){
568 _alertString += "\n- " + _("Vendor price must be a number");
571 if (!(isNum(ff.total,0))){
573 _alertString += "\n- " + _("Total must be a number");
576 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
578 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
581 if ( ff.field_value ) {
582 var empty_item_mandatory = CheckMandatorySubfields(ff);
583 if (empty_item_mandatory > 0) {
586 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
593 [% IF (AcqCreateItemOrdering) %]
595 $(lastitemblock).appendTo('#outeritemblock');
601 [% IF (AcqCreateItemOrdering) %]
602 if(check_additem('[% UniqueItemFields | html %]') == false) {
603 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
605 $(lastitemblock).appendTo('#outeritemblock');
612 $(document).ready(function(){
613 [% IF AcqCreateItemOrdering and not basket.is_standing %]
614 cloneItemBlock(0, '[% UniqueItemFields | html %]');
617 [% IF ( suggestionid ) %]updateCosts();[% END %]
618 $("#quantity").change(function() {
622 //We apply the fonction only for modify option
623 [% IF ( quantityrec ) %]
624 [% IF ( acqcreate ) %]
625 $('#quantity').blur(function(){
626 // if user decreases the quantity
627 if($(this).val() < [% quantityrec | html %]){
628 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
631 // if user increases the quantity
632 alert(_("You can't add a new item, please create a new order line"));
633 // and we replace the original value
634 $(this).val([% quantityrec | html %])
635 updateCosts(); // blur is invoked after change which updated values
642 //keep a copy of all budgets before removing the inactives
643 disabledBudgetsCopy = $('#budget_id').html();
644 $('#budget_id .b_inactive').remove();
646 $('#showallbudgets').click(function() {
647 if ($(this).is(":checked")) {
648 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
651 $('#budget_id .b_inactive').remove();
655 $("#budget_id").change(function(){
656 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
657 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
658 var sort1 = $(destination_sort1).val() || "";
659 if ( destination_sort1.length < 1 ) {
660 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
662 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
663 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
664 var sort2 = $(destination_sort2).val() || "";
665 if ( destination_sort2.length < 1 ) {
666 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
668 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
669 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
671 $("#budget_id").change();
674 function UserSearchPopup(f) {
676 "/cgi-bin/koha/acqui/add_user_search.pl",
678 'width=740, height=450, scrollbars=yes, toolbar=no,'
682 function add_user(borrowernumber, borrowername) {
683 var ids = $("#users_ids").val();
685 ids = ids.split(':');
689 if (ids.indexOf(borrowernumber.toString()) < 0) {
690 ids.push(borrowernumber);
691 $("#users_ids").val(ids.join(':'));
692 var li = '<li id="user_'+borrowernumber+'">'+borrowername
693 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
694 + _("Delete user") + '</a>]</li>';
695 $("#users_names").append(li);
701 function del_user(borrowernumber) {
702 $("#user_"+borrowernumber).remove();
703 var ids = $("#users_ids").val().split(':');
704 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
705 $("#users_ids").val(ids.join(':'));
710 [% INCLUDE 'intranet-bottom.inc' %]
712 [% BLOCK display_subfield %]
713 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
714 [% IF field.authorised_value %]
715 [% SWITCH field.authorised_value %]
716 [% CASE 'branches' %]
717 [% IF field.mandatory %]
718 <select name="bib_field_value" required="required">
720 <select name="bib_field_value">
722 <option value=""></option>
723 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
725 [% CASE 'itemtypes' %]
726 [% IF field.mandatory %]
727 <select name="bib_field_value" required="required">
729 <select name="bib_field_value">
731 <option value=""></option>
732 [% PROCESS options_for_itemtypes itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
734 [% CASE 'cn_source' %]
736 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
739 [% IF field.mandatory %]
740 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
742 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
746 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
747 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
748 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
749 [% IF field.mandatory %] <span class="required">Required</span>[% END %]