Owen Leonard
dcaa3ff704
Mandatory item fields are not indicated the same way in all places. This patch corrects two places where required fields were shown in bold rather than using the standard "required" class: When adding an order from a staged file and when adding an item for a new issue of a serial. This patch also normalizes the text input size on item entry forms: In some places it was 50, others 67. I have changed the latter to 50. Unrelated changes: Added $KohaDates formatting of date and time and corrected capitalization on a heading on the add order from staged file page. It would be nice to be able to use the same method for displaying the item form as we use on neworderentry.tt -- pulling in the form from a separate include. However that system is designed for handling multiple items and would need to be adapted for these cases. To test, you must have a staged file from which to add an order. Open an existing basket or create a new one and choose to add an order "From a staged file." Choose a staged file from which to order. The item entry form under the "Import all" heading should show required fields in red. To test in serials: Begin the process for receiving an item from an existing subscription. On the serials-edit page, find the "Click to add item" links and click to open the item edit forms. There should be one under the numbered issue and the supplemental issue forms. In both cases the item edit screen should show the mandatory item fields in red. Confirm that the cataloging add item form looks correct and works correctly. Revision: Left out the "required" note which should appear after each required field. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
262 lines
14 KiB
Text
262 lines
14 KiB
Text
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Order staged MARC records
|
|
[% IF ( batch_details ) %]
|
|
› Batch [% import_batch_id %]
|
|
[% ELSE %]
|
|
› Batch list
|
|
[% END %]
|
|
</title>
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
|
|
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
|
|
<script type="text/JavaScript">
|
|
//<![CDATA[
|
|
[% IF (dateformat == 'metric') %]
|
|
dt_add_type_uk_date();
|
|
[% END %]
|
|
$(document).ready(function() {
|
|
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumns": [
|
|
null,null,null,{ "sType": "title-string" },null,null
|
|
],
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 5 ], "bSortable": false, "bSearchable": false },
|
|
],
|
|
"sPaginationType": "four_button",
|
|
"aaSorting": []
|
|
} ) );
|
|
|
|
$("form#Aform").submit(function() {
|
|
var total_errors = CheckMandatorySubfields(this);
|
|
if (total_errors > 0) {
|
|
var alertString = _("Form not submitted because of the following problem(s)");
|
|
alertString += "\n------------------------------------------------------------------------------------\n";
|
|
alertString += "\n- "+ total_errors + _(" mandatory fields empty (highlighted)");
|
|
alert(alertString);
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="acq_addorderiso2709" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
<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 %]">[% booksellername %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › Add orders from iso2709 file</div>
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
[% IF ( batch_details ) %]
|
|
<h1>Add orders from [% comments %]
|
|
([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
|
|
</h1>
|
|
<div>
|
|
<form action="[% scriptname %]" method="post" name="import_biblios">
|
|
<table>
|
|
<tr>
|
|
<th>Citation</th>
|
|
<th>Match?</th>
|
|
<th>Order</th>
|
|
</tr>
|
|
[% FOREACH biblio_lis IN biblio_list %]
|
|
<tr>
|
|
<td>
|
|
[% biblio_lis.citation %]
|
|
|
|
</td>
|
|
<td>[% biblio_lis.overlay_status %]</td>
|
|
<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]&breedingid=[% biblio_lis.import_record_id %]&import_batch_id=[% biblio_lis.import_batch_id %]&biblionumber=[% biblio_lis.match_biblionumber %]">Add order</a></td>
|
|
</tr>
|
|
[% IF ( biblio_lis.match_biblionumber ) %]
|
|
<tr>
|
|
<td class="highlight" colspan="3"> Matches biblio [% biblio_lis.match_biblionumber %] (score = [% biblio_lis.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_lis.match_biblionumber %]">[% biblio_lis.match_citation %]</a></td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
</table>
|
|
</form>
|
|
</div>
|
|
[% IF ( pages ) %]
|
|
<div class="pages">
|
|
Page
|
|
[% FOREACH page IN pages %]
|
|
[% IF ( page.current_page ) %]
|
|
<span class="current">[% page.page_number %]</span>
|
|
[% ELSE %]
|
|
<a class="nav" href="[% page.script_name %]?import_batch_id=[% page.import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div>
|
|
<h1>Choose the file to add to the basket</h1>
|
|
<table id="files">
|
|
<thead>
|
|
<tr>
|
|
<th>File name</th>
|
|
<th>Comments</th>
|
|
<th>Status</th>
|
|
<th>Staged</th>
|
|
<th># Bibs</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH batch_lis IN batch_list %]
|
|
<tr>
|
|
<td>[% batch_lis.file_name %]</td>
|
|
<td>[% batch_lis.comments %]</td>
|
|
<td>[% batch_lis.import_status %]</td>
|
|
<td><span title="[% batch_lis.staged_date %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
|
|
<td>[% batch_lis.num_biblios %]</td>
|
|
<td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]">Add orders</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
[% IF ( import_batch_id ) %]
|
|
<div class="yui-b">
|
|
<h2>Import all</h2>
|
|
<p>Import all the lines in the basket with the following parameters:</p>
|
|
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
|
|
<input type="hidden" name="op" value="import_records"/>
|
|
<input type="hidden" name="ordernumber" value="[% ordernumber %]" />
|
|
<input type="hidden" name="basketno" value="[% basketno %]" />
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
|
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
|
|
|
|
[% FOREACH loop_currencie IN loop_currencies %]
|
|
<input type="hidden" name="[% loop_currencie.currency %]" value="[% loop_currencie.rate %]" />
|
|
[% END %]
|
|
|
|
[% IF ( items ) %]
|
|
<fieldset class="rows">
|
|
<legend>Item</legend>
|
|
[% IF ( NoACQframework ) %]
|
|
<div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
|
|
[% END %]
|
|
|
|
[% FOREACH item IN items %]
|
|
<div id="outeritemblock">
|
|
<div id="itemblock">
|
|
<ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
|
|
<div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
|
|
[% IF (iteminformatio.mandatory) %]
|
|
<label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
|
|
[% ELSE %]
|
|
<label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
|
|
[% END %]
|
|
[% iteminformatio.marc_value %]
|
|
<input type="hidden" name="itemid" value="1" />
|
|
<input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
|
|
<input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
|
|
<input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
|
|
<input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
|
|
[% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
|
|
</div></li>
|
|
[% END %]
|
|
</ol>
|
|
</div><!-- /iteminformation -->
|
|
</div>
|
|
|
|
[% END %] <!-- /items -->
|
|
</fieldset>
|
|
[% END %] <!-- items -->
|
|
<fieldset class="rows">
|
|
<legend>Accounting details</legend>
|
|
<ol>
|
|
<li>
|
|
<!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
|
|
<input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
|
|
</li>
|
|
<li>
|
|
[% IF ( close ) %]
|
|
<span class="label">Budget: </span>
|
|
<input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
|
|
[% ELSE %]
|
|
<li>
|
|
<label for="currency">Currency:</label>
|
|
<select name="currency" id="currency">
|
|
[% FOREACH loop_currencie IN loop_currencies %]
|
|
[% IF ( loop_currencie.selected ) %]<option value="[% loop_currencie.currcode %]" selected="selected">[% loop_currencie.currcode %]</option>[% ELSE %]<option value="[% loop_currencie.currcode %]">[% loop_currencie.currcode %]</option>[% END %][% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="budget_id">Budget: </label>
|
|
<select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
|
|
[% FOREACH budget_loo IN budget_loop %]
|
|
[% IF ( budget_loo.b_sel ) %]
|
|
<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
|
|
[% ELSE %]
|
|
<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="notes">Notes: </label>
|
|
<textarea id="notes" cols="30" rows="3" name="notes"></textarea>
|
|
</li>
|
|
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
|
|
<label for="sort1">Planning value1: </label>
|
|
<span id="sort1_zone">
|
|
[% IF CGIsort1 %]
|
|
<select id="sort1" size="1" name="sort1">
|
|
[% FOREACH sort_opt IN CGIsort1 %]
|
|
[% IF sort_opt.default %]
|
|
<option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
|
|
[% ELSE %]
|
|
<option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
<input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
|
|
[% END %]
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<label for="sort2">Planning value2: </label>
|
|
<span id="sort2_zone">
|
|
[% IF CGIsort2 %]
|
|
<select id="sort2" size="1" name="sort1">
|
|
[% FOREACH sort_opt IN CGIsort2 %]
|
|
[% IF sort_opt.default %]
|
|
<option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
|
|
[% ELSE %]
|
|
<option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
<input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
|
|
[% END %]
|
|
</span>
|
|
</li>
|
|
<li>
|
|
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|