7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Acquisitions › Basket [% basketno | html %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber | html %])[% ELSE %]New order[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="acq_neworderempty" class="acq">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
17 <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>
19 <div class="main container-fluid">
21 <div class="col-sm-10 col-sm-push-2">
25 [% IF ( ordernumber ) %]
32 <div class="error" style="display:none"></div>
35 <div id="acqui_basket_summary" class="yui-g">
36 <fieldset class="rows">
37 <legend>Basket details</legend>
39 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
40 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
41 [% IF ( basketcontractno ) %]
42 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
43 <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>
45 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
46 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
47 [% IF ( closedate ) %]
48 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
49 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
50 [% IF ( basketgroups ) %]
51 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
52 [% FOREACH basketgroup IN basketgroups %]
53 [% IF ( basketgroup.default ) %]
54 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
56 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
60 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
61 <input type="hidden" value="mod_basket" name="op" />
62 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
64 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
73 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated" id="Aform" onsubmit="return Check(this);" >
75 <fieldset class="rows">
76 <legend>Patrons</legend>
79 <span class="label">To notify on receiving:</span>
80 <div style="float:left">
81 <ul id="users_names" style="padding-left:0">
82 [% FOREACH user IN users %]
83 <li id="user_[% user.borrowernumber | html %]">
84 [% user.firstname | html %] [% user.surname | html %]
85 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
89 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
90 <input type="hidden" id="op" name="op" value="mod_users" />
91 <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
97 <fieldset class="rows">
100 [% IF ( biblionumber ) %]
101 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]"> Edit record</a></span>
104 [% UNLESS ( existing ) %]
105 <input type="hidden" name="existing" value="no" />
107 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
108 <input type="hidden" name="basketno" value="[% basketno | html %]" />
109 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
110 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
111 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
112 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
113 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
114 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
116 [% FOREACH c IN currencies %]
117 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
120 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
122 [% IF ( biblionumber ) %]
123 <span class="label">Title</span>
124 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
126 <label for="entertitle">Title: </label>
127 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
128 <span class="required">Required</span>
132 [% IF ( biblionumber ) %]
133 <span class="label">Author: </span>
134 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
136 <label for="author">Author: </label>
137 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
141 [% IF ( biblionumber ) %]
142 <span class="label">Publisher: </span>
143 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
145 <label for="publishercode"> Publisher: </label>
146 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
150 [% IF ( biblionumber ) %]
151 <span class="label">Edition: </span>
152 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
155 <label for="editionstatement">Edition: </label>
156 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
160 [% IF ( biblionumber ) %]
161 <span class="label">Publication year: </span>
162 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
164 <label for="publicationyear">Publication year: </label>
165 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
169 [% IF ( biblionumber ) %]
170 <span class="label">ISBN: </span>
171 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
173 <label for="ISBN">ISBN: </label>
174 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
179 [% IF ( biblionumber ) %]
180 <span class="label">EAN: </span>
181 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
183 <label for="EAN">EAN: </label>
184 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
189 [% IF ( biblionumber ) %]
190 <span class="label">Series: </span>
191 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
193 <label for="series">Series: </label>
194 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
197 [% UNLESS ( biblionumber ) %]
198 [% IF ( itemtypeloop ) %]
200 <span class="label">Item type:</span>
201 <select name="itemtype" style="width:12em;">
202 [% FOREACH itemtype IN itemtypeloop %]
203 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
211 <input type="hidden" name="use_ACQ_framework" value="1" />
212 [% IF biblionumber %]
214 [% FOREACH field IN catalog_details %]
216 <div class="subfield_line">
217 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
218 [% field.value | html %]
225 [% FOREACH field IN catalog_details %]
227 <div class="subfield_line">
228 [% PROCESS display_subfield field=field %]
237 [% IF ( suggestionid ) %]
238 <fieldset class="rows">
239 <legend>Suggestion</legend>
242 <span class="label">Suggested by: </span>
243 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | html %]&op=show">suggestion #[% suggestionid | html %]</a>)
249 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
250 [% IF (AcqCreateItemOrdering) %]
252 <div id="items_list" style="display:none">
253 <p><b>Items list</b></p>
254 <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 (AcqCreateItemOrdering) %]
306 [% IF subscriptionid || basket.is_standing %]
307 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
309 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
312 [% IF subscriptionid || basket.is_standing %]
313 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
315 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
318 <span class="required">Required</span>
320 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
321 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
325 <span class="label required">Fund: </span>
326 <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
328 <label class="required" for="budget_id">Fund: </label>
329 [% active_count = 0 | html %]
330 [% IF !ordernumber %]
331 [% FOREACH budget_loo IN budget_loop %]
332 [% active_count= active_count + budget_loo.b_active | html %]
335 <select id="budget_id" size="1" name="budget_id">
336 <option value="">Select a fund</option>
337 [% FOREACH budget_loo IN budget_loop %]
338 [% IF ( budget_loo.b_sel ) %]
339 [% active_count = 0 #select no other fund | html %]
340 <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 %]"
341 style="padding-left:[% budget_loo.b_level | html %]em;"
343 [% ELSIF active_count==1 && budget_loo.b_active %]
344 <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 %]"
345 style="padding-left:[% budget_loo.b_level | html %]em;"
348 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
349 <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 %]"
350 style="padding-left:[% budget_loo.b_level | html %]em;"
353 [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
357 <span class="required">Required</span>
358 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
359 <input type="checkbox" id="showallbudgets" />
364 <span class="label">Currency: </span>
365 <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
367 <label for="currency">Currency:</label>
368 <select name="currency" id="currency" onchange="updateCosts();">
369 [% FOREACH c IN currencies %]
370 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
371 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
372 [% ELSIF not c.archived %]
373 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
381 <span class="label">Vendor price: </span>
382 <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
384 <label for="listprice">Vendor price: </label>
385 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
388 [% UNLESS ( close ) %]
390 <label for="uncertainprice">Uncertain price: </label>
391 [% IF ( uncertainprice ) %]
392 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
394 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
398 [% IF ( gst_values ) %]
401 <span class="label">Tax rate: </span>
402 <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
404 <label for="tax_rate">Tax rate: </label>
405 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
406 [% FOREACH gst IN gst_values %]
407 [% IF ( gst.option == tax_rate ) %]
408 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
410 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
416 <input type="hidden" name="tax_rate" value="0" />
420 <label for="discount">Discount: </label>
422 [% IF ( orderdiscount ) %]
423 <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
425 <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
428 [% IF ( orderdiscount ) %]
429 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
431 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
437 <span class="label">Retail price: </span>
438 <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 %])
440 <label for="rrp">Retail price: </label>
441 <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 %])
445 <label for="replacementprice">Replacement cost: </label>
446 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
449 <label for="ecost">Budgeted cost: </label>
450 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
453 <label for="total">Total: </label>
454 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
458 <label for="unitprice">Actual cost: </label>
459 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" readonly="readonly" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
461 <label for="unitprice">Actual cost: </label>
462 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" /> [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
466 <label for="order_internalnote">Internal note: </label>
467 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
470 <label for="order_vendornote">Vendor note: </label>
471 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
473 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
474 <label for="sort1">Statistic 1: </label>
475 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
477 <label for="sort2">Statistic 2: </label>
478 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
482 <fieldset class="action">
483 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
484 <input type="submit" value="Save" />
485 [% IF (suggestionid) %]
486 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
488 [% IF subscriptionid %]
489 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
491 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
497 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
498 <div class="modal-dialog">
499 <div class="modal-content">
500 <div class="modal-body">
501 <h3>Processing multiple items</h3>
507 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
508 <div class="modal-dialog">
509 <div class="modal-content">
510 <h3>Invalid number of copies</h3>
511 <p>Please enter a <b>number</b>, greater than or equal to 1</p>
517 </div> <!-- /.col-sm-10.col-sm-push-2 -->
519 <div class="col-sm-2 col-sm-pull-10">
521 [% INCLUDE 'acquisitions-menu.inc' %]
523 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
524 </div> <!-- /.row -->
526 [% MACRO jsinclude BLOCK %]
527 [% Asset.js("js/acquisitions-menu.js") | $raw %]
528 [% Asset.js("js/acq.js") | $raw %]
529 [% INCLUDE 'additem.js.inc' %]
530 [% Asset.js("js/additem.js") | $raw %]
531 [% Asset.js("js/cataloging.js") | $raw %]
532 [% Asset.js("js/prevent_submit.js") | $raw %]
537 [% IF (AcqCreateItemOrdering) %]
538 // Remove last itemblock if it is not in items_list
539 var lastitemblock = $("#outeritemblock > div:last");
540 var tobedeleted = true;
541 var listitems = $("#items_list tr");
542 $(listitems).each(function(){
543 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
548 $(lastitemblock).remove();
553 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
555 _alertString +="-------------------------------------------------------------------\n\n";
557 if(isNull(ff.budget_id,1)){
559 _alertString += "\n- "+ _("You must select a fund");
562 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
564 _alertString += "\n- " + _("Quantity must be greater than '0'");
567 if (!(isNum(ff.listprice,0))){
569 _alertString += "\n- " + _("Vendor price must be a number");
572 if (!(isNum(ff.total,0))){
574 _alertString += "\n- " + _("Total must be a number");
577 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
579 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
582 if ( ff.field_value ) {
583 var empty_item_mandatory = CheckMandatorySubfields(ff);
584 if (empty_item_mandatory > 0) {
587 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
594 [% IF (AcqCreateItemOrdering) %]
596 $(lastitemblock).appendTo('#outeritemblock');
602 [% IF (AcqCreateItemOrdering) %]
603 if(check_additem('[% UniqueItemFields | html %]') == false) {
604 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
606 $(lastitemblock).appendTo('#outeritemblock');
613 $(document).ready(function(){
614 [% IF AcqCreateItemOrdering and not basket.is_standing %]
615 cloneItemBlock(0, '[% UniqueItemFields | html %]');
618 [% IF ( suggestionid ) %]updateCosts();[% END %]
619 $("#quantity").change(function() {
623 //We apply the fonction only for modify option
624 [% IF ( quantityrec ) %]
625 [% IF ( acqcreate ) %]
626 $('#quantity').blur(function(){
627 // if user decreases the quantity
628 if($(this).val() < [% quantityrec | html %]){
629 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
632 // if user increases the quantity
633 alert(_("You can't add a new item, please create a new order line"));
634 // and we replace the original value
635 $(this).val([% quantityrec | html %])
636 updateCosts(); // blur is invoked after change which updated values
643 //keep a copy of all budgets before removing the inactives
644 disabledBudgetsCopy = $('#budget_id').html();
645 $('#budget_id .b_inactive').remove();
647 $('#showallbudgets').click(function() {
648 if ($(this).is(":checked")) {
649 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
652 $('#budget_id .b_inactive').remove();
656 $("#budget_id").change(function(){
657 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
658 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
659 var sort1 = $(destination_sort1).val() || "";
660 if ( destination_sort1.length < 1 ) {
661 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
663 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
664 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
665 var sort2 = $(destination_sort2).val() || "";
666 if ( destination_sort2.length < 1 ) {
667 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
669 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
670 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
672 $("#budget_id").change();
675 function UserSearchPopup(f) {
677 "/cgi-bin/koha/acqui/add_user_search.pl",
679 'width=740, height=450, scrollbars=yes, toolbar=no,'
683 function add_user(borrowernumber, borrowername) {
684 var ids = $("#users_ids").val();
686 ids = ids.split(':');
690 if (ids.indexOf(borrowernumber.toString()) < 0) {
691 ids.push(borrowernumber);
692 $("#users_ids").val(ids.join(':'));
693 var li = '<li id="user_'+borrowernumber+'">'+borrowername
694 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
695 + _("Delete user") + '</a>]</li>';
696 $("#users_names").append(li);
702 function del_user(borrowernumber) {
703 $("#user_"+borrowernumber).remove();
704 var ids = $("#users_ids").val().split(':');
705 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
706 $("#users_ids").val(ids.join(':'));
711 [% INCLUDE 'intranet-bottom.inc' %]
713 [% BLOCK display_subfield %]
714 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
715 [% IF field.authorised_value %]
716 [% SWITCH field.authorised_value %]
717 [% CASE 'branches' %]
718 [% IF field.mandatory %]
719 <select name="bib_field_value" required="required">
721 <select name="bib_field_value">
723 <option value=""></option>
724 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
726 [% CASE 'itemtypes' %]
727 [% IF field.mandatory %]
728 <select name="bib_field_value" required="required">
730 <select name="bib_field_value">
732 <option value=""></option>
733 [% PROCESS options_for_itemtypes itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
735 [% CASE 'cn_source' %]
737 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
740 [% IF field.mandatory %]
741 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
743 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
747 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
748 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
749 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
750 [% IF field.mandatory %] <span class="required">Required</span>[% END %]