6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Acquisitions › Order staged MARC records
8 [% IF ( batch_details ) %]
9 › Batch [% import_batch_id | html %]
14 [% Asset.css("css/datatables.css") | $raw %]
15 <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
16 [% INCLUDE 'doc-head-close.inc' %]
19 <body id="acq_addorderiso2709" class="acq">
20 [% INCLUDE 'header.inc' %]
21 [% INCLUDE 'acquisitions-search.inc' %]
22 <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 %]">[% booksellername | html %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> › Add orders from iso2709 file</div>
24 <div class="container-fluid">
26 <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2">
27 [% IF ( allmatch ) %]<div class="dialog alert">
28 <h4>No records imported</h4>
29 No record have been imported because they all match an existing record in your catalog.<br />You'll have to treat them individually.
33 [% IF ( batch_details ) %]
34 <h1>Add orders from [% comments | html %]
35 ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 | html %])
37 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
38 <div id="tabs" class="toptabs">
40 <li><a href="#records_to_import">Select to import</a></li>
41 <li><a href="#items_info" class="items_info">Item information</a></li>
42 <li><a href="#accounting_details">Default accounting details</a></li>
45 <div id="records_to_import">
46 <div id="searchheader">
48 <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
50 <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
53 <label for="matcher_id">Matching:</label>
54 <select name="matcher_id" id="matcher_id">
55 <option value="_TITLE_AUTHOR_">Title and author</option>
56 <option value="">Do not look for matching records</option>
57 [% FOREACH available_matcher IN available_matchers %]
58 [% IF ( available_matcher.code == current_matcher_code ) %]
59 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
60 [% available_matcher.code | html %] ([% available_matcher.description | html %])
63 <option value="[% available_matcher.matcher_id | html %]">
64 [% available_matcher.code | html %] ([% available_matcher.description | html %])
72 <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
73 <input type="checkbox" id="showallbudgets" />
78 <input type="hidden" name="op" value="import_records"/>
79 <input type="hidden" name="basketno" value="[% basketno | html %]" />
80 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
81 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
82 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
84 [% FOREACH biblio IN biblio_list %]
85 <fieldset class="biblio unselected rows" style="float:none;">
87 <label for="record_[% biblio.import_record_id | html %]" style="width:auto;">
88 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
89 <span class="citation">[% biblio.citation | html %]</span>
91 <span class="links" style="font-weight: normal;">
92 ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | html %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id | html %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]&breedingid=[% biblio.import_record_id | html %]&import_batch_id=[% biblio.import_batch_id | html %]&biblionumber=[% biblio.match_biblionumber | html %]">Add order</a> )
95 <div style="float:left">
99 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
101 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
103 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
106 [% biblio_lis.overlay_status | html %]
108 [% IF ( biblio.match_biblionumber ) %]
109 Matches biblio [% biblio.match_biblionumber | html %] (score = [% biblio.match_score | html %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber | html %]">[% biblio.match_citation | html %]</a>
113 <li class="quantity">
114 <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
115 <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
118 <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
119 <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
121 <li class="discount">
122 <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
123 <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
124 (If empty, discount rate from vendor will be used)
127 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
129 <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
131 <select id="fund_record_[% biblio.import_record_id | html %]" size="1" name="budget_id">
132 <option value="">Select a fund</option>
133 [% FOREACH budget IN budget_loop %]
134 [% IF ( budget.b_id == biblio.budget_id ) %]
135 [% IF budget.b_active %]
136 <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %]</option>
138 <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %] (inactive)</option>
141 [% IF budget.b_active %]<option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option>
142 [% ELSE %]<option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %] (inactive)</option>
150 <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
151 <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
154 <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
155 <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
159 <div style="float:right">
160 [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
161 [% FOREACH item IN biblio.iteminfos %]
163 <legend>Item Record [% item.item_id | html %]</legend>
166 <label for="homebranch_item_[% item.item_id | html %]">homebranch</label><select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% item.biblio_count | html %]">
167 [% FOREACH l IN libraries %]
168 [% IF l.branchcode == item.homebranch %]
169 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
171 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
177 <li><label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% item.biblio_count | html %]">
178 [% FOREACH l IN libraries %]
179 [% IF l.branchcode == item.holdingbranch %]
180 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
182 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
187 <li><label for="itype_item_[% item.item_id | html %]">itype</label><select id="itype_item_[% item.item_id | html %]" name="itype_[% item.biblio_count | html %]">
188 [% FOREACH itypeloo IN itypeloop %]
189 [% IF ( itypeloo.itemtype ) == ( item.itype ) %]
190 <option value="[% itypeloo.itemtype | html %]" selected="selected">[% itypeloo.description | html %]</option>
192 <option value="[% itypeloo.itemtype | html %]">[% itypeloo.description | html %]</option>
198 <li><label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% item.biblio_count | html %]" value="[% item.nonpublic_note | html %]"></li>
199 <li><label for="public_note_item_[% item.item_id | html %]">public_note</label><input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% item.biblio_count | html %]" value="[% item.public_note | html %]"></li>
200 <li><label for="loc_item_[% item.item_id | html %]">loc</label><select id="loc_item_[% item.item_id | html %]" name="loc_[% item.biblio_count | html %]">
201 <option value=""> </option>
202 [% FOREACH locationloo IN locationloop %]
203 [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>[% ELSE %]<option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>[% END %]
208 <li><label for="ccode_item_[% item.item_id | html %]">ccode</label><select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
209 [% FOREACH ccodeloo IN ccodeloop %]
210 [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
215 <li><label for="notforloan_item_[% item.item_id | html %]">notforloan</label><select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
216 [% FOREACH n IN notforloanloop %]
217 [% IF n.code == item.notforloan %]
218 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
220 <option value="[% n.code | html %]">[% n.description | html %]</option>
225 <li><label for="uri_item_[% item.item_id | html %]">uri</label><input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% item.biblio_count | html %]" value="[% item.uri | html %]"></li>
226 <li><label for="copyno_item_[% item.item_id | html %]">copyno</label><input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% item.biblio_count | html %]" value="[% item.copyno | html %]"></li>
227 <li><label for="budget_code_item_[% item.item_id | html %]">budget_code</label><select id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% item.biblio_count | html %]">
228 <option value="">Select a fund</option>
229 [% FOREACH budget_loo IN budget_loop %]
230 [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
231 [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
236 <li><label for="price_item_[% item.item_id | html %]">price</label><input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% item.biblio_count | html %]" value="[% item.itemprice | html %]"></li>
237 <li><label for="replacementprice_item_[% item.item_id | html %]">replacement price</label><input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% item.biblio_count | html %]" value="[% item.replacementprice | html %]"></li>
238 <li><label for="callnumber_item_[% item.item_id | html %]">callnumber</label><input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% item.biblio_count | html %]" value="[% item.itemcallnumber | html %]"></li>
244 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
245 <div class="modal-dialog">
246 <div class="modal-content">
247 <div class="modal-header">
248 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
249 <h3 id="dataPreviewLabel">MARC preview</h3>
251 <div class="modal-body">
252 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
254 <div class="modal-footer">
255 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
262 <div id="items_info">
263 <h2>Item information</h2>
264 <p>Import all the checked items in the basket with the following parameters:</p>
267 <fieldset class="rows" style="float:none;">
268 <legend>Item</legend>
269 [% IF ( NoACQframework ) %]
270 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
272 [% FOREACH item IN items %]
273 <div id="outeritemblock">
276 [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden | html %];">
277 <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
278 [% IF (iteminformatio.mandatory) %]
279 <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
281 <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
284 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
285 <select name="field_value" size="1">
286 [% FOREACH value IN iteminformatio.marc_value.values %]
287 [% IF ( value == iteminformatio.marc_value.default ) %]
288 <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
290 <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
295 [% iteminformatio.marc_value | html %]
297 <input type="hidden" name="itemid" value="1" />
298 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
299 <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
300 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
301 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
302 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
306 </div><!-- /iteminformation -->
308 [% END %] <!-- /items -->
310 [% END %] <!-- items -->
312 <div id="accounting_details">
313 <p>Import all the checked items in the basket with the following accounting details (used only if no information is filled for the item):</p>
314 <fieldset class="rows" style="float:none;">
315 <legend>Accounting details</legend>
318 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
319 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
323 <span class="label">Fund: </span>
324 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
327 <label for="all_currency">Currency:</label>
328 <select name="all_currency" id="all_currency">
329 [% FOREACH currency IN currencies %]
330 [% IF currency.currency == bookseller.listprice %]
331 <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
332 [% ELSIF not currency.archived %]
333 <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
339 <label for="all_budget_id">Fund: </label>
340 <select id="all_budget_id" size="1" name="all_budget_id">
341 <option value="">Select a fund</option>
342 [% FOREACH budget_loo IN budget_loop %]
343 [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %]</option>
344 [% ELSE %]<option value="[% budget_loo.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %] (inactive)</option>
348 <label for="all_showallbudgets" style="float:none;width:auto;"> Show inactive:</label>
349 <input type="checkbox" id="all_showallbudgets" />
354 <label for="all_order_internalnote">Internal note: </label>
355 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
358 <label for="all_order_vendornote">Vendor note: </label>
359 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
362 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
363 <label for="all_sort1">Statistic 1: </label>
364 <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
367 <label for="all_sort2">Statistic 2: </label>
368 <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
375 <fieldset class="action">
376 <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
381 <h1>Choose the file to add to the basket</h1>
388 <th class="title-string">Staged</th>
390 <th class="NoSort"> </th>
394 [% FOREACH batch_lis IN batch_list %]
396 <td>[% batch_lis.file_name | html %]</td>
397 <td>[% batch_lis.comments | html %]</td>
399 [% IF ( batch_lis.import_status == 'cleaned' ) %]
401 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
403 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
405 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
407 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
409 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
412 [% batch_lis.import_status | html %]
415 <td><span title="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 | html %]</span></td>
416 <td>[% batch_lis.num_records | html %]</td>
417 <td><a href="[% batch_lis.scriptname | html %]?import_batch_id=[% batch_lis.import_batch_id | html %]&basketno=[% basketno | html %]&booksellerid=[% booksellerid | html %]">Add orders</a></td>
424 </div> [% # /div.col-sm-6 %]
425 </div> [% # /div.row %]
427 [% MACRO jsinclude BLOCK %]
428 [% Asset.js("js/acquisitions-menu.js") | $raw %]
429 [% INCLUDE 'datatables.inc' %]
430 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
431 [% Asset.js("js/acq.js") | $raw %]
432 <script type="text/JavaScript">
433 $(document).ready(function() {
434 $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
436 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
437 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
438 { "sType": "title-string", "aTargets" : [ "title-string" ] }
440 "sPaginationType": "four_button",
444 // keep copy of the inactive budgets
445 disabledBudgetsCopy = $("select[name='all_budget_id']").html();
446 $("select[name='all_budget_id'] .b_inactive").remove();
447 $("select[name='budget_id'] .b_inactive").remove();
449 $("#showallbudgets").click(function() {
450 if ($(this).is(":checked")) {
451 $("select[name='budget_id']").html(disabledBudgetsCopy)
454 $("select[name='budget_id'] .b_inactive").remove();
458 $("#all_showallbudgets").click(function() {
459 if ($(this).is(":checked")) {
460 $("select[name='all_budget_id']").html(disabledBudgetsCopy);
463 $("select[name='all_budget_id'] .b_inactive").remove();
467 $("select[name='budget_id']").change(function(){
468 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
469 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
470 var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
471 var sort1 = $(destination_sort1).val() || "";
472 if ( destination_sort1.length < 1 ) {
473 destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]');
475 var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]');
476 var sort2 = $(destination_sort2).val() || "";
477 if ( destination_sort2.length < 1 ) {
478 destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]');
480 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
482 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
485 $("select[name='budget_id']").change();
487 $("select[name='all_budget_id']").change(function(){
488 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
489 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
490 var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]');
491 if ( destination_sort1.length < 1 ) {
492 destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]');
494 var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]');
495 if ( destination_sort2.length < 1 ) {
496 destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]');
498 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 );
499 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 );
500 $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1');
501 $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1');
502 $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2');
503 $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
506 $("select[name='all_budget_id']").change();
508 $("#records_to_import fieldset.rows div").hide();
509 $('input:checkbox[name="import_record_id"]').change(function(){
510 var container = $(this).parents("fieldset");
511 if ( $(this).is(':checked') ) {
512 $(container).addClass("selected");
513 $(container).removeClass("unselected");
514 $(container).find("div").toggle(true);
516 $(container).addClass("unselected");
517 $(container).removeClass("selected");
518 $(container).find("div").toggle(false);
522 $("input:checkbox").prop("checked", false);
523 $("div.biblio.unselected select").prop('disabled', false);
524 $("div.biblio.unselected input").prop('disabled', false);
526 $("#checkAll").click(function(){
527 $("#Aform").checkCheckboxes();
528 $("input:checkbox[name='import_record_id']").change();
531 $("#unCheckAll").click(function(){
532 $("#Aform").unCheckCheckboxes();
533 $("input:checkbox[name='import_record_id']").change();
537 $("#Aform").on("submit", function(){
538 if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) {
539 alert(_("There is no record selected"));
544 $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){
545 if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) {
550 alert(error + " " + _("quantity values are not filled in or are not numbers"));
555 return disableUnchecked($(this));
558 $(".previewData").on("click", function(e){
560 var ltitle = $(this).text();
561 var page = $(this).attr("href");
562 $("#dataPreviewLabel").text(ltitle);
563 $("#dataPreview .modal-body").load(page + " div");
564 $('#dataPreview').modal({show:true});
566 $("#dataPreview").on("hidden", function(){
567 $("#dataPreviewLabel").html("");
568 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
572 function disableUnchecked(form){
573 $("fieldset.biblio.unselected").each(function(){
581 [% INCLUDE 'intranet-bottom.inc' %]