Adding link to the committed budget breakdown
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-add.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- Additions to enable Calendar system -->
5 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-system.css" />
6 <!-- End of additions -->
7
8 <!-- Additions to enable Calendar system -->
9 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar.js"></script>
10 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"></script>
11 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-setup.js"></script>
12 <!-- End of additions -->
13
14 <script type="text/javascript">
15 <!--
16 function _(s) { return s } // dummy function for gettext
17
18 // the english words used in display purposes
19 var text = new Array(_('Number'),_('Volume'),_('Issue'),_('Month'),_('Week'),_('Starting with:'),_('Rollover at:'),_('Choose Hemisphere:'),_('Northern'),_('Southern'),
20 _('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'),_('Season'),_('Year'));
21 var is_season = 0;
22 var is_hemisphere = 1;
23
24 // common pre defined number patterns
25 function num_pattern() {
26 var patternchoice = document.getElementById("numberpattern").value;
27     switch(patternchoice){
28     case "2":
29         document.f.add1.value=1;
30         document.f.add2.value=1;
31         document.f.add3.value=1;
32         document.f.every1.value=12;
33         document.f.every2.value=1;
34         document.f.every3.value=1;
35         document.f.whenmorethan1.value=9999999;
36         document.f.whenmorethan2.value=12;
37         document.f.whenmorethan3.value=4;
38         document.f.setto1.value=0;
39         document.f.setto2.value=1;
40         document.f.setto3.value=1;
41         document.f.lastvalue1.value=1;
42         document.f.lastvalue2.value=1;
43         document.f.lastvalue3.value=1;
44         document.f.numberingmethod.value=_('Vol {X}, No {Y}, Issue {Z}');
45         moreoptions(text[1],text[0],text[2]);
46         display_table(0); // toggle info box on (1) or off (0)
47         break;
48     case "3":
49         document.f.add1.value=1;
50         document.f.add2.value=1;
51         document.f.add3.value='';
52         document.f.every1.value=12;
53         document.f.every2.value=1;
54         document.f.every3.value='';
55         document.f.whenmorethan1.value=9999999;
56         document.f.whenmorethan2.value=12;
57         document.f.whenmorethan3.value='';
58         document.f.setto1.value=0;
59         document.f.setto2.value=1;
60         document.f.setto3.value='';
61         document.f.lastvalue1.value=1;
62         document.f.lastvalue2.value=1;
63         document.f.lastvalue3.value='';
64         document.f.numberingmethod.value=_('Vol {X}, No {Y}');
65         moreoptions(text[1],text[0]);
66         display_table(0);
67         break;
68     case "4":
69         document.f.add1.value=1;
70         document.f.add2.value=1;
71         document.f.add3.value='';
72         document.f.every1.value=12;
73         document.f.every2.value=1;
74         document.f.every3.value='';
75         document.f.whenmorethan1.value=9999999;
76         document.f.whenmorethan2.value=12;
77         document.f.whenmorethan3.value='';
78         document.f.setto1.value=0;
79         document.f.setto2.value=1;
80         document.f.setto3.value='';
81         document.f.lastvalue1.value=1;
82         document.f.lastvalue2.value=1;
83         document.f.lastvalue3.value='';
84         document.f.numberingmethod.value=_('Vol {X}, Issue {Y}');
85         moreoptions(text[1],text[2]);
86         display_table(0);
87         break;
88     case "5":
89         document.f.add1.value=1;
90         document.f.add2.value=1;
91         document.f.add3.value='';
92         document.f.every1.value=12;
93         document.f.every2.value=1;
94         document.f.every3.value='';
95         document.f.whenmorethan1.value=9999999;
96         document.f.whenmorethan2.value=12;
97         document.f.whenmorethan3.value='';
98         document.f.setto1.value=0;
99         document.f.setto2.value=1;
100         document.f.setto3.value='';
101         document.f.lastvalue1.value=1;
102         document.f.lastvalue2.value=1;
103         document.f.lastvalue3.value='';
104         document.f.numberingmethod.value=_('No {X}, Issue {Y}');
105         moreoptions(text[0],text[2]);
106         display_table(0);
107         break;
108     case "6":
109         var d = new Date();
110         var sYear = d.getFullYear();
111         document.f.add1.value=1;
112         document.f.add2.value='1';
113         document.f.add3.value='';
114         document.f.every1.value=4;
115         document.f.every2.value='1';
116         document.f.every3.value='';
117         document.f.whenmorethan1.value=9999999;
118         document.f.whenmorethan2.value='4';
119         document.f.whenmorethan3.value='';
120         document.f.setto1.value=0;
121         document.f.setto2.value='1';
122         document.f.setto3.value='';
123         document.f.lastvalue1.value=sYear;
124         document.f.lastvalue2.value='1';
125         document.f.lastvalue3.value='';
126         document.f.periodicity.value='8';
127         document.f.numberingmethod.value=_('{Y} {X}');
128         moreoptions_seasons(text[15],sYear);
129         display_table(0);
130         is_season = 1;
131         break;
132     case "7":
133         display_table(1);
134         document.getElementById("more_options").innerHTML = '';
135         document.f.irreg_check.value=1; 
136         break;
137     case "8":
138         var d = new Date();
139         var sYear = d.getFullYear();
140         document.f.add1.value=1;
141         document.f.add2.value=1;
142         document.f.add3.value='';
143         document.f.every1.value=12;
144         document.f.every2.value=1;
145         document.f.every3.value='';
146         document.f.whenmorethan1.value=9999999;
147         document.f.whenmorethan2.value=12;
148         document.f.whenmorethan3.value='';
149         document.f.setto1.value=0;
150         document.f.setto2.value=1;
151         document.f.setto3.value='';
152         document.f.lastvalue1.value=sYear;
153         document.f.lastvalue2.value='1';
154         document.f.lastvalue3.value='';
155         document.f.periodicity.value=1;
156         document.f.numberingmethod.value=_('{X}/{Y}');
157         display_table(0);
158         break;
159     default:
160         document.f.add1.value=1;
161         document.f.add2.value='';
162         document.f.add3.value='';
163         document.f.every1.value=1;
164         document.f.every2.value='';
165         document.f.every3.value='';
166         document.f.whenmorethan1.value=9999999;
167         document.f.whenmorethan2.value='';
168         document.f.whenmorethan3.value='';
169         document.f.setto1.value=0;
170         document.f.setto2.value='';
171         document.f.setto3.value='';
172         document.f.lastvalue1.value=1;
173         document.f.lastvalue2.value='';
174         document.f.lastvalue3.value='';
175         document.f.numberingmethod.value='{X}';
176         moreoptions_daily_check(text[0]);
177         document.f.irreg_check.value=1;
178         display_table(0);
179         break;
180     }
181 }
182
183 function display_table(n) {
184     if(n==1){
185         document.getElementById("basetable").style.display = 'block';
186     } else {
187         document.getElementById("basetable").style.display = 'none';
188     }
189 }
190
191 function modify_num_pattern() {
192     document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
193     num_pattern();
194     
195     document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
196     document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
197     document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
198     document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
199     document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
200     document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
201     document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
202     document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
203     document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
204     document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
205     document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
206     document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
207     document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
208     document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
209     document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
210     document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
211
212     var more_strY;
213     var more_strZ;
214     <!-- TMPL_IF NAME="add2" -->
215     if(<!-- TMPL_VAR NAME="add2" --> > 0){
216         more_strY="Y";
217     }
218     <!-- /TMPL_IF -->
219     <!-- TMPL_IF NAME="add3" -->
220     if(<!-- TMPL_VAR NAME="add3" --> > 0){
221         more_strZ="Z";
222     }
223     <!-- /TMPL_IF -->
224
225     document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
226     if(more_strY){
227         document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
228     document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
229     }
230     if(more_strZ){
231         document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
232     document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
233     }
234 }
235
236 // a pre check with more options to see if 'number' and '1/day' are chosen
237 function moreoptions_daily_check(x) {
238     var periodicity = document.f.periodicity.value;
239     var errortext='';
240     if(periodicity == 1){
241         document.getElementById("irregularity").innerHTML = '';
242         var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
243         errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
244         for(var j=0;j<daynames.length;j++){
245             errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
246         }
247         var error = errortext;
248         moreoptions(x);
249         document.getElementById("irregularity").innerHTML = error;
250     } else {
251         document.getElementById("irregularity").innerHTML = '';
252         document.getElementById("more_options").innerHTML = '';
253         moreoptions(x);
254     }
255 }
256
257 // to dispaly the more options section
258 function moreoptions(x,y,z){
259 document.getElementById("irregularity").innerHTML = '';
260 document.getElementById("more_options").innerHTML = '';
261 var textbox = '';
262     // alert("X: "+x+"Y: "+y+"Z: "+z);
263     if(x){
264         textbox +="<table>\n<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
265         if(y){
266             textbox +="<td>"+y+"<\/td>";
267             if(z){
268                 textbox +="<td>"+z+"<\/td>";
269             }
270         }
271         textbox +="<\/tr>\n";
272         textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")'><\/td>\n";
273         if(y){
274             textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")'><\/td>\n";
275             if(z){
276                 textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")'><\/td>\n";
277             }
278         }
279         textbox +="<\/tr>\n";
280         if(y){
281             textbox +="<tr><td>"+text[6]+"<\/td>";
282             textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
283             textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
284             if(z){
285                 textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
286             }
287             textbox +="<\/tr>";
288         } else {
289           textbox +="<tr> <td>"+_('issues expected')+"</td><td><input type='text' name='issuesexpectedtemp1' size='4' onkeyup='moreoptionsupdate(\"issuesexpected1\",0)'><br/><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"</a></td></tr>";
290         }
291         textbox +="<\/table>\n";
292     }
293     document.getElementById("more_options").innerHTML = textbox;
294 }
295
296 function hemispheres(chosen){
297 var selbox = document.getElementById("season1");
298     if(selbox){
299     var selboxselected = selbox.options[selbox.selectedIndex].value;
300     selbox.options.length = 0;
301
302     if (chosen == "1") {
303         selbox.options[selbox.options.length] = new Option(text[11],'1');
304         selbox.options[selbox.options.length] = new Option(text[12],'2');
305         selbox.options[selbox.options.length] = new Option(text[13],'3');
306         selbox.options[selbox.options.length] = new Option(text[14],'4');
307         is_hemisphere = 1;
308         selbox.options[selboxselected-1].selected = true;
309     }
310
311     if (chosen == "2") {
312         selbox.options[selbox.options.length] = new Option(text[13],'1');
313         selbox.options[selbox.options.length] = new Option(text[10],'2');
314         selbox.options[selbox.options.length] = new Option(text[11],'3');
315         selbox.options[selbox.options.length] = new Option(text[12],'4');
316         is_hemisphere = 2;
317         selbox.options[selboxselected-1].selected = true;
318     }
319     }
320 }
321
322 // to dispaly the more options section for seasons
323 function moreoptions_seasons(x,y){
324 document.getElementById("irregularity").innerHTML = '';
325 document.getElementById("more_options").innerHTML = '';
326 var textbox = '';
327     // alert("X: "+x+"Year: "+y);
328     if(x){
329         var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
330         textbox +="<table>\n<tr><td>"+ text[7]  +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
331         for(var i = 1; i <= 2; i++){
332             textbox +="<option value='"+i+"'";
333             if(i == hemi_select){
334                 textbox += " selected "
335             }
336             textbox +=">"+text[i+7]+"<\/option>";
337         }
338         textbox +="<\/select><\/td><\/tr>\n";
339         textbox +="<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
340         textbox +="<td>"+text[16]+"<\/td>";
341         textbox +="<\/tr>\n";
342         textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
343         for(var j = 1; j <= 4; j++){
344             textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
345         }
346         textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
347         for(var k = parseInt(y); k <= parseInt(y)+15; k++){
348             textbox +="<option value='"+k+"'>"+k+"<\/option>";
349         }
350         textbox +="<\/select><\/td><\/tr>\n";
351         textbox +="<tr><td>"+text[6]+"<\/td>";
352         textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
353         textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
354                 textbox +="<\/tr><\/table>\n";
355     }
356     document.getElementById("more_options").innerHTML = textbox;
357 }
358
359 function irregularity_check(){
360     document.f.irreg_check.value = 1; // Irregularity button now pushed
361     var periodicity = document.f.periodicity.value;
362     var rollover = document.f.issuesexpected1.value;
363     if(document.f.whenmorethantemp2){
364       rollover = document.f.whenmorethantemp2.value;
365     }
366     if(document.f.whenmorethantemp3){
367         rollover = document.f.whenmorethantemp3.value;
368     }
369     var error='';
370     var toobig;
371     var expected; 
372     var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
373     switch(periodicity){
374     case "12":
375         if(rollover < 730) expected =730;
376         if(rollover > 730) {
377             expectedover=730;
378             toobig=1;
379         }
380         break;
381     case "1":
382         if(rollover < 365) expected =365;
383         if(rollover > 365) {
384             expectedover=365;
385             toobig=1;
386         }
387         break;
388     case "13":
389         if(rollover < 156) expected =156;
390         if(rollover > 156) {
391             expectedover=156;
392             toobig=1;
393         }
394         break;
395     case "2":
396         if(rollover < 52) expected =52;
397         if(rollover > 52){
398             expectedover=52;
399             toobig=1;
400         }
401         break;
402     case "3":
403         if(rollover < 26) expected =26;
404         if(rollover > 26){
405             expectedover=26;
406             toobig=1;
407         }
408         break;
409     case "4":
410         if(rollover < 17) expected =17;
411         if(rollover > 17){
412             expectedover=17;
413             toobig=1;
414         }
415         break;
416     case "5":
417         if(rollover < 12) expected =12;
418         if(rollover > 12){
419             expectedover=12;
420             toobig=1;
421         }
422         break;
423     case "6":
424         if(rollover < 6) expected =6;
425         if(rollover > 6){
426             expectedover=6;
427             toobig=1;
428         }
429         break;
430     case "7":
431         if(rollover < 4) expected =4;
432         if(rollover > 4){
433             expectedover=4;
434             toobig=1;
435         }
436         break;
437     case "8":
438         if(rollover < 4) expected =4;
439         if(rollover > 4){
440             expectedover=4;
441             toobig=1;
442         }
443         break;
444     case "9":
445         if(rollover < 2) expected =2;
446         if(rollover > 2){
447             expectedover=2;
448             toobig=1;
449         }
450         break;
451     case "10":
452         if(rollover < 1) expected =1;
453         if(rollover > 1){
454             expectedover=1;
455             toobig=1;
456         }
457         break;
458     default:
459         break;
460     }
461     if(expected){
462         if(expected == 365 || expected==730){
463             var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
464             errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
465             for(var j=0;j<daynames.length;j++){
466                 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
467             }
468             error=errortext;
469         } else {
470             errortext +=expected+_(" issues expected ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
471             var count=0;
472             for(var i=rollover;i<expected;i++){
473                 errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
474                 errortext +=irregular_options(periodicity);
475                 errortext +="<\/select>\n";
476                 count++;
477             }
478             error=errortext;
479         }
480     }
481     if(toobig){
482         errortext +=expectedover+_(" issues expected ")+rollover+_(" were entered.<br \/> You seem to have indicated more issues per year than expected.");
483         error=errortext;
484     }
485     if(error.length ==0){
486         error=_('No irregularities noticed');
487     }
488     display_example(expected);
489     document.getElementById("irregularity").innerHTML = error;
490 }
491
492 function irregular_options(periodicity){
493     var titles;
494     var count;
495 <!-- TMPL_IF NAME="weekarrayjs" -->
496     var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
497 <!-- /TMPL_IF -->
498     var months = new Array(_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),_('July'),_('August'),_('September'),_('October'),_('November'),_('December'));
499     var seasons = new Array(_('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'));
500     var errortext='';
501     if(periodicity == 1) {
502         expected = 366;
503         titles = "Day";
504         count = 1;
505     }
506     if(periodicity == 2 || periodicity == 3 || periodicity == 4) { 
507         expected = 52;
508     <!-- TMPL_IF NAME="weekarrayjs" -->
509         titles = weeks;
510         count = <!-- TMPL_VAR NAME="weekno" -->;
511     <!-- TMPL_ELSE -->
512         titles = "Week";
513         count = 1;
514     <!-- /TMPL_IF -->
515     }
516     if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
517         if(periodicity == 8) {
518             is_season = 1; // setting up from edit page
519         } 
520         if(is_season){
521             titles = seasons;
522             expected = 4;
523             if(is_hemisphere == 2){
524                 count = 2;
525             } else {
526                 count = 1;
527             }
528         } else {
529             titles = months;
530             expected = 12;
531             count = 1;
532         }
533     }
534     for(var j=1;j<=expected;j++){
535         if(isArray(titles)){
536             if(count>expected){
537                 count = count-expected;
538             }
539             if(is_season && is_hemisphere == 1){
540                 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
541 // alert("value: "+((count*3)-2)+" title: "+titles[j]);
542             } else if(is_season && is_hemisphere == 2){
543                 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
544 // alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
545             } else {
546                 errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
547             }
548             count++;
549         } else {
550             errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
551         }
552     }
553     return errortext;
554 }
555
556 function irregular_order(){
557     var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
558     var periodicity = document.f.periodicity.value;
559     var irregarray = irregular.split(',');
560     if(periodicity ==1){
561         for(j=0;j<irregarray.length;j++){
562         document.getElementById("irregular"+irregarray[j]).checked = true; 
563         }
564     } else {
565         for(i=0;i<irregarray.length;i++){    
566             document.getElementById("irregular"+i).value = irregarray[i];
567         }
568     }
569 }
570
571 function display_example(expected){
572     var startfrom1 = parseInt(document.f.lastvalue1.value);
573     var startfrom2 = parseInt(document.f.lastvalue2.value);
574     var startfrom3 = parseInt(document.f.lastvalue3.value);
575     var every1 = parseInt(document.f.every1.value);
576     var every2 = parseInt(document.f.every2.value);
577     var every3 = parseInt(document.f.every3.value);
578     var numberpattern = document.f.numberingmethod.value;
579     var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
580     var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
581     var setto2 = parseInt(document.f.setto2.value);
582     var setto3 = parseInt(document.f.setto3.value);
583     var displaytext = _('Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n');
584     if(startfrom3>0){
585         var count=startfrom3-1;
586         var count2=startfrom2;
587         for(var i=0;i<12;i++){
588             if(count>=whenmorethan3){
589                 count=setto3;
590                 if(count2>=whenmorethan2){
591                     startfrom1++;
592                     count2=setto2;
593                 } else {
594                     count2++;
595                 }
596             } else {
597                 count++;
598             }
599             displaytext += numberpattern.replace(/{Z}/,count)+'\n';
600             displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
601             displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
602
603         }
604     }
605     if(startfrom2>0 && !startfrom3){
606         var count=startfrom2-1;
607         for(var i=0;i<12;i++){
608             if(count>=whenmorethan2){
609                 startfrom1++;
610                 count=setto2;
611             } else {
612                 count++;
613             }
614
615             if(is_season){
616                 if(is_hemisphere == 2){
617                     if(count == 1) {
618                         displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
619                     } else {
620                         displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
621                     }
622                 } else {
623                 displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
624                 }
625             } else {
626                 displaytext += numberpattern.replace(/{Y}/,count)+'\n';
627             }
628             displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
629         }
630     }
631     if(startfrom1>0 && !startfrom2 && !startfrom3){
632         var offset=eval(document.f.issuesexpected1.value);
633         if (!offset){
634             offset = 12 
635         }
636         for(var i=startfrom1;i<(startfrom1+offset);i+=every1){
637             displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n';
638         }
639     }
640     displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
641     document.getElementById("displayexample").innerHTML = displaytext;
642 }
643
644 function isArray(obj) {
645 if (obj.constructor.toString().indexOf("Array") == -1)
646     return false;
647 else
648     return true;
649 }
650
651 function moreoptionsupdate(fieldnames,rollover){
652     fieldname = fieldnames;
653     fld = fieldname.length;
654     fld = fld-1;
655     fieldnametempnumber = fieldname.substr(fld);
656     //alert(fieldnametempnumber);
657     fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
658     // alert(fieldnametemp);
659     eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
660 //     alert (fieldname+" : "+eval("document.f."+fieldname+".value") +' '+fieldnametemp+' : ' +eval("document.f."+fieldnametemp+".value"));
661     if(rollover){
662         eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
663     }
664 }
665
666
667 function check_input(e){
668     var unicode=e.charCode? e.charCode : e.keyCode
669     if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete
670         if (unicode<48||unicode>57) { // if not a number
671             alert(_("Needs to be entered in digit form -eg 10"));
672             return false // disable key press
673         }
674     }
675 }
676
677 function Create_biblio(f)
678 {
679    window.open('/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup','FindABibIndex','width=1024,height=768,toolbar=no,scrollbars=yes');
680 }
681
682 function Plugin(f)
683 {
684          window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
685 }
686
687 function FindAcqui(f)
688 {
689          window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
690 }
691
692 function Find_ISSN(f)
693 {
694          window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
695 }
696
697
698 function Check(f) {
699     if (f.startdate.value.length != 0 && f.sublength.value > 0) {
700         if (f.irreg_check.value == 1) {
701             document.f.submit();
702         } else {
703             if(f.numbering_pattern.value == ''){
704                 alert(_("need to choose a numbering pattern"));
705             } else {
706                 alert(_("need to check for irregularity by clicking 'Irregularity?'"));
707             }
708         }
709     } else {
710         alert(_('field marked with * are mandatory'));
711     }
712     return false;
713 }
714 <!-- TMPL_IF name="mod" -->
715 window.onload = modify_num_pattern();
716     <!-- TMPL_IF name="hemisphere" -->
717     window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
718     <!-- /TMPL_IF -->
719 <!-- /TMPL_IF -->
720 <!-- TMPL_IF name="irregularity" -->
721 window.onload = irregularity_check();
722 window.onload = irregular_order();
723 <!-- /TMPL_IF -->
724 -->
725 </script>
726 </head>
727 <body>
728 <!-- TMPL_INCLUDE NAME="header.inc" -->
729 <!--TMPL_INCLUDE NAME="menu-serials.inc" -->
730
731
732 <div id="doc3" class="yui-t2">
733    
734    <div id="bd">
735         <div id="yui-main">
736         <div class="yui-b"><div class="yui-g">
737
738
739
740 <!-- TMPL_IF name="mod" -->
741     <h1>Modify a subscription</h1>
742     <form method="post" name="f">
743         <input type="hidden" name="op" value="modsubscription" />
744         <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
745 <!-- TMPL_ELSE -->
746     <h1>Add a subscription (Serial Holdings Record)</h1>
747     <form method="post" action="/cgi-bin/koha/serials/subscription-add.pl" name="f">
748         <input type="hidden" name="op" value="addsubscription" />
749 <!-- /TMPL_IF -->
750 <input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->" />
751 <input type="hidden" name="irreg_check" value="0" />
752 <input type="hidden" name="issuesexpected1" value="0" />
753
754     <h2>Subscription information for subscription #<!--TMPL_VAR name="subscriptionid"--></h2>
755     <table>
756         <tr>
757             <td>Librarian:</td>
758             <td><!-- TMPL_VAR name="loggedinusername" --></td>
759         </tr>
760         <tr>
761             <td><label>Supplier:</label></td>
762             <td><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="8" /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a Supplier</a></td>
763         </tr>
764         <tr>
765             <td><label>Biblio</label></td>
766             <td>
767                 <input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8" /> 
768                 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />)
769                 <a href="#" onclick="Plugin(f)">Search for Biblio</a> <!--TMPL_UNLESS Name="mod"--> |
770                 <a href="#" onclick="Create_biblio(f)">Create Biblio</a><!--/TMPL_UNLESS-->
771             </td>
772         </tr>
773         <tr>
774             <td><label>Call Number</label></td>
775             <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20" /></td>
776         </tr>
777         <tr>
778             <td>Branch</td>
779             <td>
780                 <select name="branchcode">
781                     <option value="">Any branch</option>
782                     <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
783                                 <!-- TMPL_ELSE -->
784                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
785                                 <!-- /TMPL_IF -->
786                     <!-- /TMPL_LOOP -->
787                 </select> (select a branch)
788             </td>
789         </tr>
790         <tr>
791             <td><label>Notes</label></td>
792             <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td>
793         </tr>
794         <tr>
795             <td><label>Management Notes</label></td>
796             <td><textarea name="internalnotes" cols="30" rows="2"><!-- TMPL_VAR name="internalnotes" --></textarea></td>
797         </tr>
798         <tr>
799             <td>Patron alert with </td>
800             <td>
801                 <select name="letter">
802                     <option value="">un-activated</option>
803                 <!-- TMPL_LOOP name="letterloop" -->
804                                 <!-- TMPL_IF name="selected" -->
805                     <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="lettername" --></option>
806 <!-- TMPL_ELSE -->
807                     <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="lettername" --></option>
808 <!-- /TMPL_IF -->
809                 <!-- /TMPL_LOOP -->
810                 </select> (select a letter &amp; patrons will be able to "follow" this subscription and recieve a mail on every new issue)
811             </td>
812         </tr>
813         <tr>
814             <td><b>Warning:</b></td>
815             <td>
816                 <ul>
817                     <li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
818                     <li>You also must have selected a supplier if you want to ask for late issues</li>
819                 </ul>
820             </td>
821         </tr>
822     </table>
823 <div id="subscription_form_planning">
824     <h2>Planning</h2>
825     <table>
826         <tr>
827             <td>First Issue ETA:</td>
828             <td>
829                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button2" style="cursor: pointer;" alt="" />
830                 <input type="text" name="firstacquidate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="acqui_date" />
831                 <!-- both scripts for calendar must follow the input field --> 
832                 <script type="text/javascript">
833                     Calendar.setup({
834                         inputField:"acqui_date",
835                         ifFormat       :   "%d/%m/%Y",
836                         button         :   "button2",
837                         align          :   "Tl"
838                     });
839                 </script>
840                 <script type="text/javascript">
841                     Calendar.setup({
842                         inputField     :   "acqui_date",
843                         ifFormat       :   "%d/%m/%Y",
844                         button         :   "acqui_date",
845                         align          :   "Tl"
846                     });
847                 </script>
848             </td>
849             <td rowspan="5">
850                 <div id="displayexample"></div>
851             </td>
852         </tr>
853         <tr>
854             <td>Frequency: (*)</td>
855             <td>
856                 <select name="periodicity" size="1" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1);num_pattern;">
857                 <option value="" selected="selected">-- please choose --</option>
858                 <!-- TMPL_IF name="periodicity16" -->
859                 <option value="16" selected="selected">Without Periodicity</option>
860                 <!-- TMPL_ELSE -->
861                     <option value="16">Without Periodicity</option>
862                 <!-- /TMPL_IF -->
863                 <!-- TMPL_IF name="periodicity48" -->
864                 <option value="48" selected="selected">Unknown</option>
865                 <!-- TMPL_ELSE -->
866                 <option value="48">Unknown</option>
867                 <!-- /TMPL_IF -->
868                 <!-- TMPL_IF name="periodicity32" -->
869                 <option value="32" selected="selected">Irregular</option>
870                 <!-- TMPL_ELSE -->
871                     <option value="32">Irregular</option>
872                 <!-- /TMPL_IF -->
873
874                 <!-- TMPL_IF name="periodicity12" -->
875                     <option value="12" selected="selected">2/day</option>
876                 <!-- TMPL_ELSE -->
877                     <option value="12">2/day</option>
878                 <!-- /TMPL_IF -->
879                 <!-- TMPL_IF name="periodicity1" -->
880                     <option value="1" selected="selected">1/day</option>
881                 <!-- TMPL_ELSE -->
882                     <option value="1">1/day</option>
883                 <!-- /TMPL_IF -->
884                 <!-- TMPL_IF name="periodicity13" -->
885                     <option value="13" selected="selected">3/week</option>
886                 <!-- TMPL_ELSE -->
887                     <option value="13">3/week</option>
888                 <!-- /TMPL_IF -->
889                 <!-- TMPL_IF name="periodicity2" -->
890                     <option value="2" selected="selected">1/week</option>
891                 <!-- TMPL_ELSE -->
892                     <option value="2">1/week</option>
893                 <!-- /TMPL_IF -->
894                 <!-- TMPL_IF name="periodicity3" -->
895                     <option value="3" selected="selected">1/2 weeks (2/month)</option>
896                 <!-- TMPL_ELSE -->
897                     <option value="3">1/2 weeks (2/months)</option>
898                 <!-- /TMPL_IF -->
899                 <!-- TMPL_IF name="periodicity4" -->
900                     <option value="4" selected="selected">1/3 weeks</option>
901                 <!-- TMPL_ELSE -->
902                     <option value="4">1/3 weeks</option>
903                 <!-- /TMPL_IF -->
904                 <!-- TMPL_IF name="periodicity5" -->
905                     <option value="5" selected="selected">1/month</option>
906                 <!-- TMPL_ELSE -->
907                     <option value="5">1/month</option>
908                 <!-- /TMPL_IF -->
909                 <!-- TMPL_IF name="periodicity6" -->
910                     <option value="6" selected="selected">1/2 months (6/year)</option>
911                 <!-- TMPL_ELSE -->
912                     <option value="6">1/2 months (6/year)</option>
913                 <!-- /TMPL_IF -->
914                 <!-- TMPL_IF name="periodicity7" -->
915                     <option value="7" selected="selected">1/3 months (1/quarter)</option>
916                 <!-- TMPL_ELSE -->
917                     <option value="7">1/3 months (1/quarter)</option>
918                 <!-- /TMPL_IF -->
919                 <!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
920                 <!-- TMPL_IF name="periodicity8" -->
921                     <option value="8" selected="selected">1/quarter (seasonal)</option>
922                 <!-- TMPL_ELSE -->
923                     <option value="8">1/quarter (seasonal)</option>
924                 <!-- /TMPL_IF -->
925
926                 <!-- TMPL_IF name="periodicity9" -->
927                     <option value="9" selected="selected">2/years</option>
928                 <!-- TMPL_ELSE -->
929                     <option value="9">2/year</option>
930                 <!-- /TMPL_IF -->
931                 <!-- TMPL_IF name="periodicity10" -->
932                     <option value="10" selected="selected">1/year</option>
933                 <!-- TMPL_ELSE -->
934                     <option value="10">1/year</option>
935                 <!-- /TMPL_IF -->
936                 <!-- TMPL_IF name="periodicity11" -->
937                     <option value="11" selected="selected">1/2 years</option>
938                 <!-- TMPL_ELSE -->
939                     <option value="11">1/2 years</option>
940                 <!-- /TMPL_IF -->
941                 </select>
942                 Manual History :<input type="checkbox" name="manualhist" value="1" />
943             </td>
944         </tr>
945         <tr>
946             <td>Numbering Pattern:</td>
947             <td>
948                 <select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
949                     <option value="" selected="selected">-- please choose --</option>
950                     <!-- TMPL_IF name="numberpattern1" -->
951                         <option value="1" selected="selected">Number</option>
952                     <!-- TMPL_ELSE -->
953                         <option value="1">Number</option>
954                     <!-- /TMPL_IF -->
955                     <!-- TMPL_IF name="numberpattern2" -->
956                         <option value="2" selected="selected">Volume, Number, Issue</option>
957                     <!-- TMPL_ELSE -->
958                         <option value="2">Volume, Number, Issue</option>
959                     <!-- /TMPL_IF -->
960                     <!-- TMPL_IF name="numberpattern3" -->
961                         <option value="3" selected="selected">Volume, Number</option>
962                     <!-- TMPL_ELSE -->
963                         <option value="3">Volume, Number</option>
964                     <!-- /TMPL_IF -->
965                     <!-- TMPL_IF name="numberpattern4" -->
966                         <option value="4" selected="selected">Volume, Issue</option>
967                     <!-- TMPL_ELSE -->
968                         <option value="4">Volume, Issue</option>
969                     <!-- /TMPL_IF -->
970                     <!-- TMPL_IF name="numberpattern5" -->
971                         <option value="5" selected="selected">Number, Issue</option>
972                     <!-- TMPL_ELSE -->
973                         <option value="5">Number, Issue</option>
974                     <!-- /TMPL_IF -->
975                     <!-- TMPL_IF name="numberpattern6" -->
976                         <option value="6" selected="selected">Seasonal only</option>
977                     <!-- TMPL_ELSE -->
978                         <option value="6">Seasonal only</option>
979                     <!-- /TMPL_IF -->
980                     <!-- TMPL_IF name="numberpattern8" -->
981                         <option value="8" selected="selected">Year/Number</option>
982                     <!-- TMPL_ELSE -->
983                         <option value="8">Year/Number</option>
984                     <!-- /TMPL_IF -->          
985                     <!-- TMPL_IF name="numberpattern7" -->
986                         <option value="7" selected="selected">None of the above</option>
987                     <!-- TMPL_ELSE -->
988                         <option value="7">None of the above</option>
989                     <!-- /TMPL_IF -->
990                 </select>
991                 <div id="more_options"></div>
992                 <div id="irregularity"></div>
993             </td>
994         </tr>
995         <tr>
996             <td>Begins On: (*)</td>
997             <td>
998                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt=""  />
999                 <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="beginning_date" />
1000                 <!-- both scripts for calendar must follow the input field --> 
1001                 <script type="text/javascript">
1002                     Calendar.setup({
1003                         inputField   : "beginning_date",
1004                         ifFormat     : "%d/%m/%Y",
1005                         button       : "button1",
1006                         align        : "Tl"
1007                     });
1008                 </script>
1009                 <script type="text/javascript">
1010                     Calendar.setup({
1011                         inputField   : "beginning_date",
1012                         ifFormat     : "%d/%m/%Y",
1013                         button       : "beginning_date",
1014                         align        : "Tl"
1015                     });
1016                 </script>
1017             </td>
1018         </tr>
1019         <tr>
1020             <td>Subscription length</td>
1021             <td>
1022                 <select name="subtype">
1023                     <!-- TMPL_LOOP NAME="subtype" -->
1024                         <!-- TMPL_IF NAME="selected" -->
1025                         <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
1026                         <!-- TMPL_ELSE -->
1027                         <option value="<!-- TMPL_VAR NAME="name" -->">
1028                         <!-- /TMPL_IF -->
1029                         <!-- TMPL_VAR NAME="name" -->
1030                         </option>
1031                     <!-- /TMPL_LOOP -->
1032                 </select>
1033                 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (*) (enter amount in numerals)
1034             </td>
1035         </tr>
1036     <tr>
1037         <td>Numbering calculation</td>
1038         <td>Numbering formula: <input type="text" name="numberingmethod" id="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->" /></td>
1039     </tr>
1040     <tr>
1041     <td colspan="3">
1042         <div id="basetable" style="display: none;">
1043             <table class="small">
1044                 <tr>
1045                     <th>&nbsp;</th>
1046                     <th>X</th>
1047                     <th>Y</th>
1048                     <th>Z</th>
1049                 </tr>
1050                 <tr>
1051                     <td>Add</td>
1052                     <td>
1053                         <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
1054                     </td>
1055                     <td>
1056                         <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
1057                     </td>
1058                     <td>
1059                         <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
1060                     </td>
1061                 </tr>
1062                 <tr>
1063                     <td>once every</td>
1064                     <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
1065                     <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
1066                     <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
1067                 </tr>
1068                 <tr>
1069                     <td>When more than</td>
1070                     <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
1071                     <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
1072                     <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
1073                 </tr>
1074                 <!-- TMPL_IF name="mod" -->
1075                 <tr>
1076                     <td>The loop is for instance</td>
1077                     <td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
1078                     <td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
1079                     <td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
1080                 </tr>
1081                 <!-- /TMPL_IF -->
1082                 <tr>
1083                     <td>Set back to</td>
1084                     <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
1085                     <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
1086                     <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
1087                 </tr>
1088                 <tr>
1089                     <td>
1090                         <!-- TMPL_IF name="mod" -->
1091                             Last value
1092                         <!-- TMPL_ELSE -->
1093                             Begins with
1094                         <!-- /TMPL_IF -->
1095                     </td>
1096                     <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
1097                     <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
1098                     <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
1099                 </tr>
1100             </table>
1101         </div>
1102         </td></tr>
1103     </table>
1104 </div>
1105 <!--TMPL_IF Name="history"-->
1106 <div id="subscription_form_history">
1107     <h2>History</h2>
1108     <table>
1109         <tr>
1110           <td>Starting date:</td>
1111           <td><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (the date of the 1st subscription)</td>
1112         </tr>
1113         <tr>
1114           <td>Ending date:</td>
1115           <td><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" />(if empty : subscription still active)</td>
1116         </tr>
1117         <tr>
1118             <td>Recieved issues</td>
1119             <td><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></td>
1120         </tr>
1121         <tr>
1122             <td>Missing issues</td>
1123             <td><textarea name="missinglist" cols="60" rows="5"><!-- TMPL_VAR name="missinglist" --></textarea></td>
1124         </tr>
1125         <tr>
1126             <td>Opac's notes</td>
1127             <td><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></td>
1128         </tr>
1129         <tr>
1130             <td>Librarian notes</td>
1131             <td><textarea name="librariannote" cols="60" rows="5"><!-- TMPL_VAR name="librariannote" --></textarea></td>
1132         </tr>
1133     </table>
1134 </div>
1135 <!--/TMPL_IF-->
1136 <!-- TMPL_IF name="mod" -->
1137     <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
1138 <!-- TMPL_ELSE -->
1139     <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
1140 <!-- /TMPL_IF -->
1141 </form>
1142
1143 </div>
1144 </div>
1145 </div>
1146
1147 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
1148 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->