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' %]
13 <body id="acq_neworderempty" class="acq">
15 [% WRAPPER 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
19 [% WRAPPER 'sub-header.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
26 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
29 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
32 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
35 [% IF ( ordernumber ) %]
37 <a href="#" aria-current="page">
38 Modify order details (line #[% ordernumber | html %])
43 <a href="#" aria-current="page">
52 [% INCLUDE 'blocking_errors.inc' %]
54 <div class="main container-fluid">
56 <div class="col-sm-10 col-sm-push-2">
60 [% IF ( ordernumber ) %]
67 <div class="dialog alert order_error" style="display:none"></div>
70 <div id="acqui_basket_summary">
71 <fieldset class="rows">
72 <legend>Basket details</legend>
74 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
75 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
76 [% IF ( basketcontractno ) %]
77 <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
78 <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>
80 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname | html %]</li>[% END %]
81 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
82 [% IF ( closedate ) %]
83 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
84 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
85 [% IF ( basketgroups ) %]
86 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
87 [% FOREACH basketgroup IN basketgroups %]
88 [% IF ( basketgroup.default ) %]
89 <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
91 <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
95 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
96 <input type="hidden" value="mod_basket" name="op" />
97 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
99 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
108 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated noEnterSubmit" id="Aform" onsubmit="return Check(this);" >
110 <fieldset class="rows">
111 <legend>Patrons</legend>
114 <span class="label">To notify on receiving:</span>
115 <div style="float:left">
116 <ul id="users_names" style="padding-left:0">
117 [% FOREACH user IN users %]
118 <li id="user_[% user.borrowernumber | html %]">
119 [% user.firstname | html %] [% user.surname | html %]
120 [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
124 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
125 <input type="hidden" id="op" name="op" value="mod_users" />
126 <input type="button" id="add_user" onclick="UserSearchPopup();" value="Add user" />
132 <fieldset class="rows">
135 [% IF ( biblionumber ) %]
136 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]"> Edit record</a></span>
139 [% UNLESS ( existing ) %]
140 <input type="hidden" name="existing" value="no" />
142 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
143 <input type="hidden" name="basketno" value="[% basketno | html %]" />
144 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
145 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
146 <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
147 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
148 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
149 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
151 [% FOREACH c IN currencies %]
152 <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
155 [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
157 [% IF ( biblionumber ) %]
158 <span class="label">Title</span>
159 <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
161 <label for="entertitle">Title: </label>
162 <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
163 <span class="required">Required</span>
167 [% IF ( biblionumber ) %]
168 <span class="label">Author: </span>
169 <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
171 <label for="author">Author: </label>
172 <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
176 [% IF ( biblionumber ) %]
177 <span class="label">Publisher: </span>
178 <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
180 <label for="publishercode"> Publisher: </label>
181 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
185 [% IF ( biblionumber ) %]
186 <span class="label">Edition: </span>
187 <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
190 <label for="editionstatement">Edition: </label>
191 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
195 [% IF ( biblionumber ) %]
196 <span class="label">Publication year: </span>
197 <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
199 <label for="publicationyear">Publication year: </label>
200 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
204 [% IF ( biblionumber ) %]
205 <span class="label">ISBN: </span>
206 <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
208 <label for="ISBN">ISBN: </label>
209 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
214 [% IF ( biblionumber ) %]
215 <span class="label">EAN: </span>
216 <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
218 <label for="EAN">EAN: </label>
219 <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
224 [% IF ( biblionumber ) %]
225 <span class="label">Series: </span>
226 <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
228 <label for="series">Series: </label>
229 <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
232 [% UNLESS ( biblionumber ) %]
233 [% IF ( itemtypeloop ) %]
235 <span class="label">Item type:</span>
236 <select name="itemtype" style="width:12em;">
237 [% FOREACH itemtype IN itemtypeloop %]
238 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
246 <input type="hidden" name="use_ACQ_framework" value="1" />
247 [% IF biblionumber %]
249 [% FOREACH field IN catalog_details %]
251 <div class="subfield_line">
252 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
253 [% field.value | html %]
260 [% FOREACH field IN catalog_details %]
262 <div class="subfield_line">
263 [% PROCESS display_subfield field=field %]
272 [% IF ( suggestionid ) %]
273 <fieldset class="rows">
274 <legend>Suggestion</legend>
277 <span class="label">Suggested by: </span>
278 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&op=show">suggestion #[% suggestionid | html %]</a>)
284 [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
285 [% IF (AcqCreateItemOrdering) %]
287 <div id="items_list" style="display:none">
288 <p><strong>Items list</strong></p>
289 <div style="width:100%;overflow:auto;">
293 <th class="noExport">Actions</th>
295 <th>Home library</th>
296 <th>Holding library</th>
297 <th>Not for loan</th>
302 <th>Inventory number</th>
315 <fieldset class="rows" id="itemfieldset">
316 <legend>Item</legend>
317 [% IF ( NoACQframework ) %]
318 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
321 [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
322 <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>
325 <div id="outeritemblock"></div>
328 [% END %][%# | html UNLESS subscriptionid %]
329 [% END %][%# IF (AcqCreateItemOrdering) %]
330 <fieldset class="rows">
331 <legend>Accounting details</legend>
334 <label class="required" for="quantity">Quantity: </label>
335 [% IF subscriptionid %]
336 <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
337 [% ELSIF AcqCreateItemOrdering %]
338 [% IF basket.is_standing %]
339 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
341 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
344 [% IF basket.is_standing %]
345 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
347 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
350 <span class="required">Required</span>
351 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
352 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
354 [% IF subscription %]
357 <span>Frequency:</span> [% subscription.frequency.description | html %] |
358 [% IF subscription.numberlength %]<span>Number of issues: [% subscription.numberlength | html %]</span>[% END %]
359 [% IF subscription.weeklength %]<span>Number of weeks: [% subscription.weeklength | html %]</span>[% END %]
360 [% IF subscription.monthlength %]<span>Number of months: [% subscription.monthlength | html %]</span>[% END %]
365 <label class="required" for="budget_id">Fund: </label>
366 [% active_count = 0 %]
367 [% IF !ordernumber %]
368 [% FOREACH budget_loo IN budget_loop %]
369 [% active_count= active_count + budget_loo.b_active %]
372 <select class="select2" id="budget_id" name="budget_id">
373 <option value="">Select a fund</option>
374 [% FOREACH budget_loo IN budget_loop %]
375 [% level_indent_cnt = 0 %]
376 [% level_indent = "" %]
377 [% WHILE level_indent_cnt < budget_loo.b_level %]
378 [% level_indent = level_indent _ " -- " %]
379 [% level_indent_cnt = level_indent_cnt +1 %]
382 [% IF ( budget_loo.b_sel ) %]
383 [% active_count = 0 #select no other fund %]
384 <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 %]"
386 [% ELSIF active_count==1 && budget_loo.b_active %]
387 <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 %]"
390 [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
391 <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 %]"
394 [% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
398 <span class="required">Required</span>
399 <label for="showallbudgets" style="float:none;"> Show inactive:</label>
400 <input type="checkbox" id="showallbudgets" />
403 <label for="currency">Currency:</label>
404 <select name="currency" id="currency" onchange="updateCosts();">
405 [% FOREACH c IN currencies %]
406 [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
407 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
408 [% ELSIF not c.archived %]
409 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
415 <label for="listprice">Vendor price: </label>
416 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
419 <label for="uncertainprice">Uncertain price: </label>
420 [% IF ( uncertainprice ) %]
421 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
423 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
426 [% IF ( gst_values ) %]
428 <label for="tax_rate">Tax rate: </label>
429 <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
430 [% SET gst_found = 0 %]
431 [% FOREACH gst IN gst_values %]
432 [% IF ( gst.option == tax_rate ) %]
433 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
434 [% SET gst_found = 1 %]
436 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
441 <option value="[% tax_rate | html %]" selected="selected">[% tax_rate * 100 | html %]%</option>
445 [% IF !gst_found %]<span class="required">Tax rate not defined in system preference TaxRates!</span>[% END %]
447 <input type="hidden" name="tax_rate" value="0" />
451 <label for="discount">Discount: </label>
452 [% IF ( ordernumber ) %]
453 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
455 <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
459 <label for="rrp">Retail price: </label>
460 <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 %])
463 <label for="replacementprice">Replacement cost: </label>
464 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
467 <label for="ecost">Budgeted cost: </label>
468 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
471 <label for="total">Total: </label>
472 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
474 <li class="ordering_unitprice">
475 <label for="unitprice">Actual cost: </label>
476 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" />
477 [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
480 <label for="order_internalnote">Internal note: </label>
481 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
484 <label for="order_vendornote">Vendor note: </label>
485 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
488 <label for="estimated_delivery_date">Estimated delivery date: </label>
489 <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% estimated_delivery_date | $KohaDates %]"/>
490 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
492 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
493 <label for="sort1">Statistic 1: </label>
494 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
496 <label for="sort2">Statistic 2: </label>
497 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
501 <fieldset class="action">
502 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
503 <input type="submit" value="Save" />
504 [% IF (suggestionid) %]
505 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
507 [% IF subscriptionid %]
508 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">Cancel</a>
510 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
516 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
517 <div class="modal-dialog">
518 <div class="modal-content">
519 <div class="modal-body">
520 <h3>Processing multiple items</h3>
526 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
527 <div class="modal-dialog">
528 <div class="modal-content">
529 <h3>Invalid number of copies</h3>
530 <p>Please enter a <strong>number</strong>, greater than or equal to 1</p>
536 </div> <!-- /.col-sm-10.col-sm-push-2 -->
538 <div class="col-sm-2 col-sm-pull-10">
540 [% INCLUDE 'acquisitions-menu.inc' %]
542 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
543 </div> <!-- /.row -->
545 [% MACRO jsinclude BLOCK %]
546 [% Asset.js("js/acquisitions-menu.js") | $raw %]
547 [% Asset.js("js/acq.js") | $raw %]
548 [% Asset.js("js/additem.js") | $raw %]
549 [% Asset.js("js/cataloging.js") | $raw %]
550 [% INCLUDE 'calendar.inc' %]
551 [% INCLUDE 'select2.inc' %]
556 [% IF (AcqCreateItemOrdering) %]
557 // Remove last itemblock if it is not in items_list
558 var lastitemblock = $("#outeritemblock > div:last");
559 var tobedeleted = true;
560 var listitems = $("#items_list tr");
561 $(listitems).each(function(){
562 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
567 $(lastitemblock).remove();
572 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
574 _alertString +="-------------------------------------------------------------------\n\n";
576 if(isNull(ff.budget_id,1)){
578 _alertString += "\n- "+ _("You must select a fund");
581 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
583 _alertString += "\n- " + _("Quantity must be greater than '0'");
586 if (!(isNum(ff.listprice,0))){
588 _alertString += "\n- " + _("Vendor price must be a number");
591 if (!(isNum(ff.total,0))){
593 _alertString += "\n- " + _("Total must be a number");
596 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
598 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
601 if ( ff.field_value ) {
602 var empty_item_mandatory = CheckMandatorySubfields(ff);
603 if (empty_item_mandatory > 0) {
606 "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
613 [% IF (AcqCreateItemOrdering) %]
615 $(lastitemblock).appendTo('#outeritemblock');
621 [% IF (AcqCreateItemOrdering) %]
622 if(check_additem('[% UniqueItemFields | html %]') == false) {
623 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
625 $(lastitemblock).appendTo('#outeritemblock');
632 $(document).ready(function(){
633 [% IF AcqCreateItemOrdering and not basket.is_standing %]
634 cloneItemBlock(0, '[% UniqueItemFields | html %]');
637 [% IF ( suggestionid ) %]updateCosts();[% END %]
638 $("#quantity").change(function() {
642 //We apply the fonction only for modify option
643 [% IF ( quantityrec and not subscriptionid ) %]
644 [% IF ( acqcreate ) %]
645 $('#quantity').blur(function(){
646 // if user decreases the quantity
647 if($(this).val() < [% quantityrec | html %]){
648 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
651 // if user increases the quantity
652 alert(_("You can't add a new item, please create a new order line"));
653 // and we replace the original value
654 $(this).val([% quantityrec | html %])
655 updateCosts(); // blur is invoked after change which updated values
662 //keep a copy of all budgets before removing the inactives
663 disabledBudgetsCopy = $('#budget_id').html();
664 $('#budget_id .b_inactive').remove();
666 $('#showallbudgets').click(function() {
667 if ($(this).is(":checked")) {
668 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
671 $('#budget_id .b_inactive').remove();
675 $("#budget_id").change(function(){
676 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
677 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
678 var sort1 = $(destination_sort1).val() || "";
679 if ( destination_sort1.length < 1 ) {
680 destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
682 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
683 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
684 var sort2 = $(destination_sort2).val() || "";
685 if ( destination_sort2.length < 1 ) {
686 destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
688 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
689 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
691 $("#budget_id").change();
694 function UserSearchPopup(f) {
696 "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add",
698 'width=1024, height=768, scrollbars=yes, toolbar=no,'
702 function add_user(borrowernumber, borrowername) {
703 var ids = $("#users_ids").val();
705 ids = ids.split(':');
709 if (ids.indexOf(borrowernumber.toString()) < 0) {
710 ids.push(borrowernumber);
711 $("#users_ids").val(ids.join(':'));
712 var li = '<li id="user_'+borrowernumber+'">'+borrowername
713 + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
714 + _("Delete user") + '</a>]</li>';
715 $("#users_names").append(li);
721 function del_user(borrowernumber) {
722 $("#user_"+borrowernumber).remove();
723 var ids = $("#users_ids").val().split(':');
724 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
725 $("#users_ids").val(ids.join(':'));
730 [% INCLUDE 'intranet-bottom.inc' %]
732 [% BLOCK display_subfield %]
733 <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
734 [% IF field.authorised_value %]
735 [% SWITCH field.authorised_value %]
736 [% CASE 'branches' %]
737 [% IF field.mandatory %]
738 <select name="bib_field_value" required="required">
740 <select name="bib_field_value">
742 <option value=""></option>
743 [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %]
745 [% CASE 'itemtypes' %]
746 [% IF field.mandatory %]
747 <select name="bib_field_value" required="required">
749 <select name="bib_field_value">
751 <option value=""></option>
752 [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %]
754 [% CASE 'cn_source' %]
756 [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %]
759 [% IF field.mandatory %]
760 <input type="text" name="bib_field_value" value="[% field.value | html %]" required="required" size="50" />
762 <input type="text" name="bib_field_value" value="[% field.value | html %]" size="50" />
766 <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
767 <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
768 <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
769 [% IF field.mandatory %] <span class="required">Required</span>[% END %]