1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Serials › <!-- TMPL_IF name="mod" --> Modify a subscription<!-- TMPL_ELSE -->Add a subscription<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
6 <script type="text/javascript">
8 function _(s) { return s } // dummy function for gettext
10 // the english words used in display purposes
11 var text = new Array(_('Number'),_('Volume'),_('Issue'),_('Month'),_('Week'),_('Starting with:'),_('Rollover at:'),_('Choose Hemisphere:'),_('Northern'),_('Southern'),
12 _('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'),_('Season'),_('Year'));
14 var is_hemisphere = 1;
16 function YMDaToYWDa(S) {
17 with (new Date(Date.UTC(S[0], S[1] - 1, S[2]))) {
18 var DoW = getUTCDay();
19 setUTCDate(getUTCDate() - (DoW + 6) % 7 + 3);
22 var WN = Math.round((ms - valueOf()) / 604800000) + 1;
23 return [getUTCFullYear(), WN, DoW == 0 ? 7 : DoW];
26 function dayofyear(d) { // d is a Date object
27 var yn = d.getFullYear();
28 var mn = d.getMonth();
30 var d1 = new Date(yn,0,1,12,0,0); // noon on Jan. 1
31 var d2 = new Date(yn,mn,dn,12,0,0); // noon on input date
32 var ddiff = Math.round((d2-d1)/864e5);
37 // common pre defined number patterns
38 function num_pattern() {
39 var patternchoice = document.getElementById("numberpattern").value;
40 switch(patternchoice){
42 document.f.add1.value=1;
43 document.f.add2.value=1;
44 document.f.add3.value=1;
45 document.f.every1.value=12;
46 document.f.every2.value=1;
47 document.f.every3.value=1;
48 document.f.whenmorethan1.value=9999999;
49 document.f.whenmorethan2.value=12;
50 document.f.whenmorethan3.value=4;
51 document.f.setto1.value=0;
52 document.f.setto2.value=1;
53 document.f.setto3.value=1;
54 /* document.f.lastvalue1.value=1;
55 document.f.lastvalue2.value=1;
56 document.f.lastvalue3.value=1;*/
57 document.f.numberingmethod.value=_('Vol {X}, No {Y}, Issue {Z}');
58 moreoptions(text[1],text[0],text[2]);
59 display_table(0); // toggle info box on (1) or off (0)
62 document.f.add1.value=1;
63 document.f.add2.value=1;
64 document.f.add3.value='';
65 document.f.every1.value=12;
66 document.f.every2.value=1;
67 document.f.every3.value='';
68 document.f.whenmorethan1.value=9999999;
69 document.f.whenmorethan2.value=12;
70 document.f.whenmorethan3.value='';
71 document.f.setto1.value=0;
72 document.f.setto2.value=1;
73 document.f.setto3.value='';
74 /* document.f.lastvalue1.value=1;
75 document.f.lastvalue2.value=1;
76 document.f.lastvalue3.value='';*/
77 document.f.numberingmethod.value=_('Vol {X}, No {Y}');
78 moreoptions(text[1],text[0]);
82 document.f.add1.value=1;
83 document.f.add2.value=1;
84 document.f.add3.value='';
85 document.f.every1.value=12;
86 document.f.every2.value=1;
87 document.f.every3.value='';
88 document.f.whenmorethan1.value=9999999;
89 document.f.whenmorethan2.value=12;
90 document.f.whenmorethan3.value='';
91 document.f.setto1.value=0;
92 document.f.setto2.value=1;
93 document.f.setto3.value='';
94 document.f.numberingmethod.value=_('Vol {X}, Issue {Y}');
95 moreoptions(text[1],text[2]);
99 var d = new Date(document.f.firstacquidate.value);
100 var smonth = d.getMonth();
101 document.f.add1.value=1;
102 document.f.add2.value=1;
103 document.f.add3.value='';
104 document.f.every1.value=12;
105 document.f.every2.value=1;
106 document.f.every3.value='';
107 document.f.whenmorethan1.value=9999999;
108 document.f.whenmorethan2.value=12;
109 document.f.whenmorethan3.value='';
110 document.f.setto1.value=0;
111 document.f.setto2.value=1;
112 document.f.setto3.value='';
113 document.f.numberingmethod.value=_('No {X}, Issue {Y}');
114 moreoptions(text[0],text[2]);
118 moreoptions_seasons(text[15],sYear);
119 var d = new Date(document.f.firstacquidate.value);
120 var sYear = d.getFullYear();
121 document.f.add1.value=1;
122 document.f.add2.value='1';
123 document.f.add3.value='';
124 document.f.every1.value=4;
125 document.f.every2.value='1';
126 document.f.every3.value='';
127 document.f.whenmorethan1.value=9999999;
128 document.f.whenmorethan2.value='4';
129 document.f.whenmorethan3.value='';
130 document.f.setto1.value=0;
131 document.f.setto2.value='1';
132 document.f.setto3.value='';
133 document.f.lastvaluetemp1.value=sYear;
134 document.f.periodicity.value='8';
135 document.f.numberingmethod.value=_('{Y} {X}');
141 document.getElementById("more_options").innerHTML = '';
142 document.f.irreg_check.value=1;
145 var d = new Date(document.f.startdate.value);
146 var sYear = d.getFullYear();
147 document.f.add1.value=1;
148 document.f.add2.value=1;
149 document.f.add3.value='';
150 document.f.every1.value=12;
151 document.f.every2.value=1;
152 document.f.every3.value='';
153 document.f.whenmorethan1.value=9999999;
154 document.f.whenmorethan2.value=12;
155 document.f.whenmorethan3.value='';
156 document.f.setto1.value=0;
157 document.f.setto2.value=1;
158 document.f.setto3.value='';
159 // document.f.setto3.value='';
160 if (document.f.lastvalue1.value==0){document.f.lastvalue1.value=sYear};
161 if (document.f.lastvalue2.value==0 ||document.f.lastvalue2.value=='' ){
162 switch (document.f.periodicity.value){
164 var doy = dayofyear(d);
165 //var Weeknumber=YWDA[1];
166 document.f.lastvalue2.value=doy;
169 var doy = dayofyear(d);
170 //var Weeknumber=YWDA[1];
171 document.f.lastvalue2.value=doy*2;
174 var doy = dayofyear(d);
175 //var Weeknumber=YWDA[1];
176 document.f.lastvalue2.value=doy/3;
181 var YWDa = YMDaToYWDa(d);
182 //var Weeknumber=YWDA[1];
183 document.f.lastvalue2.value=YWDA[1]/(document.f.periodicity.value-1);
186 var smonth = d.getMonth();
187 document.f.lastvalue2.value=smonth;
190 var smonth = d.getMonth();
191 document.f.lastvalue2.value=smonth/2;
195 var smonth = d.getMonth();
196 document.f.lastvalue2.value=smonth/3;
199 var smonth = d.getMonth();
200 document.f.lastvalue2.value=smonth/6;
205 // document.f.lastvalue2.value=document.f.lastvaluetemp2.value;
206 document.f.lastvalue3.value='';
207 document.f.numberingmethod.value=_('{X}/{Y}');
208 moreoptions(text[16],text[0]);
212 document.f.add1.value=1;
213 document.f.add2.value='';
214 document.f.add3.value='';
215 document.f.every1.value=1;
216 document.f.every2.value='';
217 document.f.every3.value='';
218 document.f.whenmorethan1.value=9999999;
219 document.f.whenmorethan2.value='';
220 document.f.whenmorethan3.value='';
221 document.f.setto1.value=0;
222 document.f.setto2.value='';
223 document.f.setto3.value='';
224 /* document.f.lastvalue1.value=1;
225 document.f.lastvalue2.value='';
226 document.f.lastvalue3.value='';*/
227 document.f.numberingmethod.value='{X}';
228 moreoptions_daily_check(text[0]);
229 document.f.irreg_check.value=1;
235 function display_table(n) {
237 document.getElementById("basetable").style.display = 'block';
239 document.getElementById("basetable").style.display = 'none';
243 function modify_num_pattern() {
244 if(!document.getElementById("numberpattern")){ return false; }
245 document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
248 document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
249 document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
250 document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
251 document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
252 document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
253 document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
254 document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
255 document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
256 document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
257 document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
258 document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
259 document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
260 document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
261 document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
262 document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
263 document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
267 <!-- TMPL_IF NAME="add2" -->
268 if(<!-- TMPL_VAR NAME="add2" --> > 0){
272 <!-- TMPL_IF NAME="add3" -->
273 if(<!-- TMPL_VAR NAME="add3" --> > 0){
278 document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
280 document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
281 document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
284 document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
285 document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
289 // a pre check with more options to see if 'number' and '1/day' are chosen
290 function moreoptions_daily_check(x) {
291 var periodicity = document.f.periodicity.value;
293 if(periodicity == 1){
294 document.getElementById("irregularity").innerHTML = '';
295 var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
296 errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
297 for(var j=0;j<daynames.length;j++){
298 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" ";
300 var error = errortext;
302 document.getElementById("irregularity").innerHTML = error;
304 document.getElementById("irregularity").innerHTML = '';
305 document.getElementById("more_options").innerHTML = '';
310 // to dispaly the more options section
311 function moreoptions(x,y,z){
312 document.getElementById("irregularity").innerHTML = '';
313 document.getElementById("more_options").innerHTML = '';
315 // alert("X: "+x+"Y: "+y+"Z: "+z);
317 textbox +="<table>\n<tr><td> <\/td><td>"+x+"<\/td>";
319 textbox +="<td>"+y+"<\/td>";
321 textbox +="<td>"+z+"<\/td>";
324 textbox +="<\/tr>\n";
325 textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")' value=" + document.f.lastvalue1.value +" /><\/td>\n";
327 textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")' value=" + document.f.lastvalue2.value + " /><\/td>\n";
329 textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")' value=" + document.f.lastvalue3.value + " /><\/td>\n";
332 textbox +="<\/tr>\n";
334 textbox +="<tr><td>"+text[6]+"<\/td>";
335 textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
336 textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
338 textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
342 textbox +="<tr> <td>"+_('issues expected')+"</td><td><input type='text' name='issuesexpectedtemp1' size='4' onkeyup='moreoptionsupdate(\"issuesexpected1\",0)' value=" + document.f.issuesexpected1.value + " ><br/><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"</a></td></tr>";
344 textbox +="<\/table>\n";
346 document.getElementById("more_options").innerHTML = textbox;
349 function hemispheres(chosen){
350 var selbox = document.getElementById("season1");
352 var selboxselected = selbox.options[selbox.selectedIndex].value;
353 selbox.options.length = 0;
356 selbox.options[selbox.options.length] = new Option(text[11],'1');
357 selbox.options[selbox.options.length] = new Option(text[12],'2');
358 selbox.options[selbox.options.length] = new Option(text[13],'3');
359 selbox.options[selbox.options.length] = new Option(text[14],'4');
361 selbox.options[selboxselected-1].selected = true;
365 selbox.options[selbox.options.length] = new Option(text[13],'1');
366 selbox.options[selbox.options.length] = new Option(text[10],'2');
367 selbox.options[selbox.options.length] = new Option(text[11],'3');
368 selbox.options[selbox.options.length] = new Option(text[12],'4');
370 selbox.options[selboxselected-1].selected = true;
375 // to dispaly the more options section for seasons
376 function moreoptions_seasons(x,y){
377 document.getElementById("irregularity").innerHTML = '';
378 document.getElementById("more_options").innerHTML = '';
380 // alert("X: "+x+"Year: "+y);
382 var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
383 textbox +="<table>\n<tr><td>"+ text[7] +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
384 for(var i = 1; i <= 2; i++){
385 textbox +="<option value='"+i+"'";
386 if(i == hemi_select){
387 textbox += " selected "
389 textbox +=">"+text[i+7]+"<\/option>";
391 textbox +="<\/select><\/td><\/tr>\n";
392 textbox +="<tr><td> <\/td><td>"+x+"<\/td>";
393 textbox +="<td>"+text[16]+"<\/td>";
394 textbox +="<\/tr>\n";
395 textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
396 for(var j = 1; j <= 4; j++){
397 textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
399 textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
400 for(var k = parseInt(y); k <= parseInt(y)+15; k++){
401 textbox +="<option value='"+k+"'>"+k+"<\/option>";
403 textbox +="<\/select><\/td><\/tr>\n";
404 textbox +="<tr><td>"+text[6]+"<\/td>";
405 textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
406 textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
407 textbox +="<\/tr><\/table>\n";
409 document.getElementById("more_options").innerHTML = textbox;
412 function irregularity_check(){
413 document.f.irreg_check.value = 1; // Irregularity button now pushed
414 var periodicity = document.f.periodicity.value;
415 var rollover = document.f.issuesexpected1.value;
416 if(document.f.whenmorethantemp2){
417 rollover = document.f.whenmorethantemp2.value;
419 if(document.f.whenmorethantemp3){
420 rollover = document.f.whenmorethantemp3.value;
425 var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
428 if(rollover < 730) expected =730;
435 if(rollover < 365) expected =365;
442 if(rollover < 156) expected =156;
449 if(rollover < 52) expected =52;
456 if(rollover < 26) expected =26;
463 if(rollover < 17) expected =17;
470 if(rollover < 12) expected =12;
477 if(rollover < 6) expected =6;
484 if(rollover < 4) expected =4;
491 if(rollover < 4) expected =4;
498 if(rollover < 2) expected =2;
505 if(rollover < 1) expected =1;
515 if(expected == 365 || expected==730){
516 var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
517 errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
518 for(var j=0;j<daynames.length;j++){
519 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" ";
523 errortext +=expected+_(" issues expected ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
525 for(var i=rollover;i<expected;i++){
526 errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
527 errortext +=irregular_options(periodicity);
528 errortext +="<\/select>\n";
535 errortext +=expectedover+_(" issues expected ")+rollover+_(" were entered.<br \/> You seem to have indicated more issues per year than expected.");
538 if(error.length ==0){
539 error=_('No irregularities noticed');
541 display_example(expected);
542 document.getElementById("irregularity").innerHTML = error;
545 function irregular_options(periodicity){
548 <!-- TMPL_IF NAME="weekarrayjs" -->
549 var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->);
551 var months = new Array(_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),_('July'),_('August'),_('September'),_('October'),_('November'),_('December'));
552 var seasons = new Array(_('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'));
554 if(periodicity == 1) {
559 if(periodicity == 2 || periodicity == 3 || periodicity == 4) {
561 <!-- TMPL_IF NAME="weekarrayjs" -->
563 count = <!-- TMPL_VAR NAME="weekno" -->;
569 if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
570 if(periodicity == 8) {
571 is_season = 1; // setting up from edit page
576 if(is_hemisphere == 2){
587 for(var j=1;j<=expected;j++){
590 count = count-expected;
592 if(is_season && is_hemisphere == 1){
593 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
594 // alert("value: "+((count*3)-2)+" title: "+titles[j]);
595 } else if(is_season && is_hemisphere == 2){
596 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
597 // alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
599 errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
603 errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
609 function irregular_order(){
610 var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
611 var periodicity = document.f.periodicity.value;
612 var irregarray = irregular.split(',');
614 for(j=0;j<irregarray.length;j++){
615 document.getElementById("irregular"+irregarray[j]).checked = true;
618 for(i=0;i<irregarray.length;i++){
619 document.getElementById("irregular"+i).value = irregarray[i];
624 function display_example(expected){
625 var startfrom1 = parseInt(document.f.lastvalue1.value);
626 var startfrom2 = parseInt(document.f.lastvalue2.value);
627 var startfrom3 = parseInt(document.f.lastvalue3.value);
628 var every1 = parseInt(document.f.every1.value);
629 var every2 = parseInt(document.f.every2.value);
630 var every3 = parseInt(document.f.every3.value);
631 var numberpattern = document.f.numberingmethod.value;
632 var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
633 var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
634 var setto2 = parseInt(document.f.setto2.value);
635 var setto3 = parseInt(document.f.setto3.value);
636 var displaytext = _('Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n');
638 var count=startfrom3-1;
639 var count2=startfrom2;
640 for(var i=0;i<12;i++){
641 if(count>=whenmorethan3){
643 if(count2>=whenmorethan2){
652 displaytext += numberpattern.replace(/{Z}/,count)+'\n';
653 displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
654 displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
658 if(startfrom2>0 && !startfrom3){
659 var count=startfrom2-1;
660 for(var i=0;i<12;i++){
661 if(count>=whenmorethan2){
669 if(is_hemisphere == 2){
671 displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
673 displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
676 displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
679 displaytext += numberpattern.replace(/{Y}/,count)+'\n';
681 displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
684 if(startfrom1>0 && !startfrom2 && !startfrom3){
685 var offset=eval(document.f.issuesexpected1.value);
689 for(var i=startfrom1;i<(startfrom1+offset);i+=every1){
690 displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n';
693 displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
694 document.getElementById("displayexample").innerHTML = displaytext;
697 function isArray(obj) {
698 if (obj.constructor.toString().indexOf("Array") == -1)
704 function moreoptionsupdate(fieldnames,rollover){
705 fieldname = fieldnames;
706 fld = fieldname.length;
708 fieldnametempnumber = fieldname.substr(fld);
709 //alert(fieldnametempnumber);
710 fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
711 // alert(fieldnametemp);
712 eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
713 // alert (fieldname+" : "+eval("document.f."+fieldname+".value") +' '+fieldnametemp+' : ' +eval("document.f."+fieldnametemp+".value"));
714 var patternchoice = document.getElementById("numberpattern").value;
715 switch(patternchoice){
720 if (document.f.lastvaluetemp2.value>0){document.f.innerloop1.value = document.f.lastvaluetemp2.value;}
724 eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
729 function check_input(e){
730 var unicode=e.charCode? e.charCode : e.keyCode
731 if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete
732 if (unicode<48||unicode>57) { // if not a number
733 alert(_("Needs to be entered in digit form -eg 10"));
734 return false // disable key press
739 function Create_biblio(f)
741 window.open('/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup','FindABibIndex','width=1024,height=768,toolbar=no,scrollbars=yes');
746 window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
749 function FindAcqui(f)
751 window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
754 function Find_ISSN(f)
756 window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
761 if (f.startdate.value.length != 0 && f.sublength.value > 0) {
762 if (f.irreg_check.value == 1) {
765 if(f.numbering_pattern.value == ''){
766 alert(_("need to choose a numbering pattern"));
768 alert(_("need to check for irregularity by clicking 'Irregularity?'"));
772 alert(_('field marked with * are mandatory'));
776 <!-- TMPL_IF name="mod" -->
777 window.onload = modify_num_pattern();
778 <!-- TMPL_IF name="hemisphere" -->
779 window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
782 <!-- TMPL_IF name="irregularity" -->
783 window.onload = irregularity_check();
784 window.onload = irregular_order();
790 <!-- TMPL_INCLUDE NAME="header.inc" -->
791 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
793 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/subscription-add.pl">Serials</a> › <!-- TMPL_IF name="mod" --> Modify a subscription<!-- TMPL_ELSE -->Add a subscription<!-- /TMPL_IF --></div>
795 <div id="doc3" class="yui-t2">
803 <!-- TMPL_IF name="mod" -->
804 <h1>Modify a subscription</h1>
805 <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
806 <input type="hidden" name="op" value="modsubscription" />
807 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
809 <h1>Add a subscription (Serial Holdings Record)</h1>
810 <form method="post" action="/cgi-bin/koha/serials/subscription-add.pl" name="f">
811 <input type="hidden" name="op" value="addsubscription" />
813 <input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->" />
814 <input type="hidden" name="irreg_check" value="0" />
815 <input type="hidden" name="issuesexpected1" value="0" />
817 <h2>Subscription information for subscription #<!--TMPL_VAR name="subscriptionid"--></h2>
821 <td><!-- TMPL_VAR name="loggedinusername" --></td>
824 <td><label>Supplier:</label></td>
825 <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>
828 <td><label>Biblio</label></td>
830 <input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8" />
831 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />)
832 <a href="#" onclick="Plugin(f)">Search for Biblio</a> <!--TMPL_UNLESS Name="mod"--> |
833 <a href="#" onclick="Create_biblio(f)">Create Biblio</a><!--/TMPL_UNLESS-->
837 <td><label>Call Number</label></td>
838 <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20" /></td>
843 <select name="branchcode">
844 <option value="">Any branch</option>
845 <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
847 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
850 </select> (select a branch)
854 <td><label>Notes</label></td>
855 <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td>
858 <td><label>Management Notes</label></td>
859 <td><textarea name="internalnotes" cols="30" rows="2"><!-- TMPL_VAR name="internalnotes" --></textarea></td>
862 <td>Patron alert with </td>
864 <select name="letter">
865 <option value="">un-activated</option>
866 <!-- TMPL_LOOP name="letterloop" -->
867 <!-- TMPL_IF name="selected" -->
868 <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="lettername" --></option>
870 <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="lettername" --></option>
873 </select> (select a letter & patrons will be able to "follow" this subscription and recieve a mail on every new issue)
877 <td><b>Warning:</b></td>
880 <li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
881 <li>You also must have selected a supplier if you want to ask for late issues</li>
886 <div id="subscription_form_planning">
890 <td>First Issue ETA:</td>
892 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button2" style="cursor: pointer;" alt=""/>
893 <input type="text" name="firstacquidate" value="<!-- TMPL_VAR name="firstacquidate" -->" size=13 maxlength=10 id="acqui_date" style="border-width: 0px;" />
894 <!-- both scripts for calendar must follow the input field -->
895 <script type="text/javascript">
897 inputField:"acqui_date",
898 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
903 <script type="text/javascript">
905 inputField : "acqui_date",
906 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
907 button : "acqui_date",
913 <div id="displayexample"></div>
917 <td>Frequency: (*)</td>
919 <select name="periodicity" size="1" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1);num_pattern;">
920 <option value="" selected="selected">-- please choose --</option>
921 <!-- TMPL_IF name="periodicity16" -->
922 <option value="16" selected="selected">Without Periodicity</option>
924 <option value="16">Without Periodicity</option>
926 <!-- TMPL_IF name="periodicity48" -->
927 <option value="48" selected="selected">Unknown</option>
929 <option value="48">Unknown</option>
931 <!-- TMPL_IF name="periodicity32" -->
932 <option value="32" selected="selected">Irregular</option>
934 <option value="32">Irregular</option>
937 <!-- TMPL_IF name="periodicity12" -->
938 <option value="12" selected="selected">2/day</option>
940 <option value="12">2/day</option>
942 <!-- TMPL_IF name="periodicity1" -->
943 <option value="1" selected="selected">1/day</option>
945 <option value="1">1/day</option>
947 <!-- TMPL_IF name="periodicity13" -->
948 <option value="13" selected="selected">3/week</option>
950 <option value="13">3/week</option>
952 <!-- TMPL_IF name="periodicity2" -->
953 <option value="2" selected="selected">1/week</option>
955 <option value="2">1/week</option>
957 <!-- TMPL_IF name="periodicity3" -->
958 <option value="3" selected="selected">1/2 weeks (2/month)</option>
960 <option value="3">1/2 weeks (2/months)</option>
962 <!-- TMPL_IF name="periodicity4" -->
963 <option value="4" selected="selected">1/3 weeks</option>
965 <option value="4">1/3 weeks</option>
967 <!-- TMPL_IF name="periodicity5" -->
968 <option value="5" selected="selected">1/month</option>
970 <option value="5">1/month</option>
972 <!-- TMPL_IF name="periodicity6" -->
973 <option value="6" selected="selected">1/2 months (6/year)</option>
975 <option value="6">1/2 months (6/year)</option>
977 <!-- TMPL_IF name="periodicity7" -->
978 <option value="7" selected="selected">1/3 months (1/quarter)</option>
980 <option value="7">1/3 months (1/quarter)</option>
982 <!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
983 <!-- TMPL_IF name="periodicity8" -->
984 <option value="8" selected="selected">1/quarter (seasonal)</option>
986 <option value="8">1/quarter (seasonal)</option>
989 <!-- TMPL_IF name="periodicity9" -->
990 <option value="9" selected="selected">2/years</option>
992 <option value="9">2/year</option>
994 <!-- TMPL_IF name="periodicity10" -->
995 <option value="10" selected="selected">1/year</option>
997 <option value="10">1/year</option>
999 <!-- TMPL_IF name="periodicity11" -->
1000 <option value="11" selected="selected">1/2 years</option>
1002 <option value="11">1/2 years</option>
1005 Manual History :<input type="checkbox" name="manualhist" value="1" />
1009 <td>Numbering Pattern:</td>
1011 <select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
1012 <option value="" selected="selected">-- please choose --</option>
1013 <!-- TMPL_IF name="numberpattern1" -->
1014 <option value="1" selected="selected">Number</option>
1016 <option value="1">Number</option>
1018 <!-- TMPL_IF name="numberpattern2" -->
1019 <option value="2" selected="selected">Volume, Number, Issue</option>
1021 <option value="2">Volume, Number, Issue</option>
1023 <!-- TMPL_IF name="numberpattern3" -->
1024 <option value="3" selected="selected">Volume, Number</option>
1026 <option value="3">Volume, Number</option>
1028 <!-- TMPL_IF name="numberpattern4" -->
1029 <option value="4" selected="selected">Volume, Issue</option>
1031 <option value="4">Volume, Issue</option>
1033 <!-- TMPL_IF name="numberpattern5" -->
1034 <option value="5" selected="selected">Number, Issue</option>
1036 <option value="5">Number, Issue</option>
1038 <!-- TMPL_IF name="numberpattern6" -->
1039 <option value="6" selected="selected">Seasonal only</option>
1041 <option value="6">Seasonal only</option>
1043 <!-- TMPL_IF name="numberpattern8" -->
1044 <option value="8" selected="selected">Year/Number</option>
1046 <option value="8">Year/Number</option>
1048 <!-- TMPL_IF name="numberpattern7" -->
1049 <option value="7" selected="selected">None of the above</option>
1051 <option value="7">None of the above</option>
1054 <div id="more_options"></div>
1055 <div id="irregularity"></div>
1059 <td>Begins On: (*)</td>
1061 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="" />
1062 <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="beginning_date" />
1063 <!-- both scripts for calendar must follow the input field -->
1064 <script type="text/javascript">
1066 inputField : "beginning_date",
1067 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1072 <script type="text/javascript">
1074 inputField : "beginning_date",
1075 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1076 button : "beginning_date",
1083 <td>Subscription length</td>
1085 <select name="subtype">
1086 <!-- TMPL_LOOP NAME="subtype" -->
1087 <!-- TMPL_IF NAME="selected" -->
1088 <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
1090 <option value="<!-- TMPL_VAR NAME="name" -->">
1092 <!-- TMPL_VAR NAME="name" -->
1096 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (*) (enter amount in numerals)
1100 <td>Numbering calculation</td>
1101 <td>Numbering formula: <input type="text" name="numberingmethod" id="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->" /></td>
1105 <div id="basetable" style="display: none;">
1106 <table class="small">
1116 <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
1119 <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
1122 <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
1127 <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
1128 <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
1129 <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
1132 <td>When more than</td>
1133 <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
1134 <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
1135 <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
1138 <td>inner counter</td>
1139 <td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
1140 <td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
1141 <td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
1144 <td>Set back to</td>
1145 <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
1146 <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
1147 <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
1151 <!-- TMPL_IF name="mod" -->
1157 <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
1158 <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
1159 <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
1166 <!--TMPL_IF Name="history"-->
1167 <div id="subscription_form_history">
1171 <td>Starting date:</td>
1172 <td><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (the date of the 1st subscription)</td>
1175 <td>Ending date:</td>
1176 <td><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" />(if empty : subscription still active)</td>
1179 <td>Recieved issues</td>
1180 <td><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></td>
1183 <td>Missing issues</td>
1184 <td><textarea name="missinglist" cols="60" rows="5"><!-- TMPL_VAR name="missinglist" --></textarea></td>
1187 <td>Opac's notes</td>
1188 <td><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></td>
1191 <td>Librarian notes</td>
1192 <td><textarea name="librariannote" cols="60" rows="5"><!-- TMPL_VAR name="librariannote" --></textarea></td>
1197 <!-- TMPL_IF name="mod" -->
1198 <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
1200 <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
1208 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
1211 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->