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 [% INCLUDE 'blocking_errors.inc' %]
22 <div class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
28 [% IF ( ordernumber ) %]
35 <div class="dialog alert order_error" style="display:none"></div>
38 <div id="acqui_basket_summary">
39 <fieldset class="rows">
40 <legend>Basket details</legend>
42 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
43 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
44 [% IF ( basketcontractno ) %]
45 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
46 <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>
48 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
49 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
50 [% IF ( closedate ) %]
51 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
52 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
53 [% IF ( basketgroups ) %]
54 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
55 [% FOREACH basketgroup IN basketgroups %]
56 [% IF ( basketgroup.default ) %]
57 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
59 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
63 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
64 <input type="hidden" value="mod_basket" name="op" />
65 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
67 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
76 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated noEnterSubmit" id="Aform" onsubmit="return Check(this);" >
78 <fieldset class="rows">
79 <legend>Patrons</legend>
82 <span class="label">To notify on receiving:</span>
83 <div style="float:left">
84 <ul id="users_names" style="padding-left:0">
85 [% FOREACH user IN users %]
86 <li id="user_[% user.borrowernumber | html %]">
87 [% user.firstname | html %] [% user.surname | html %]
88 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
92 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
93 <input type="hidden" id="op" name="op" value="mod_users" />
94 <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
100 <fieldset class="rows">
103 [% IF ( biblionumber ) %]
104 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]"> Edit record</a></span>
107 [% UNLESS ( existing ) %]
108 <input type="hidden" name="existing" value="no" />
110 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
111 <input type="hidden" name="basketno" value="[% basketno | html %]" />
112 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
113 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
114 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
115 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
116 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
117 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
119 [% FOREACH c IN currencies %]
120 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
123 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
125 [% IF ( biblionumber ) %]
126 <span class="label">Title</span>
127 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
129 <label for="entertitle">Title: </label>
130 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
131 <span class="required">Required</span>
135 [% IF ( biblionumber ) %]
136 <span class="label">Author: </span>
137 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
139 <label for="author">Author: </label>
140 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
144 [% IF ( biblionumber ) %]
145 <span class="label">Publisher: </span>
146 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
148 <label for="publishercode"> Publisher: </label>
149 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
153 [% IF ( biblionumber ) %]
154 <span class="label">Edition: </span>
155 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
158 <label for="editionstatement">Edition: </label>
159 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
163 [% IF ( biblionumber ) %]
164 <span class="label">Publication year: </span>
165 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
167 <label for="publicationyear">Publication year: </label>
168 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
172 [% IF ( biblionumber ) %]
173 <span class="label">ISBN: </span>
174 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
176 <label for="ISBN">ISBN: </label>
177 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
182 [% IF ( biblionumber ) %]
183 <span class="label">EAN: </span>
184 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
186 <label for="EAN">EAN: </label>
187 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
192 [% IF ( biblionumber ) %]
193 <span class="label">Series: </span>
194 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
196 <label for="series">Series: </label>
197 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
200 [% UNLESS ( biblionumber ) %]
201 [% IF ( itemtypeloop ) %]
203 <span class="label">Item type:</span>
204 <select name="itemtype" style="width:12em;">
205 [% FOREACH itemtype IN itemtypeloop %]
206 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
214 <input type="hidden" name="use_ACQ_framework" value="1" />
215 [% IF biblionumber %]
217 [% FOREACH field IN catalog_details %]
219 <div class="subfield_line">
220 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
221 [% field.value | html %]
228 [% FOREACH field IN catalog_details %]
230 <div class="subfield_line">
231 [% PROCESS display_subfield field=field %]
240 [% IF ( suggestionid ) %]
241 <fieldset class="rows">
242 <legend>Suggestion</legend>
245 <span class="label">Suggested by: </span>
246 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&op=show">suggestion #[% suggestionid | html %]</a>)
252 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
253 [% IF (AcqCreateItemOrdering) %]
255 <div id="items_list" style="display:none">
256 <p><b>Items list</b></p>
257 <div style="width:100%;overflow:auto;">
263 <th>Home library</th>
264 <th>Holding library</th>
265 <th>Not for loan</th>
270 <th>Inventory number</th>
271 <th>Collection code</th>
283 <fieldset class="rows" id="itemfieldset">
284 <legend>Item</legend>
285 [% IF ( NoACQframework ) %]
286 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
289 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
290 <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>
293 <div id="outeritemblock"></div>
296 [% END %][%# | html UNLESS subscriptionid %]
297 [% END %][%# IF (AcqCreateItemOrdering) %]
298 <fieldset class="rows">
299 <legend>Accounting details</legend>
303 <span class="label required">Quantity: </span>
304 <input type="hidden" name="quantity" value="[% quantity | html %]" />[% quantity | html %]
306 <label class="required" for="quantity">Quantity: </label>
307 [% IF subscriptionid %]
308 <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
309 [% ELSIF AcqCreateItemOrdering %]
310 [% IF basket.is_standing %]
311 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
313 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
316 [% IF basket.is_standing %]
317 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
319 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
322 <span class="required">Required</span>
324 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
325 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
327 [% IF subscription %]
330 Frequency: [% subscription.frequency.description | html %] |
331 [% IF subscription.numberlength %]Number of issues: [% subscription.numberlength | html %][% END %]
332 [% IF subscription.weeklength %]Number of weeks: [% subscription.weeklength | html %][% END %]
333 [% IF subscription.monthlength %]Number of months: [% subscription.monthlength | html %][% END %]
339 <span class="label required">Fund: </span>
340 <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
342 <label class="required" for="budget_id">Fund: </label>
343 [% active_count = 0 %]
344 [% IF !ordernumber %]
345 [% FOREACH budget_loo IN budget_loop %]
346 [% active_count= active_count + budget_loo.b_active %]
349 <select id="budget_id" size="1" name="budget_id">
350 <option value="">Select a fund</option>
351 [% FOREACH budget_loo IN budget_loop %]
352 [% IF ( budget_loo.b_sel ) %]
353 [% active_count = 0 #select no other fund %]
354 <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 %]"
355 style="padding-left:[% budget_loo.b_level | html %]em;"
357 [% ELSIF active_count==1 && budget_loo.b_active %]
358 <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 %]"
359 style="padding-left:[% budget_loo.b_level | html %]em;"
362 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
363 <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 %]"
364 style="padding-left:[% budget_loo.b_level | html %]em;"
367 [% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
371 <span class="required">Required</span>
372 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
373 <input type="checkbox" id="showallbudgets" />
378 <span class="label">Currency: </span>
379 <input type="hidden" name="currency" id="currency" value="[% currency | html %]" />[% currency | html %]
381 <label for="currency">Currency:</label>
382 <select name="currency" id="currency" onchange="updateCosts();">
383 [% FOREACH c IN currencies %]
384 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
385 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
386 [% ELSIF not c.archived %]
387 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
395 <span class="label">Vendor price: </span>
396 <input type="hidden" name="listprice" id="listprice" value="[% listprice | html %]" />[% listprice | html %] [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
398 <label for="listprice">Vendor price: </label>
399 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
402 [% UNLESS ( close ) %]
404 <label for="uncertainprice">Uncertain price: </label>
405 [% IF ( uncertainprice ) %]
406 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
408 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
412 [% IF ( gst_values ) %]
415 <span class="label">Tax rate: </span>
416 <input type="hidden" name="tax_rate" id="tax_rate" value="[% tax_rate | html %]" />[% tax_rate | html %]%
418 <label for="tax_rate">Tax rate: </label>
419 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
420 [% FOREACH gst IN gst_values %]
421 [% IF ( gst.option == tax_rate ) %]
422 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
424 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
430 <input type="hidden" name="tax_rate" value="0" />
434 <label for="discount">Discount: </label>
436 [% IF ( orderdiscount ) %]
437 <input type="hidden" name="discount" id="discount" value="[% orderdiscount | html %]" />[% orderdiscount_2dp | html %]%
439 <input type="hidden" name="discount" id="discount" value="[% discount | html %]" />[% discount_2dp | html %]%
442 [% IF ( orderdiscount ) %]
443 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
445 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
451 <span class="label">Retail price: </span>
452 <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 %])
454 <label for="rrp">Retail price: </label>
455 <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 %])
459 <label for="replacementprice">Replacement cost: </label>
460 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
463 <label for="ecost">Budgeted cost: </label>
464 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
467 <label for="total">Total: </label>
468 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
470 <li class="ordering_unitprice">
471 <label for="unitprice">Actual cost: </label>
472 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" />
473 [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
476 <label for="order_internalnote">Internal note: </label>
477 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
480 <label for="order_vendornote">Vendor note: </label>
481 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
483 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
484 <label for="sort1">Statistic 1: </label>
485 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
487 <label for="sort2">Statistic 2: </label>
488 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
492 <fieldset class="action">
493 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
494 <input type="submit" value="Save" />
495 [% IF (suggestionid) %]
496 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
498 [% IF subscriptionid %]
499 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
501 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
507 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
508 <div class="modal-dialog">
509 <div class="modal-content">
510 <div class="modal-body">
511 <h3>Processing multiple items</h3>
517 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
518 <div class="modal-dialog">
519 <div class="modal-content">
520 <h3>Invalid number of copies</h3>
521 <p>Please enter a <b>number</b>, greater than or equal to 1</p>
527 </div> <!-- /.col-sm-10.col-sm-push-2 -->
529 <div class="col-sm-2 col-sm-pull-10">
531 [% INCLUDE 'acquisitions-menu.inc' %]
533 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
534 </div> <!-- /.row -->
536 [% MACRO jsinclude BLOCK %]
537 [% Asset.js("js/acquisitions-menu.js") | $raw %]
538 [% Asset.js("js/acq.js") | $raw %]
539 [% INCLUDE 'additem.js.inc' %]
540 [% Asset.js("js/additem.js") | $raw %]
541 [% Asset.js("js/cataloging.js") | $raw %]
546 [% IF (AcqCreateItemOrdering) %]
547 // Remove last itemblock if it is not in items_list
548 var lastitemblock = $("#outeritemblock > div:last");
549 var tobedeleted = true;
550 var listitems = $("#items_list tr");
551 $(listitems).each(function(){
552 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
557 $(lastitemblock).remove();
562 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
564 _alertString +="-------------------------------------------------------------------\n\n";
566 if(isNull(ff.budget_id,1)){
568 _alertString += "\n- "+ _("You must select a fund");
571 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
573 _alertString += "\n- " + _("Quantity must be greater than '0'");
576 if (!(isNum(ff.listprice,0))){
578 _alertString += "\n- " + _("Vendor price must be a number");
581 if (!(isNum(ff.total,0))){
583 _alertString += "\n- " + _("Total must be a number");
586 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
588 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
591 if ( ff.field_value ) {
592 var empty_item_mandatory = CheckMandatorySubfields(ff);
593 if (empty_item_mandatory > 0) {
596 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
603 [% IF (AcqCreateItemOrdering) %]
605 $(lastitemblock).appendTo('#outeritemblock');
611 [% IF (AcqCreateItemOrdering) %]
612 if(check_additem('[% UniqueItemFields | html %]') == false) {
613 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
615 $(lastitemblock).appendTo('#outeritemblock');
622 $(document).ready(function(){
623 [% IF AcqCreateItemOrdering and not basket.is_standing %]
624 cloneItemBlock(0, '[% UniqueItemFields | html %]');
627 [% IF ( suggestionid ) %]updateCosts();[% END %]
628 $("#quantity").change(function() {
632 //We apply the fonction only for modify option
633 [% IF ( quantityrec and not subscriptionid ) %]
634 [% IF ( acqcreate ) %]
635 $('#quantity').blur(function(){
636 // if user decreases the quantity
637 if($(this).val() < [% quantityrec | html %]){
638 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
641 // if user increases the quantity
642 alert(_("You can't add a new item, please create a new order line"));
643 // and we replace the original value
644 $(this).val([% quantityrec | html %])
645 updateCosts(); // blur is invoked after change which updated values
652 //keep a copy of all budgets before removing the inactives
653 disabledBudgetsCopy = $('#budget_id').html();
654 $('#budget_id .b_inactive').remove();
656 $('#showallbudgets').click(function() {
657 if ($(this).is(":checked")) {
658 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
661 $('#budget_id .b_inactive').remove();
665 $("#budget_id").change(function(){
666 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
667 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
668 var sort1 = $(destination_sort1).val() || "";
669 if ( destination_sort1.length < 1 ) {
670 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
672 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
673 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
674 var sort2 = $(destination_sort2).val() || "";
675 if ( destination_sort2.length < 1 ) {
676 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
678 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
679 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
681 $("#budget_id").change();
684 function UserSearchPopup(f) {
686 "/cgi-bin/koha/acqui/add_user_search.pl",
688 'width=740, height=450, scrollbars=yes, toolbar=no,'
692 function add_user(borrowernumber, borrowername) {
693 var ids = $("#users_ids").val();
695 ids = ids.split(':');
699 if (ids.indexOf(borrowernumber.toString()) < 0) {
700 ids.push(borrowernumber);
701 $("#users_ids").val(ids.join(':'));
702 var li = '<li id="user_'+borrowernumber+'">'+borrowername
703 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
704 + _("Delete user") + '</a>]</li>';
705 $("#users_names").append(li);
711 function del_user(borrowernumber) {
712 $("#user_"+borrowernumber).remove();
713 var ids = $("#users_ids").val().split(':');
714 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
715 $("#users_ids").val(ids.join(':'));
720 [% INCLUDE 'intranet-bottom.inc' %]
722 [% BLOCK display_subfield %]
723 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
724 [% IF field.authorised_value %]
725 [% SWITCH field.authorised_value %]
726 [% CASE 'branches' %]
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_libraries libraries => Branches.all( selected => "FIXME" ) %]
735 [% CASE 'itemtypes' %]
736 [% IF field.mandatory %]
737 <select name="bib_field_value" required="required">
739 <select name="bib_field_value">
741 <option value=""></option>
742 [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
744 [% CASE 'cn_source' %]
746 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
749 [% IF field.mandatory %]
750 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
752 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
756 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
757 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
758 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
759 [% IF field.mandatory %] <span class="required">Required</span>[% END %]