1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Serials › <!-- TMPL_IF name="mod" --> Modify subscription to <!-- TMPL_VAR name="bibliotitle" --><!-- TMPL_ELSE -->New subscription<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
6 <script type="text/javascript">
9 // the english words used in display purposes
10 var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern"),
11 _("Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
12 var weekno_label = _("Week # ");
14 var is_hemisphere = 1;
15 var irregular_issues; // will hold irregularity object.
17 function formatDate(myDate) {
18 var d = new Array( myDate.getFullYear(), myDate.getMonth() + 1 ,myDate.getDate());
19 if(d[1].toString().length == 1) { d[1] = '0'+d[1] };
20 if(d[2].toString().length == 1) { d[2] = '0'+d[2] };
21 <!-- TMPL_IF NAME="dateformat_us" -->
22 return(d[1] + '/' + d[2] + '/' + d[0]) ;
23 <!-- TMPL_ELSIF NAME="dateformat_metric" -->
24 return(d[2] + '/' + d[1] + '/' + d[0]) ;
26 return(''+d[0] + '-' + d[1] + '-' + d[2]) ;
30 Date.prototype.addDays = function(days) {
31 this.setDate(this.getDate()+days);
34 function getWeeksArray(startDate,periodicity) {
35 // returns an array of syspref-formatted dates starting at the first day of startDate's year.
36 // This prediction method will not accurately predict irregularites beyond the first year.
37 // FIXME : Should replace with ajax query to get the first Monday of the year so that week numbers have correct dates.
39 if(periodicity==3) { // 1/2 wks
41 } else if(periodicity == 4) { // 1/3 wks
44 var weeksArray = new Array;
46 startDate.setMonth(0);
47 for(var i=0;i<52;i++) {
48 weeksArray[i] = formatDate(startDate) + ' ' + weekno_label + (i + 1);
49 startDate.addDays( 7 );
54 function YMDaToYWDa(S) {
55 with (new Date(Date.UTC(S[0], S[1] - 1, S[2]))) {
56 var DoW = getUTCDay();
57 setUTCDate(getUTCDate() - (DoW + 6) % 7 + 3);
60 var WN = Math.round((ms - valueOf()) / 604800000) + 1;
61 return [getUTCFullYear(), WN, DoW == 0 ? 7 : DoW];
64 function dayofyear(d) { // d is a Date object
65 var yn = d.getFullYear();
66 var mn = d.getMonth();
68 var d1 = new Date(yn,0,1,12,0,0); // noon on Jan. 1
69 var d2 = new Date(yn,mn,dn,12,0,0); // noon on input date
70 var ddiff = Math.round((d2-d1)/864e5);
75 // create irregularity object.
76 function IrregularPattern() {
77 this.months = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
78 this.seasons = new Array(_("Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"));
79 this.daynames = new Array(_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday"));
80 // create weeks irregularity selection array:
81 this.firstissue = new Date();
82 this.firstissue.setDate(1);
83 this.firstissue.setMonth(0);
84 <!-- TMPL_IF NAME='firstacquiyear' --> // it's a mod, we already have a start date.
85 this.firstissue.setFullYear( <!-- TMPL_VAR NAME="firstacquiyear" --> );
87 this.weeks = getWeeksArray(this.firstissue);
91 var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
92 this.skipped = irregular.split(',');
95 IrregularPattern.prototype.update = function() {
96 this.skipped= new Array;
98 // daily periodicity, we interpret irregular array as which days of week to skip.
99 // else if weekly periodicity, week numbers (starting from 01 Jan) to skip.
100 // else irregular array is list of issues to skip
101 var summary_str = '';
103 if(document.f.irregularity_select) {
104 for( var i in document.f.irregularity_select.options ) {
105 if( document.f.irregularity_select.options[i].selected ) {
106 this.skipped[cnt] = document.f.irregularity_select.options[i].value ;
107 summary_str += document.f.irregularity_select.options[i].text + "\n" ;
112 var summary = document.getElementById("irregularity_summary");
114 summary.value = summary_str;
115 summary.rows= ( cnt > 6 ) ? cnt : 6 ; // textarea will bre resized, but not more than 6 lines will show.
120 IrregularPattern.prototype.irregular = function(index) {
121 for( var i in this.skipped) {
122 if( this.skipped[i] == index) {
129 function init_pattern() {
130 irregular_issues = new IrregularPattern();
132 function reset_pattern() {
133 document.getElementById("numberpattern").value = '';
134 document.getElementById("irregularity").innerHTML = '';
139 // common pre defined number patterns
140 function reset_num_pattern() {
141 var patternchoice = document.getElementById("numberpattern").value;
142 switch(patternchoice){
144 document.f.add1.value=1;
145 document.f.add2.value=1;
146 document.f.add3.value=1;
147 document.f.every1.value=12;
148 document.f.every2.value=1;
149 document.f.every3.value=1;
150 document.f.whenmorethan1.value=9999999;
151 document.f.whenmorethan2.value=12;
152 document.f.whenmorethan3.value=4;
153 document.f.setto1.value=0;
154 document.f.setto2.value=1;
155 document.f.setto3.value=1;
156 document.f.lastvalue1.value=1;
157 document.f.lastvalue2.value=1;
158 document.f.lastvalue3.value=1;
159 document.f.numberingmethod.value=_("Vol {X}, No {Y}, Issue {Z}");
160 moreoptions(text[1],text[0],text[2]);
161 display_table(0); // toggle info box on (1) or off (0)
164 document.f.add1.value=1;
165 document.f.add2.value=1;
166 document.f.add3.value='';
167 document.f.every1.value=12;
168 document.f.every2.value=1;
169 document.f.every3.value='';
170 document.f.whenmorethan1.value=9999999;
171 document.f.whenmorethan2.value=12;
172 document.f.whenmorethan3.value='';
173 document.f.setto1.value=0;
174 document.f.setto2.value=1;
175 document.f.setto3.value='';
176 document.f.lastvalue1.value=1;
177 document.f.lastvalue2.value=1;
178 document.f.lastvalue3.value='';
179 document.f.numberingmethod.value=_("Vol {X}, No {Y}");
180 moreoptions(text[1],text[0]);
184 document.f.add1.value=1;
185 document.f.add2.value=1;
186 document.f.add3.value='';
187 document.f.every1.value=12;
188 document.f.every2.value=1;
189 document.f.every3.value='';
190 document.f.whenmorethan1.value=9999999;
191 document.f.whenmorethan2.value=12;
192 document.f.whenmorethan3.value='';
193 document.f.setto1.value=0;
194 document.f.setto2.value=1;
195 document.f.setto3.value='';
196 document.f.lastvalue1.value=1;
197 document.f.lastvalue2.value=1;
198 document.f.lastvalue3.value='';
199 document.f.numberingmethod.value=_("Vol {X}, Issue {Y}");
200 moreoptions(text[1],text[2]);
204 // var d = new Date(document.f.firstacquidate.value);
205 // var smonth = d.getMonth();
206 document.f.add1.value=1;
207 document.f.add2.value=1;
208 document.f.add3.value='';
209 document.f.every1.value=12;
210 document.f.every2.value=1;
211 document.f.every3.value='';
212 document.f.whenmorethan1.value=9999999;
213 document.f.whenmorethan2.value=12;
214 document.f.whenmorethan3.value='';
215 document.f.setto1.value=0;
216 document.f.setto2.value=1;
217 document.f.setto3.value='';
218 document.f.numberingmethod.value=_("No {X}, Issue {Y}");
219 moreoptions(text[0],text[2]);
223 var d = new Date(document.f.firstacquidate.value);
224 var sYear = d.getFullYear();
225 moreoptions_seasons(text[15],sYear);
226 var d = new Date(document.f.firstacquidate.value);
227 var sYear = d.getFullYear();
228 document.f.add1.value=1;
229 document.f.add2.value='1';
230 document.f.add3.value='';
231 document.f.every1.value=4;
232 document.f.every2.value='1';
233 document.f.every3.value='';
234 document.f.whenmorethan1.value=9999999;
235 document.f.whenmorethan2.value='4';
236 document.f.whenmorethan3.value='';
237 document.f.setto1.value=0;
238 document.f.setto2.value='1';
239 document.f.setto3.value='';
240 document.f.periodicity.value='8';
241 document.f.numberingmethod.value=_("{Y} {X}");
242 moreoptions_seasons(text[15],sYear);
243 document.f.lastvalue1temp.value=document.f.lastvalue1.value=sYear;
249 document.getElementById("more_options").innerHTML = '';
250 document.f.irreg_check.value=1;
252 case "8": // Year/Number
253 var d = (document.f.firstacquidate.value) ? new Date( document.f.firstacquidate.value) : new Date() ;
254 var sYear = d.getFullYear();
255 document.f.add1.value=1;
256 document.f.add2.value=1;
257 document.f.add3.value='';
258 document.f.every1.value=12;
259 document.f.every2.value=1;
260 document.f.every3.value='';
261 document.f.whenmorethan1.value=9999999;
262 document.f.whenmorethan2.value=12;
263 document.f.whenmorethan3.value='';
264 document.f.setto1.value=0;
265 document.f.setto2.value=1;
266 document.f.setto3.value='';
267 document.f.lastvalue1.value=sYear;
268 switch (document.f.periodicity.value){
270 var doy = dayofyear(d);
271 document.f.lastvalue2.value=doy;
272 document.f.whenmorethan2.value=365;
275 var doy = dayofyear(d);
276 document.f.lastvalue2.value=doy*2;
277 document.f.whenmorethan2.value=730;
282 var YWDa = YMDaToYWDa(d);
283 document.f.lastvalue2.value=YWDA[1]/(document.f.periodicity.value-1);
286 var smonth = d.getMonth();
287 document.f.lastvalue2.value=smonth;
290 var smonth = d.getMonth();
291 document.f.lastvalue2.value=smonth/2;
292 document.f.whenmorethan2.value=6;
296 var smonth = d.getMonth();
297 document.f.lastvalue2.value=smonth/3;
298 document.f.whenmorethan2.value=4;
301 var smonth = d.getMonth();
302 document.f.lastvalue2.value=smonth/6;
303 document.f.whenmorethan2.value=2;
307 document.f.lastvalue3.value='';
308 document.f.numberingmethod.value=_("{X} / {Y}");
309 moreoptions(text[16],text[0]);
310 // document.f.lastvalue1temp.value=sYear;
311 // document.f.lastvalue2temp.value=document.f.lastvalue2.value;
315 document.f.add1.value=1;
316 document.f.add2.value='';
317 document.f.add3.value='';
318 document.f.every1.value=1;
319 document.f.every2.value='';
320 document.f.every3.value='';
321 document.f.whenmorethan1.value=9999999;
322 document.f.whenmorethan2.value='';
323 document.f.whenmorethan3.value='';
324 document.f.setto1.value=0;
325 document.f.setto2.value='';
326 document.f.setto3.value='';
327 document.f.lastvalue1.value=1;
328 document.f.lastvalue2.value='';
329 document.f.lastvalue3.value='';
330 document.f.numberingmethod.value='{X}';
331 // moreoptions_daily_check(text[0]);
332 moreoptions(text[0]);
333 document.f.irreg_check.value=1;
339 function display_table(n) {
341 document.getElementById("basetable").style.display = 'block';
343 document.getElementById("basetable").style.display = 'none';
345 var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ;
346 document.getElementById("basetable").style.display = disp_val;
350 function set_num_pattern_from_template_vars() {
351 if(!document.getElementById("numberpattern")){ return false; }
352 document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
355 document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
356 document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
357 document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
358 document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
359 document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
360 document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
361 document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
362 document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
363 document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
364 document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
365 document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
366 document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
367 document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
368 document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
369 document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
370 document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
374 <!-- TMPL_IF NAME="add2" -->
375 if(<!-- TMPL_VAR NAME="add2" --> > 0){
379 <!-- TMPL_IF NAME="add3" -->
380 if(<!-- TMPL_VAR NAME="add3" --> > 0){
384 document.f.lastvalue1temp.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
386 document.f.lastvalue2temp.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
387 document.f.whenmorethan2temp.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
390 document.f.lastvalue3temp.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
391 document.f.whenmorethan3temp.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
395 // a pre check with more options to see if 'number' and '1/day' are chosen
397 function moreoptions_daily_check(x) {
398 var periodicity = document.f.periodicity.value;
400 if(periodicity == 1){ // i.e. daily
401 document.getElementById("irregularity").innerHTML = '';
402 errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
403 for(var j=0;j<irregular_issues.daynames.length;j++){
404 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+irregular_issues.daynames[j]+" ";
406 var error = errortext;
408 document.getElementById("irregularity").innerHTML = error;
410 document.getElementById("irregularity").innerHTML = '';
411 document.getElementById("more_options").innerHTML = '';
418 // to dispaly the more options section
419 function moreoptions(x,y,z){
420 document.getElementById("irregularity").innerHTML = '';
421 document.getElementById("more_options").innerHTML = '';
423 // alert("X: "+x+"Y: "+y+"Z: "+z);
425 textbox +="<table id='irregularity_table'>\n<tr><th> <\/th><th>"+x+"<\/th>";
427 textbox +="<th>"+y+"<\/th>";
429 textbox +="<th>"+z+"<\/th>";
432 textbox +="<\/tr>\n";
433 textbox +="<tr><th scope=\"row\">"+text[5]+"<\/td><td><input type='text' name='lastvalue1temp' id='lastvalue1temp' size='4' onkeyup='moreoptionsupdate(this)' value=\"" + document.f.lastvalue1.value + "\" /><\/td>\n";
435 textbox +="<td><input type='text' name='lastvalue2temp' id='lastvalue2temp' size='4' onkeyup='moreoptionsupdate(this)' value=\"" + document.f.lastvalue2.value + "\" /><\/td>\n";
437 textbox +="<td><input type='text' name='lastvalue3temp' id='lastvalue3temp' size='4' onkeyup='moreoptionsupdate(this)' value=\"" + document.f.lastvalue3.value + "\" /><\/td>\n";
440 textbox +="<\/tr>\n";
442 textbox +="<tr><th scope=\"row\">"+text[6]+"<\/th>";
443 textbox +="<td> <\/td>\n";
444 textbox +="<td><input type='text' name='whenmorethan2temp' id='whenmorethan2temp' size='4' onkeyup='moreoptionsupdate(this,1)'><\/td>\n";
446 textbox +="<td><input type='text' name='whenmorethan3temp' id='whenmorethan3temp' size='4' onkeyup='moreoptionsupdate(this,1)'><\/td>\n";
450 textbox +="<tr> <td>"+_("issues expected")+"</td><td><input type='text' name='issuesexpected1temp' id='issuesexpected1temp' size='4' onkeyup='moreoptionsupdate(this,0)' value=\"" + document.f.issuesexpected1.value + "\" ></td></tr>";
452 textbox +="<\/table>\n";
454 document.getElementById("more_options").innerHTML = textbox;
457 function hemispheres(chosen){
458 var selbox = document.getElementById("season1");
460 var selboxselected = selbox.options[selbox.selectedIndex].value;
461 selbox.options.length = 0;
463 if ( (chosen == "1") || ( ! (chosen) && is_hemisphere == 1 )) {
464 selbox.options[selbox.options.length] = new Option(text[11],'1');
465 selbox.options[selbox.options.length] = new Option(text[12],'2');
466 selbox.options[selbox.options.length] = new Option(text[13],'3');
467 selbox.options[selbox.options.length] = new Option(text[14],'4');
469 selbox.options[selboxselected-1].selected = true;
472 if ( (chosen == "2") || ( ! (chosen) && is_hemisphere == 2 )) {
473 selbox.options[selbox.options.length] = new Option(text[13],'1');
474 selbox.options[selbox.options.length] = new Option(text[10],'2');
475 selbox.options[selbox.options.length] = new Option(text[11],'3');
476 selbox.options[selbox.options.length] = new Option(text[12],'4');
478 selbox.options[selboxselected-1].selected = true;
483 // to display the more options section for seasons
484 function moreoptions_seasons(x,y){
485 // x = 'Season'. y = 'Year'.
486 document.getElementById("irregularity").innerHTML = '';
487 document.getElementById("more_options").innerHTML = '';
489 //alert("X: "+x+"Year: "+y);
491 var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
492 textbox +="<li><label for=\"hemisphere\">"+ text[7] +"<\/label><select name='hemisphere' id=\"hemisphere\" onchange='hemispheres(this.options[this.selectedIndex].value)'>";
493 for(var i = 1; i <= 2; i++){
494 textbox +="<option value='"+i+"'";
495 if(i == hemi_select){
496 textbox += " selected "
498 textbox +=">"+text[i+7]+"<\/option>";
500 textbox +="<\/li>\n";
501 textbox +="<table id='seasonal_irregularity'><tr><th> <\/th><th>"+x+"<\/th>";
502 textbox +="<th>"+text[16]+"<\/th>";
503 textbox +="<\/tr>\n";
504 textbox +="<tr><th scope=\"row\">"+text[5]+"<\/th><td><select name='lastvalue2temp' id='lastvalue2temp' id='season1' onchange='moreoptionsupdate(this)'>";
505 for(var j = 1; j <= 4; j++){
506 textbox +="<option value='"+j+"'>"+text[j+9]+"<\/option>";
508 textbox +="<\/select><\/td>";
509 var isyr = irregular_issues.firstissue;
510 textbox += "<td>" + irregular_issues.firstissue.getFullYear() + "<\/td><\/tr>\n";
511 textbox +="<tr><th scope=\"row\">"+text[6]+"<\/th>";
512 textbox +="<td><input type='text' name='whenmorethan2temp' id='whenmorethan2temp' size='4' onkeyup='moreoptionsupdate(this,1)'><\/td>\n";
513 textbox +="<\/tr><\/table>\n";
516 document.getElementById("more_options").innerHTML = textbox;
519 function irregularity_check(){
520 document.f.irreg_check.value = 1; // Irregularity button now pushed
521 var periodicity = document.f.periodicity.value;
522 var rollover = document.f.issuesexpected1.value;
523 if( (document.f.whenmorethan2) && ( document.f.whenmorethan2.value > 0) ){
524 rollover = document.f.whenmorethan2.value;
526 if((document.f.whenmorethan3) && document.f.whenmorethan3.value > 0 ){
527 // FIXME: Irregularity check assumes that the full prediction pattern repeats each year.
528 // In cases where the outermost periodicity is > 1 year,
529 // e.g. where a volume spans two years, the irregularity check will be incorrect,
530 // but you can safely ignore the check, submit the form, and the prediction pattern should be correct.
531 // a way to distinguish between these two cases is needed.
532 rollover = document.f.whenmorethan3.value * document.f.whenmorethan2.value;
537 var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
540 if(rollover < 730) expected =730;
547 if(rollover < 365) expected =365;
554 if(rollover < 52) expected =52;
561 if(rollover < 26) expected =26;
568 if(rollover < 17) expected =17;
575 if(rollover < 12) expected =12;
582 if(rollover < 6) expected =6;
589 if(rollover < 4) expected =4;
596 if(rollover < 4) expected =4;
603 if(rollover < 2) expected =2;
610 if(rollover < 1) expected =1;
620 if(expected == 365 || expected==730){ // what about leap years ?
621 // FIXME: We interpret irregularity as which days per week for periodicity==1.
622 // We need two cases: one in which we're published n days/week, in which case irregularity should be per week,
623 // and a regular daily pub, where irregularity should be per year.
624 errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
626 errortext +=expected+_(" issues expected, ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
627 irregular_issues.numskipped = expected - rollover;
629 errortext +="<select multiple id='irregularity_select' name='irregularity_select' onchange='irregular_issues.update();'>\n";
630 errortext +=irregular_options(periodicity);
631 errortext += "</select>\n <textarea rows='6' width='18' id='irregularity_summary' name='irregularity_summary' value='foo' />";
635 errortext +=expectedover+_(" issues expected, ")+rollover+_(" were entered.<p class='warning'> You seem to have indicated more issues per year than expected.</p>");
638 if(error.length ==0){
639 error=_("No irregularities noticed");
641 display_example(expected);
642 document.getElementById("irregularity").innerHTML = error;
643 irregular_issues.update();
646 function irregular_options(periodicity){
650 if(periodicity == 1) {
652 titles = irregular_issues.daynames;
655 if(periodicity == 2 || periodicity == 3 || periodicity == 4) {
656 titles = irregular_issues.weeks;
658 if(periodicity==3) { // 1/2 wks
660 } else if(periodicity == 4) { // 1/3 wks
666 if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
667 if(periodicity == 8 && numberpattern==8) {
668 is_season = 1; // setting up from edit page
671 titles = irregular_issues.seasons;
673 if(is_hemisphere == 2){
679 titles = irregular_issues.months;
685 return ''; // don't know how to deal with irregularity.
687 for(var j=0;j<expected;j++){ // rch - changed frrom (1..expected).
690 count = count-expected;
692 if(is_season && is_hemisphere == 1){
693 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
694 // alert("value: "+((count*3)-2)+" title: "+titles[j]);
695 } else if(is_season && is_hemisphere == 2){
696 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
697 // alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
698 } else { // all non-seasonal periodicities:
699 var incr=1; // multiplier for ( 1/n weeks) patterns; in this case the irreg calc relies on the week# , not the issue#.
700 if(periodicity==3) { // 1/2 wks
702 } else if(periodicity == 4) { // 1/3 wks
705 errortext += "<option value='" + (1+j*incr) ;
706 if(irregular_issues.irregular(1+incr*j)) {
707 errortext += "' selected='selected" ;
709 errortext += "'>"+titles[incr*j]+"<\/option>\n";
713 errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
720 function display_example(expected){
721 var startfrom1 = parseInt(document.f.lastvalue1.value);
722 var startfrom2 = parseInt(document.f.lastvalue2.value);
723 var startfrom3 = parseInt(document.f.lastvalue3.value);
724 var every1 = parseInt(document.f.every1.value);
725 var every2 = parseInt(document.f.every2.value);
726 var every3 = parseInt(document.f.every3.value);
727 var numberpattern = document.f.numberingmethod.value;
728 var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
729 var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
730 var setto2 = parseInt(document.f.setto2.value);
731 var setto3 = parseInt(document.f.setto3.value);
732 var displaytext = _("Based on the information entered, the Numbering Pattern will look like this: <br \/><ul class=\"numpattern_preview\">");
734 var count=startfrom3-1;
735 var count2=startfrom2;
736 for(var i = 0 ; i < 12; i++){
737 if(count>=whenmorethan3){
739 if(count2>=whenmorethan2){
748 displaytext += '<li>' + numberpattern.replace(/{Z}/,count) + '</li>\n';
749 displaytext = displaytext.replace(/{Y}/,count2);
750 displaytext = displaytext.replace(/{X}/,startfrom1);
754 if(startfrom2>0 && !startfrom3){
755 var count=startfrom2-1;
756 for(var i=0;i<12;i++){
757 if(count>=whenmorethan2){
765 if(is_hemisphere == 2){
767 displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
769 displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
772 displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
775 displaytext += numberpattern.replace(/{Y}/,count)+'\n';
777 displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
780 if(startfrom1>0 && !startfrom2 && !startfrom3){
781 var offset=eval(document.f.issuesexpected1.value);
785 for(var i=startfrom1;i<(startfrom1+offset);i+=every1){
786 displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n';
789 // displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
790 document.getElementById("displayexample").innerHTML = displaytext;
793 function isArray(obj) {
794 if (obj.constructor.toString().indexOf("Array") == -1)
800 function moreoptionsupdate(inputfield,rollover){
801 fieldname = inputfield.name;
802 // find parent element in base table by stripping 'temp' from element name.
803 basefield = document.getElementById(fieldname.slice(0,-4));
804 var fieldnumber = fieldname.slice(-5,-4);
806 // fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
807 // eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
808 basefield.value = inputfield.value;
809 var patternchoice = document.getElementById("numberpattern").value;
810 switch(patternchoice){
814 case "8": // Year, Number. -- Why not just use Vol, Number withvol==year??
815 if (document.f.lastvalue2temp.value>0){document.f.innerloop1.value = document.f.lastvalue2temp.value - 1;}
819 // eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
820 // calculate rollover for higher level of periodicity.
821 // FIXME: This calculation only works if addN = 1 , that is, the X,Y,and Z each only increment by zero or one on each issue.
823 // if there are two levels of periodicity, (e.g. vol{X},num{Y},issue{Z}, then every1=every2*whenmorethan2
824 // otherwise, every2 == 1.
825 var addN = (document.getElementById('add'+fieldnumber)) ? document.getElementById('add'+fieldnumber).value : 1 ;
826 var everyN = (document.getElementById('every'+fieldnumber)) ? document.getElementById('every'+fieldnumber).value : 1 ;
827 document.getElementById('every'+(fieldnumber-1)).value = basefield.value * everyN / addN ;
832 function check_input(e){
833 var unicode=e.charCode? e.charCode : e.keyCode
834 if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete
835 if (unicode<48||unicode>57) { // if not a number
836 alert(_("Needs to be entered in digit form -eg 10"));
837 return false // disable key press
842 function addbiblioPopup(biblionumber) {
843 var destination = "/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup";
844 if(biblionumber){ destination += "&biblionumber="+biblionumber; }
845 window.open(destination,'AddBiblioPopup','width=1024,height=768,toolbar=no,scrollbars=yes');
850 window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
853 function FindAcqui(f)
855 window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
858 function Find_ISSN(f)
860 window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
865 if (f.aqbooksellerid.value.length==0) {
866 input_box = confirm(_("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor"));
867 if (input_box==true) {
873 if (f.biblionumber.value.length==0) {
874 alert(_("You must choose or create a biblio"));
875 } else if(f.startdate.value.length != 0 && f.sublength.value > 0) {
876 if (f.irreg_check.value == 1) {
879 if(f.numbering_pattern.value == ''){
880 alert(_("Please choose a numbering pattern"));
882 alert(_("Please check for irregularity by clicking 'Test Prediction Pattern'"));
886 alert(_("You must choose a start date and a subscription length"));
888 if(irregular_issues.numskipped < irregular_issues.skipped.length ) {
889 alert(_("You have not accounted for all missing issues."));
894 $(document).ready(function() {
895 <!-- TMPL_IF name="mod" -->
896 set_num_pattern_from_template_vars();
897 <!-- TMPL_IF name="hemisphere" -->
898 is_hemisphere = <!-- TMPL_VAR NAME="hemisphere" --> ;
902 <!-- TMPL_IF name="irregularity" -->
903 irregularity_check();
906 $('#numberpattern').change( function() {
914 <!-- TMPL_INCLUDE NAME="header.inc" -->
915 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
917 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › <!-- TMPL_IF name="mod" --> Modify subscription for <span class="title"><!-- TMPL_VAR name="bibliotitle" --></span><!-- TMPL_ELSE -->New subscription<!-- /TMPL_IF --></div>
919 <div id="doc3" class="yui-t7">
923 <h1><!-- TMPL_IF name="mod" --> Modify subscription for <i><!-- TMPL_VAR name="bibliotitle" --></i><!-- TMPL_ELSE -->Add a new subscription<!-- /TMPL_IF --></h1>
924 <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
925 <!-- TMPL_IF name="mod" -->
926 <input type="hidden" name="op" value="modsubscription" />
927 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
929 <input type="hidden" name="op" value="addsubscription" />
931 <input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->" />
932 <input type="hidden" name="irreg_check" value="0" />
933 <input type="hidden" name="issuesexpected1" id="issuesexpected1" value="0" />
935 <div class="yui-u first">
936 <fieldset id="subscription_add_information" class="rows">
937 <legend>Subscription details</legend>
939 <li><span class="label">Subscription #</span> <!--TMPL_VAR name="subscriptionid"--></li>
941 <span class="label">Librarian: </span> <!-- TMPL_VAR name="loggedinusername" -->
944 <label for="aqbooksellerid">Vendor: </label>
945 <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="8" /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled="disabled" readonly="readonly" />) <div class="inputnote"><a href="#" onclick="FindAcqui(f)">Search for a vendor</a></div>
948 <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Biblio:</label>
950 <input type="text" name="biblionumber" id="biblionumber" value="<!-- TMPL_VAR name="bibnum" -->" size="8" />
951 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
952 <div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for Biblio</a> | <!--TMPL_IF Name="mod"--><a href="#" onclick="addbiblioPopup(<!-- TMPL_VAR NAME="bibnum" -->); return false;">Edit biblio</a><!-- TMPL_ELSE -->
953 <a href="#" onclick="addbiblioPopup(); return false;">Create Biblio</a><!--/TMPL_IF--></div>
957 <!-- TMPL_IF name="serialsadditems" -->
958 <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label for="serialsadditems-yes">create an item record when receiving this serial</label></p>
959 <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label for="serialsadditems-no">do not create an item record when receiving this serial </label></p>
961 <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label for="serialsadditems-yes">create an item record when receiving this serial</label></p>
962 <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label for="serialsadditems-no">do not create an item record when receiving this serial</label></p>
966 <label for="callnumber">Call Number:</label>
967 <input type="text" name="callnumber" id="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20" />
970 <label for="branchcode">Library:</label>
972 <select name="branchcode" id="branchcode" style="width: 20em;">
973 <!-- TMPL_UNLESS NAME="Independantbranches" --><option value="">None</option><!-- /TMPL_UNLESS -->
974 <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
976 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
979 </select> (select a library)
983 <label for="notes">Public note:</label>
984 <textarea name="notes" id="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea>
987 <label for="internalnotes">Nonpublic note:</label>
988 <textarea name="internalnotes" id="internalnotes" cols="30" rows="2"><!-- TMPL_VAR name="internalnotes" --></textarea>
991 <label for="letter">Patron notification: </label>
993 <!-- TMPL_IF NAME="letterloop" -->
994 <select name="letter" id="letter">
995 <option value="">None</option>
996 <!-- TMPL_LOOP name="letterloop" -->
997 <!-- TMPL_IF name="selected" -->
998 <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="lettername" --></option>
1000 <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="lettername" --></option>
1004 <div class="hint">Select a notice and patrons on the routing list will be notified when new issues are received.</div>
1006 <div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
1011 <div style="float:left;clear:left;margin:1em;"><strong>Note:</strong>
1014 <li>The subscription <strong>must</strong> be associated with a bibliographic record.</li>
1015 <li>You <strong>must</strong> select a vendor if you wish to generate claims.</li>
1023 <div id="subscription_form_planning">
1024 <fieldset class="rows">
1025 <legend>Serials planning</legend>
1028 <label for="firstacquidate"> First issue publication date:</label>
1029 <!-- TMPL_UNLESS NAME="mod" --><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" /><!-- /TMPL_UNLESS -->
1030 <input type="text" name="firstacquidate" value="<!-- TMPL_VAR name="firstacquidate" -->" size="13" maxlength="10" id="acqui_date" <!-- TMPL_IF NAME="mod" -->disabled="true"<!-- /TMPL_IF --> style="border-width: 0px;" />
1032 <!-- TMPL_IF NAME="mod" --><li><label for="nextacquidate"> Next issue publication date:</label>
1033 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
1034 <input type="text" name="nextacquidate" value="<!-- TMPL_VAR name="nextacquidate" -->" size="13" maxlength="10" id="next_acqui_date" style="border-width: 0px;" />
1035 </li><!-- /TMPL_IF -->
1036 <!-- both scripts for calendar must follow the input field -->
1037 <script type="text/javascript">
1039 inputField : "<!-- TMPL_IF NAME="mod" -->next_<!-- /TMPL_IF -->acqui_date",
1040 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1041 button : "<!-- TMPL_IF NAME="mod" -->next_<!-- /TMPL_IF -->acqui_button",
1043 onUpdate : function(cal) { irregular_issues.weeks = getWeeksArray(cal.date);
1044 irregular_issues.firstissue = cal.date;
1045 if(document.irregularity_summary) {
1046 irregular_issues.update();
1048 if(document.getElementById("seasonal_irregularity")) {
1049 moreoptions_seasons(text[15]);
1054 inputField : "<!-- TMPL_IF NAME="mod" -->next_<!-- /TMPL_IF -->acqui_date",
1055 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1056 button : "<!-- TMPL_IF NAME="mod" -->next_<!-- /TMPL_IF -->acqui_date",
1058 onUpdate : function(cal) { irregular_issues.weeks = getWeeksArray(cal.date);
1059 irregular_issues.firstissue = cal.date;
1060 if(document.irregularity_summary) {
1061 irregular_issues.update();
1063 if(document.getElementById("seasonal_irregularity")) {
1064 moreoptions_seasons(text[15]);
1070 <label for="periodicity" class="required">Frequency:</label>
1072 <select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();">
1073 <option value="" selected="selected">-- please choose --</option>
1074 <!-- TMPL_IF name="periodicity16" -->
1075 <option value="16" selected="selected">Without periodicity</option>
1077 <option value="16">Without periodicity</option>
1079 <!-- TMPL_IF name="periodicity48" -->
1080 <option value="48" selected="selected">Unknown</option>
1082 <option value="48">Unknown</option>
1084 <!-- TMPL_IF name="periodicity32" -->
1085 <option value="32" selected="selected">Irregular</option>
1087 <option value="32">Irregular</option>
1090 <!-- TMPL_IF name="periodicity12" -->
1091 <option value="12" selected="selected">2/day</option>
1093 <option value="12">2/day</option>
1095 <!-- TMPL_IF name="periodicity1" -->
1096 <option value="1" selected="selected">daily (n/week)</option>
1098 <option value="1">daily (n/week)</option>
1100 <!-- TMPL_IF name="periodicity2" -->
1101 <option value="2" selected="selected">1/week</option>
1103 <option value="2">1/week</option>
1105 <!-- TMPL_IF name="periodicity3" -->
1106 <option value="3" selected="selected">1/2 weeks </option>
1108 <option value="3">1/2 weeks </option>
1110 <!-- TMPL_IF name="periodicity4" -->
1111 <option value="4" selected="selected">1/3 weeks</option>
1113 <option value="4">1/3 weeks</option>
1115 <!-- TMPL_IF name="periodicity5" -->
1116 <option value="5" selected="selected">1/month</option>
1118 <option value="5">1/month</option>
1120 <!-- TMPL_IF name="periodicity6" -->
1121 <option value="6" selected="selected">1/2 months (6/year)</option>
1123 <option value="6">1/2 months (6/year)</option>
1125 <!-- TMPL_IF name="periodicity7" -->
1126 <option value="7" selected="selected">1/3 months (1/quarter)</option>
1128 <option value="7">1/3 months (1/quarter)</option>
1130 <!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
1131 <!-- TMPL_IF name="periodicity8" -->
1132 <option value="8" selected="selected">1/quarter (seasonal)</option>
1134 <option value="8">1/quarter (seasonal)</option>
1137 <!-- TMPL_IF name="periodicity9" -->
1138 <option value="9" selected="selected">2/years</option>
1140 <option value="9">2/year</option>
1142 <!-- TMPL_IF name="periodicity10" -->
1143 <option value="10" selected="selected">1/year</option>
1145 <option value="10">1/year</option>
1147 <!-- TMPL_IF name="periodicity11" -->
1148 <option value="11" selected="selected">1/2 years</option>
1150 <option value="11">1/2 years</option>
1152 </select> <span class="required">Required</span></li>
1153 <li><label for="manuallist"> Manual history:</label> <input type="checkbox" name="manualhist" id="manuallist" value="1" /></li>
1155 <label for="numberpattern"> Numbering pattern:</label>
1157 <select name="numbering_pattern" size="1" id="numberpattern" >
1158 <option value="" selected="selected">-- please choose --</option>
1159 <!-- TMPL_IF name="numberpattern1" -->
1160 <option value="1" selected="selected">Number</option>
1162 <option value="1">Number</option>
1164 <!-- TMPL_IF name="numberpattern2" -->
1165 <option value="2" selected="selected">Volume, Number, Issue</option>
1167 <option value="2">Volume, Number, Issue</option>
1169 <!-- TMPL_IF name="numberpattern3" -->
1170 <option value="3" selected="selected">Volume, Number</option>
1172 <option value="3">Volume, Number</option>
1174 <!-- TMPL_IF name="numberpattern4" -->
1175 <option value="4" selected="selected">Volume, Issue</option>
1177 <option value="4">Volume, Issue</option>
1179 <!-- TMPL_IF name="numberpattern5" -->
1180 <option value="5" selected="selected">Number, Issue</option>
1182 <option value="5">Number, Issue</option>
1184 <!-- TMPL_IF name="numberpattern6" -->
1185 <option value="6" selected="selected">Seasonal only</option>
1187 <option value="6">Seasonal only</option>
1189 <!-- TMPL_IF name="numberpattern8" -->
1190 <option value="8" selected="selected">Year/Number</option>
1192 <option value="8">Year/Number</option>
1194 <!-- TMPL_IF name="numberpattern7" -->
1195 <option value="7" selected="selected">None of the above</option>
1197 <option value="7">None of the above</option>
1201 <li id="more_options"></li>
1202 <li id="irregularity"></li>
1203 <li id="displayexample"></li>
1205 <label for="startdate" class="required"> Subscription start date:</label>
1207 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
1208 <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="beginning_date" style="border-width: 0px;" />
1209 <!-- both scripts for calendar must follow the input field -->
1210 <script type="text/javascript">
1212 inputField : "beginning_date",
1213 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1218 <script type="text/javascript">
1220 inputField : "beginning_date",
1221 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1222 button : "beginning_date",
1226 <span class="required">Required</span>
1229 <label for="subtype" class="required">Subscription length:</label>
1231 <select name="subtype" id="subtype">
1232 <!-- TMPL_LOOP NAME="subtype" -->
1233 <!-- TMPL_IF NAME="selected" -->
1234 <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
1236 <option value="<!-- TMPL_VAR NAME="name" -->">
1238 <!-- TMPL_VAR NAME="name" -->
1242 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (enter amount in numerals)
1243 <span class="required">Required</span>
1245 <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->" />
1250 <fieldset class="action">
1251 <input type="button" class="action_test" value="Test Prediction Pattern" onclick="javascript:irregularity_check()" />
1252 <input type="button" class="action_reset" value="Reset Pattern" onclick="javascript:reset_pattern()" />
1253 <input type="button" class="action_save" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
1255 <fieldset class="action">
1256 <input type="button" class="action_advanced" value="Show/Hide Advanced Pattern" onclick="javascript:display_table()" />
1258 <div id="basetable" style="display: none;">
1259 <table class="small">
1260 <tr><th colspan="4">Advanced Prediction Pattern</th></tr>
1270 <input type="text" name="add1" id="add1" value="<!-- TMPL_VAR name="add1" -->" />
1273 <input type="text" name="add2" id="add2" value="<!-- TMPL_VAR name="add2" -->" />
1276 <input type="text" name="add3" id="add3" value="<!-- TMPL_VAR name="add3" -->" />
1281 <td><input type="text" name="every1" id="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
1282 <td><input type="text" name="every2" id="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
1283 <td><input type="text" name="every3" id="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
1286 <td>When more than</td>
1287 <td><input type="text" name="whenmorethan1" id="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
1288 <td><input type="text" name="whenmorethan2" id="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
1289 <td><input type="text" name="whenmorethan3" id="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
1292 <td>inner counter</td>
1293 <td><input type="text" name="innerloop1" id="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
1294 <td><input type="text" name="innerloop2" id="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
1295 <td><input type="text" name="innerloop3" id="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
1298 <td>Set back to</td>
1299 <td><input type="text" name="setto1" id="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
1300 <td><input type="text" name="setto2" id="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
1301 <td><input type="text" name="setto3" id="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
1305 <!-- TMPL_IF name="mod" -->
1311 <td><input type="text" name="lastvalue1" id="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
1312 <td><input type="text" name="lastvalue2" id="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
1313 <td><input type="text" name="lastvalue3" id="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
1323 <!--TMPL_IF Name="history"-->
1324 <div id="subscription_form_history">
1325 <h2>Subscription history</h2>
1326 <form method="post" action="/cgi-bin/koha/serials/subscription-add.pl">
1327 <input type="hidden" name="op" value="modsubscription" />
1328 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
1329 <input type="hidden" name="history_only" value="1" />
1330 <p>Hint : you can update the serial history manually. This can be useful for an old subscription or to clean the existing history. Modify these fields with care, as future serial receive will continue to update them automatically.</p>
1333 <td>Subscription start date</td>
1334 <td><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (start date of the 1st subscription)</td>
1337 <td>Subscription end date</td>
1338 <td><input type="text" name="histenddate" value="<!-- TMPL_VAR name="histenddate" -->" />(if empty, subscription is still active)</td>
1341 <td>Received issues</td>
1342 <td><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></td>
1345 <td>Missing issues</td>
1346 <td><textarea name="missinglist" cols="60" rows="5"><!-- TMPL_VAR name="missinglist" --></textarea></td>
1349 <td>Note for OPAC</td>
1350 <td><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></td>
1353 <td>Note for staff</td>
1354 <td><textarea name="librariannote" cols="60" rows="5"><!-- TMPL_VAR name="librariannote" --></textarea></td>
1357 <input type="submit" value="Save subscription history" />
1364 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->