8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% IF ( ordernumber ) %]Modify order details (line #[% ordernumber | html %])[% ELSE %]New order[% END %] › Basket [% basketno | html %] › Acquisitions › Koha</title>
10 [% INCLUDE 'doc-head-close.inc' %]
14 #itemfieldset span.label {
24 #itemfieldset .input_marceditor {
28 #itemfieldset .input_marceditor.flatpickr-input {
32 #itemfieldset .subfield_line {
40 <body id="acq_neworderempty" class="acq">
42 [% WRAPPER 'header.inc' %]
43 [% INCLUDE 'acquisitions-search.inc' %]
46 [% WRAPPER 'sub-header.inc' %]
47 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
50 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
53 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
56 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
59 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
62 [% IF ( ordernumber ) %]
64 <a href="#" aria-current="page">
65 Modify order details (line #[% ordernumber | html %])
70 <a href="#" aria-current="page">
79 [% INCLUDE 'blocking_errors.inc' %]
81 <div class="main container-fluid">
83 <div class="col-sm-10 col-sm-push-2">
87 [% IF ( ordernumber ) %]
94 <div class="dialog alert order_error" style="display:none"></div>
97 <div id="acqui_basket_summary">
98 <fieldset class="rows">
99 <legend>Basket details</legend>
101 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
102 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
103 [% IF ( basketcontractno ) %]
104 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
105 <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>
107 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
108 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
109 [% IF ( closedate ) %]
110 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
111 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
112 [% IF ( basketgroups ) %]
113 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
114 [% FOREACH basketgroup IN basketgroups %]
115 [% IF ( basketgroup.default ) %]
116 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
118 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
122 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
123 <input type="hidden" value="mod_basket" name="op" />
124 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
126 <fieldset class="action"><input type="submit" class="btn btn-primary" value="Change basketgroup" /></fieldset>
135 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated noEnterSubmit" id="Aform" onsubmit="return Check(this);" >
137 <fieldset class="rows">
138 <legend>Patrons</legend>
141 <span class="label">To notify on receiving:</span>
142 <div style="float:left">
143 <ul id="users_names" style="padding-left:0">
144 [% FOREACH user IN users %]
145 <li id="user_[% user.borrowernumber | html %]">
146 [% user.firstname | html %] [% user.surname | html %]
147 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
151 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
152 <input type="hidden" id="op" name="op" value="mod_users" />
153 <input type="button" id="add_user" class="btn btn-default" onclick="UserSearchPopup();" value="Add user" />
159 <fieldset class="rows">
162 [% IF ( biblionumber ) %]
163 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]"> Edit record</a></span>
166 [% UNLESS ( existing ) %]
167 <input type="hidden" name="existing" value="no" />
169 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
170 <input type="hidden" name="basketno" value="[% basketno | html %]" />
171 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
172 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
173 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
174 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
175 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
176 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
178 [% FOREACH c IN currencies %]
179 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
182 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
184 [% IF ( biblionumber ) %]
185 <span class="label">Title</span>
186 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
188 <label for="entertitle">Title: </label>
189 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
190 <span class="required">Required</span>
194 [% IF ( biblionumber ) %]
195 <span class="label">Author: </span>
196 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
198 <label for="author">Author: </label>
199 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
203 [% IF ( biblionumber ) %]
204 <span class="label">Publisher: </span>
205 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
207 <label for="publishercode"> Publisher: </label>
208 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
212 [% IF ( biblionumber ) %]
213 <span class="label">Edition: </span>
214 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
217 <label for="editionstatement">Edition: </label>
218 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
222 [% IF ( biblionumber ) %]
223 <span class="label">Publication year: </span>
224 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
226 <label for="publicationyear">Publication year: </label>
227 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
231 [% IF ( biblionumber ) %]
232 <span class="label">ISBN: </span>
233 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
235 <label for="ISBN">ISBN: </label>
236 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
241 [% IF ( biblionumber ) %]
242 <span class="label">EAN: </span>
243 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
245 <label for="EAN">EAN: </label>
246 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
251 [% IF ( biblionumber ) %]
252 <span class="label">Series: </span>
253 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
255 <label for="series">Series: </label>
256 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
259 [% UNLESS ( biblionumber ) %]
260 [% IF ( itemtypeloop ) %]
262 <span class="label">Item type:</span>
263 <select name="itemtype" style="width:12em;">
264 [% FOREACH itemtype IN itemtypeloop %]
265 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
273 <input type="hidden" name="use_ACQ_framework" value="1" />
274 [% IF biblionumber %]
276 [% FOREACH field IN catalog_details %]
278 <div class="subfield_line">
279 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
280 [% field.value | html %]
287 [% FOREACH field IN catalog_details %]
289 <div class="subfield_line">
290 [% PROCESS display_subfield field=field %]
299 [% IF ( suggestionid ) %]
300 <fieldset class="rows">
301 <legend>Suggestion</legend>
304 <span class="label">Suggested by: </span>
305 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&op=show">suggestion #[% suggestionid | html %]</a>)
311 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
312 [% IF (AcqCreateItemOrdering) %]
314 <div id="items_list" class="page-section" style="display:none">
315 <p><strong>Items list</strong></p>
316 <div style="width:100%;overflow:auto;">
320 <th class="noExport">Actions</th>
322 <th>Home library</th>
323 <th>Holding library</th>
324 <th>Not for loan</th>
329 <th>Inventory number</th>
342 <fieldset class="rows" id="itemfieldset">
343 <legend>Item</legend>
344 [% IF ( NoACQframework ) %]
345 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
348 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
349 <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>
352 <div id="outeritemblock"></div>
355 [% END %][%# | html UNLESS subscriptionid %]
356 [% END %][%# IF (AcqCreateItemOrdering) %]
357 <fieldset class="rows">
358 <legend>Accounting details</legend>
361 <label class="required" for="quantity">Quantity: </label>
362 [% IF subscriptionid %]
363 <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
364 [% ELSIF AcqCreateItemOrdering %]
365 [% IF basket.is_standing %]
366 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
368 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
371 [% IF basket.is_standing %]
372 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
374 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
377 <span class="required">Required</span>
378 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
379 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
381 [% IF subscription %]
384 <span>Frequency:</span> [% subscription.frequency.description | html %] |
385 [% IF subscription.numberlength %]<span>Number of issues: [% subscription.numberlength | html %]</span>[% END %]
386 [% IF subscription.weeklength %]<span>Number of weeks: [% subscription.weeklength | html %]</span>[% END %]
387 [% IF subscription.monthlength %]<span>Number of months: [% subscription.monthlength | html %]</span>[% END %]
392 <label class="required" for="budget_id">Fund: </label>
393 [% active_count = 0 %]
394 [% IF !ordernumber %]
395 [% FOREACH budget_loo IN budget_loop %]
396 [% active_count= active_count + budget_loo.b_active %]
399 <select class="select2" id="budget_id" name="budget_id">
400 <option value="">Select a fund</option>
401 [% FOREACH budget_loo IN budget_loop %]
402 [% level_indent_cnt = 0 %]
403 [% level_indent = "" %]
404 [% WHILE level_indent_cnt < budget_loo.b_level %]
405 [% level_indent = level_indent _ " -- " %]
406 [% level_indent_cnt = level_indent_cnt +1 %]
409 [% IF ( budget_loo.b_sel ) %]
410 [% active_count = 0 #select no other fund %]
411 <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 %]"
413 [% ELSIF active_count==1 && budget_loo.b_active %]
414 <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 %]"
417 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
418 <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 %]"
421 [% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
425 <span class="required">Required</span>
426 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
427 <input type="checkbox" id="showallbudgets" />
430 <label for="currency">Currency:</label>
431 <select name="currency" id="currency" onchange="updateCosts();">
432 [% FOREACH c IN currencies %]
433 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
434 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
435 [% ELSIF not c.archived %]
436 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
442 <label for="listprice">Vendor price: </label>
443 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
446 <label for="uncertainprice">Uncertain price: </label>
447 [% IF ( uncertainprice ) %]
448 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
450 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
453 [% IF ( gst_values ) %]
455 <label for="tax_rate">Tax rate: </label>
456 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
457 [% SET gst_found = 0 %]
458 [% FOREACH gst IN gst_values %]
459 [% IF ( gst.option == tax_rate ) %]
460 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
461 [% SET gst_found = 1 %]
463 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
468 <option value="[% tax_rate | html %]" selected="selected">[% tax_rate * 100 | html %]%</option>
472 [% IF !gst_found %]<span class="required">Tax rate not defined in system preference TaxRates!</span>[% END %]
474 <input type="hidden" name="tax_rate" value="0" />
478 <label for="discount">Discount: </label>
479 [% IF ( ordernumber ) %]
480 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
482 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
486 <label for="rrp">Retail price: </label>
487 <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 %])
490 <label for="replacementprice">Replacement cost: </label>
491 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
494 <label for="ecost">Budgeted cost: </label>
495 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
498 <label for="total">Total: </label>
499 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
501 <li class="ordering_unitprice">
502 <label for="unitprice">Actual cost: </label>
503 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" />
504 [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
507 <label for="order_internalnote">Internal note: </label>
508 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
511 <label for="order_vendornote">Vendor note: </label>
512 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
515 <label for="estimated_delivery_date">Estimated delivery date: </label>
516 <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% estimated_delivery_date | html %]"/>
517 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
520 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
523 <label for="sort1">Statistic 1: </label>
524 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
527 <label for="sort2">Statistic 2: </label>
528 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
532 <fieldset class="action">
533 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
534 <input type="submit" class="btn btn-primary" value="Save" />
535 [% IF (suggestionid) %]
536 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
538 [% IF subscriptionid %]
539 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
541 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
547 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
548 <div class="modal-dialog">
549 <div class="modal-content">
550 <div class="modal-body">
551 <h3>Processing multiple items</h3>
557 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
558 <div class="modal-dialog">
559 <div class="modal-content">
560 <h3>Invalid number of copies</h3>
561 <p>Please enter a <strong>number</strong>, greater than or equal to 1</p>
567 </div> <!-- /.col-sm-10.col-sm-push-2 -->
569 <div class="col-sm-2 col-sm-pull-10">
571 [% INCLUDE 'acquisitions-menu.inc' %]
573 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
574 </div> <!-- /.row -->
576 [% MACRO jsinclude BLOCK %]
577 [% Asset.js("js/acquisitions-menu.js") | $raw %]
578 [% Asset.js("js/acq.js") | $raw %]
579 [% Asset.js("js/additem.js") | $raw %]
580 [% Asset.js("js/cataloging.js") | $raw %]
581 [% INCLUDE 'calendar.inc' %]
582 [% INCLUDE 'select2.inc' %]
587 [% IF (AcqCreateItemOrdering) %]
588 // Remove last itemblock if it is not in items_list
589 var lastitemblock = $("#outeritemblock > div:last");
590 var tobedeleted = true;
591 var listitems = $("#items_list tr");
592 $(listitems).each(function(){
593 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
598 $(lastitemblock).remove();
603 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
605 _alertString +="-------------------------------------------------------------------\n\n";
607 if(isNull(ff.budget_id,1)){
609 _alertString += "\n- "+ _("You must select a fund");
612 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
614 _alertString += "\n- " + _("Quantity must be greater than '0'");
617 if (!(isNum(ff.listprice,0))){
619 _alertString += "\n- " + _("Vendor price must be a number");
622 if (!(isNum(ff.total,0))){
624 _alertString += "\n- " + _("Total must be a number");
627 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
629 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
632 if ( ff.field_value ) {
633 var empty_item_mandatory = CheckMandatorySubfields(ff);
634 if (empty_item_mandatory > 0) {
637 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
644 [% IF (AcqCreateItemOrdering) %]
646 $(lastitemblock).appendTo('#outeritemblock');
652 [% IF (AcqCreateItemOrdering) %]
653 if(check_additem('[% UniqueItemFields | html %]') == false) {
654 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
656 $(lastitemblock).appendTo('#outeritemblock');
663 $(document).ready(function(){
664 [% IF AcqCreateItemOrdering and not basket.is_standing %]
665 cloneItemBlock(0, '[% UniqueItemFields | html %]');
668 [% IF ( suggestionid ) %]updateCosts();[% END %]
669 $("#quantity").change(function() {
673 //We apply the fonction only for modify option
674 [% IF ( quantityrec and not subscriptionid ) %]
675 [% IF ( acqcreate ) %]
676 $('#quantity').blur(function(){
677 // if user decreases the quantity
678 if($(this).val() < [% quantityrec | html %]){
679 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
682 // if user increases the quantity
683 alert(_("You can't add a new item, please create a new order line"));
684 // and we replace the original value
685 $(this).val([% quantityrec | html %])
686 updateCosts(); // blur is invoked after change which updated values
693 //keep a copy of all budgets before removing the inactives
694 disabledBudgetsCopy = $('#budget_id').html();
695 $('#budget_id .b_inactive').remove();
697 $('#showallbudgets').click(function() {
698 if ($(this).is(":checked")) {
699 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
702 $('#budget_id .b_inactive').remove();
706 $("#budget_id").change(function(){
707 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
708 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
709 var sort1 = $(destination_sort1).val() || "";
710 if ( destination_sort1.length < 1 ) {
711 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
713 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
714 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
715 var sort2 = $(destination_sort2).val() || "";
716 if ( destination_sort2.length < 1 ) {
717 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
719 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
720 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
722 $("#budget_id").change();
725 function UserSearchPopup(f) {
727 "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add",
729 'width=1024, height=768, scrollbars=yes, toolbar=no,'
733 function add_user(borrowernumber, borrowername) {
734 var ids = $("#users_ids").val();
736 ids = ids.split(':');
740 if (ids.indexOf(borrowernumber.toString()) < 0) {
741 ids.push(borrowernumber);
742 $("#users_ids").val(ids.join(':'));
743 var li = '<li id="user_'+borrowernumber+'">'+borrowername
744 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
745 + _("Delete user") + '</a>]</li>';
746 $("#users_names").append(li);
752 function del_user(borrowernumber) {
753 $("#user_"+borrowernumber).remove();
754 var ids = $("#users_ids").val().split(':');
755 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
756 $("#users_ids").val(ids.join(':'));
761 [% INCLUDE 'intranet-bottom.inc' %]
763 [% BLOCK display_subfield %]
764 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
765 [% IF field.authorised_value %]
766 [% SWITCH field.authorised_value %]
767 [% CASE 'branches' %]
768 [% IF field.mandatory %]
769 <select name="bib_field_value" required="required">
771 <select name="bib_field_value">
773 <option value=""></option>
774 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
776 [% CASE 'itemtypes' %]
777 [% IF field.mandatory %]
778 <select name="bib_field_value" required="required">
780 <select name="bib_field_value">
782 <option value=""></option>
783 [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
785 [% CASE 'cn_source' %]
787 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
790 [% IF field.mandatory %]
791 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
793 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
797 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
798 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
799 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
800 [% IF field.mandatory %] <span class="required">Required</span>[% END %]