Koha/koha-tmpl/intranet-tmpl/prog/en/serials/serials-edit.tmpl

326 lines
16 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="menus.inc" -->
<!--TMPL_INCLUDE NAME="menu-serials.inc" -->
<!--------------------------MAIN BODY OF PAGE-------------------------->
<h1>Serial Edition: <!-- TMPL_VAR name="bibliotitle" --></h1>
<form method="post" name="f" action="serials-edit.pl" >
<!--onsubmit="return barcode_check()">-->
<div id="action">
<input type="submit" value="Save" class="button" accesskey="w" /> <!--onClick="Check(this.form)" -->
<a href="serials-collection.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="serial Collection for <!--TMPL_VAR Name="bibliotitle"-->">Serial collection</a>
<!--TMPL_LOOP Name="subscriptions"-->
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="detail of the subscription">Subscription #<!-- TMPL_VAR name="subscriptionid" --></a>
<!--/TMPL_LOOP-->
<!-- <a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button" title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->">Search All Subscriptions</a> -->
<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Show Biblio</a>
</div>
<!--TMPL_IF Name="barcode_not_unique" -->
Error : Barcode Not Unique For serialseq <!--TMPL_VAR Name="errserialseq"-->
<!--/TMPL_IF -->
<input type="hidden" name="op" value="serialchangestatus">
<table cellspacing="0" cellpadding="0" border="0" class="collapse">
<tr>
<th>
Numbered
</th>
<th>
Published on
</th>
<th>
planned for
</th>
<th>
Status
</th>
<th>
Notes
</th>
</tr>
<!-- TMPL_LOOP name="serialslist" -->
<tr>
<td>
<input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
<input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
Issue <input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size="20" maxlength="100">
</td>
<td>
<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=10 maxlength=15>
</td>
<td>
<input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
</td>
<td>
<!--TMPL_IF Name="subscriptionexpired"-->
<select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" disabled >
<!--TMPL_ELSE-->
<select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" OnChange="javascript:if (this.value==2){unHideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" >
<!--/TMPL_IF-->
<!--TMPL_IF name="status1" -->
<option value="1" selected>Waited</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status2" -->
<option value="2" selected>Arrived</option>
<!--TMPL_ELSE -->
<option value="2">Arrived</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status3" -->
<option value="3" selected>Late</option>
<!-- TMPL_ELSE -->
<option value="3">Late</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status4" -->
<option value="4" selected>Missing</option>
<!-- TMPL_ELSE -->
<option value="4">Missing</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status7" -->
<option value="7" selected>Claimed</option>
<!-- TMPL_ELSE -->
<option value="7">Claimed</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status5" -->
<option value="5" selected>Not Available</option>
<!-- TMPL_ELSE -->
<option value="5">Not Available</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status6" -->
<option value="6" selected>Delete</option>
<!-- TMPL_ELSE -->
<option value="6">Delete</option>
<!-- /TMPL_IF -->
</select>
</td>
<td>
<input type="text" name="notes" value="<!-- TMPL_VAR name="sernotes" -->" size=20 maxlength=255>
</td>
</tr>
<!--TMPL_UNLESS Name="subscriptionexpired"-->
<!--TMPL_IF Name="serialsadditems"-->
<tr>
<td colspan="5">
<a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: se-resize;" onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
Items </a>
<fieldset style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
<legend><a style="cursor: se-resize;" onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
Items</a>
</legend>
<div id="cataloguing_additem_itemlist">
<!-- TMPL_LOOP NAME="items" -->
<div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
<!-- TMPL_LOOP NAME="iteminformation" -->
<p>
<div id="subfield<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" --><!-- TMPL_VAR NAME="countsubfield" -->" class="subfield"> <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
<!-- TMPL_VAR NAME="marc_value" -->
<input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
<input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
</div>
</p>
<!-- /tmpl_loop -->
<input type="hidden" name="moditem" value="" />
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
<input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
<input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
</div>
<!--/TMPL_LOOP-->
</div>
</fieldset>
</td>
</tr>
<!-- /TMPL_IF -->
<!--/TMPL_UNLESS -->
<!-- /TMPL_LOOP -->
<!-- TMPL_LOOP name="newserialloop" -->
<!--TMPL_UNLESS Name="subscriptionexpired"-->
<tr>
<td>
<input type="hidden" name="serialid" value="NEW" />
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
<input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
<b>Subs. <!-- TMPL_VAR name="subscriptionid" --></b> New Issue <input type="text" name="serialseq" value="" size="20" maxlength="100" OnChange="javascript:if (this.value!=''){unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')} else {HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}"/>
</td>
<td>
<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=10 maxlength=15>
</td>
<td>
<input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
</td>
<td>
<select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" >
<!--TMPL_IF name="status1" -->
<option value="1" selected>Waited</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status2" -->
<option value="2" selected>Arrived</option>
<!--TMPL_ELSE -->
<option value="2">Arrived</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status3" -->
<option value="3" selected>Late</option>
<!-- TMPL_ELSE -->
<option value="3">Late</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status4" -->
<option value="4" selected>Missing</option>
<!-- TMPL_ELSE -->
<option value="4">Missing</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status7" -->
<option value="7" selected>Claimed</option>
<!-- TMPL_ELSE -->
<option value="7">Claimed</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status5" -->
<option value="5" selected>Not Available</option>
<!-- TMPL_ELSE -->
<option value="5">Not Available</option>
<!-- /TMPL_IF -->
<!--TMPL_IF name="status6" -->
<option value="6" selected>Delete</option>
<!-- TMPL_ELSE -->
<option value="6">Delete</option>
<!-- /TMPL_IF -->
</select>
</td>
<td>
<input type="text" name="notes" value="" size=20 maxlength=255>
</td>
</tr>
<!--TMPL_IF Name="serialsadditems"-->
<tr>
<td colspan="5">
<a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: se-resize;" onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
Item</a>
<fieldset style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
<legend><a style="cursor: se-resize;" onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
Item</a>
</legend>
<div id="cataloguing_additem_itemlist">
<div id="item<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" -->" class="items">
<!-- TMPL_LOOP NAME="iteminformation" -->
<p>
<div id="subfield<!-- TMPL_VAR NAME="serialid" --><!-- TMPL_VAR NAME="countitems" --><!-- TMPL_VAR NAME="countsubfield" -->" class="subfield"> <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
<!-- TMPL_VAR NAME="marc_value" -->
<input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
<input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
</div>
</p>
<!-- /tmpl_loop -->
<input type="hidden" name="moditem" value="" />
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
<input type="hidden" name="serial" value="<!-- TMPL_VAR NAME="serialid" -->" />
<input type="hidden" name="bibnum" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemid" value="<!-- TMPL_VAR NAME="itemid" -->" />
<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
</div>
</div>
</fieldset>
</td>
</tr>
<!-- /TMPL_IF -->
<!--/TMPL_UNLESS -->
<!-- /TMPL_LOOP -->
</table>
</div>
</form>
<script language="JavaScript" type="text/javascript">
function popup(subscriptionid) {
window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
}
function barcode_check(){
<!-- TMPL_IF NAME="count" -->
var count = <!-- TMPL_VAR NAME="count" -->;
for(var i=1;i<=count;i++){
var barcodenum = "barcode"+i;
var statusnum = "status"+i;
var elembarcode = "document.getElementById('"+barcodenum+"')";
var elemstatus = "document.getElementById('"+statusnum+"')";
// alert(elembarcode+"\n"+eval(elembarcode+".value));
// alert(elemstatus+"\n"+eval(elemstatus+".value"));
if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
if (answer){
document.f.submit();
} else {
return false;
}
}
if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
var answer = confirm("A barcode was not entered.\nDo you want to put in a barcode\nor do you want to use a system generated barcode?");
if (answer){
document.f.submit();
} else {
return false;
}
}
}
<!--/TMPL_IF-->
}
function _(s) { return s } // dummy function for gettext
function Check(f) {
var total_errors=0;
// alert(f.field_value.length);
for (i=0 ; i<f.field_value.length ; i++) {
// alert (f.field_value[i].value);
if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
document.getElementById("error"+i).style.backgroundColor="#FF0000";
total_errors++;
} else {
// document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
}
}
var alertString2;
if (total_errors==0) {
document.f.submit();
} else {
alertString2 = _("Form not submitted because of the following problem(s)");
alertString2 += "\n------------------------------------------------------------------------------------\n";
alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
alert(alertString2);
}
}
<!--TMPL_IF Name="serialsadditems"-->
function unHideItems(index,labelindex) {
subfield = document.getElementById(index);
subfield.style.display = 'block';
label = document.getElementById(labelindex);
label.style.display='none';
}
function HideItems(index,labelindex) {
subfield = document.getElementById(index);
subfield.style.display = 'none';
label = document.getElementById(labelindex);
label.style.display='block';
}
<!--/TMPL_IF>
</script>
<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->