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">
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'));
13 var is_hemisphere = 1;
15 function YMDaToYWDa(S) {
16 with (new Date(Date.UTC(S[0], S[1] - 1, S[2]))) {
17 var DoW = getUTCDay();
18 setUTCDate(getUTCDate() - (DoW + 6) % 7 + 3);
21 var WN = Math.round((ms - valueOf()) / 604800000) + 1;
22 return [getUTCFullYear(), WN, DoW == 0 ? 7 : DoW];
25 function dayofyear(d) { // d is a Date object
26 var yn = d.getFullYear();
27 var mn = d.getMonth();
29 var d1 = new Date(yn,0,1,12,0,0); // noon on Jan. 1
30 var d2 = new Date(yn,mn,dn,12,0,0); // noon on input date
31 var ddiff = Math.round((d2-d1)/864e5);
36 // common pre defined number patterns
37 function num_pattern() {
38 var patternchoice = document.getElementById("numberpattern").value;
39 switch(patternchoice){
41 document.f.add1.value=1;
42 document.f.add2.value=1;
43 document.f.add3.value=1;
44 document.f.every1.value=12;
45 document.f.every2.value=1;
46 document.f.every3.value=1;
47 document.f.whenmorethan1.value=9999999;
48 document.f.whenmorethan2.value=12;
49 document.f.whenmorethan3.value=4;
50 document.f.setto1.value=0;
51 document.f.setto2.value=1;
52 document.f.setto3.value=1;
53 /* document.f.lastvalue1.value=1;
54 document.f.lastvalue2.value=1;
55 document.f.lastvalue3.value=1;*/
56 document.f.numberingmethod.value=_('Vol {X}, No {Y}, Issue {Z}');
57 moreoptions(text[1],text[0],text[2]);
58 display_table(0); // toggle info box on (1) or off (0)
61 document.f.add1.value=1;
62 document.f.add2.value=1;
63 document.f.add3.value='';
64 document.f.every1.value=12;
65 document.f.every2.value=1;
66 document.f.every3.value='';
67 document.f.whenmorethan1.value=9999999;
68 document.f.whenmorethan2.value=12;
69 document.f.whenmorethan3.value='';
70 document.f.setto1.value=0;
71 document.f.setto2.value=1;
72 document.f.setto3.value='';
73 /* document.f.lastvalue1.value=1;
74 document.f.lastvalue2.value=1;
75 document.f.lastvalue3.value='';*/
76 document.f.numberingmethod.value=_('Vol {X}, No {Y}');
77 moreoptions(text[1],text[0]);
81 document.f.add1.value=1;
82 document.f.add2.value=1;
83 document.f.add3.value='';
84 document.f.every1.value=12;
85 document.f.every2.value=1;
86 document.f.every3.value='';
87 document.f.whenmorethan1.value=9999999;
88 document.f.whenmorethan2.value=12;
89 document.f.whenmorethan3.value='';
90 document.f.setto1.value=0;
91 document.f.setto2.value=1;
92 document.f.setto3.value='';
93 document.f.numberingmethod.value=_('Vol {X}, Issue {Y}');
94 moreoptions(text[1],text[2]);
98 var d = new Date(document.f.firstacquidate.value);
99 var smonth = d.getMonth();
100 document.f.add1.value=1;
101 document.f.add2.value=1;
102 document.f.add3.value='';
103 document.f.every1.value=12;
104 document.f.every2.value=1;
105 document.f.every3.value='';
106 document.f.whenmorethan1.value=9999999;
107 document.f.whenmorethan2.value=12;
108 document.f.whenmorethan3.value='';
109 document.f.setto1.value=0;
110 document.f.setto2.value=1;
111 document.f.setto3.value='';
112 document.f.numberingmethod.value=_('No {X}, Issue {Y}');
113 moreoptions(text[0],text[2]);
117 moreoptions_seasons(text[15],sYear);
118 var d = new Date(document.f.firstacquidate.value);
119 var sYear = d.getFullYear();
120 document.f.add1.value=1;
121 document.f.add2.value='1';
122 document.f.add3.value='';
123 document.f.every1.value=4;
124 document.f.every2.value='1';
125 document.f.every3.value='';
126 document.f.whenmorethan1.value=9999999;
127 document.f.whenmorethan2.value='4';
128 document.f.whenmorethan3.value='';
129 document.f.setto1.value=0;
130 document.f.setto2.value='1';
131 document.f.setto3.value='';
132 document.f.lastvaluetemp1.value=sYear;
133 document.f.periodicity.value='8';
134 document.f.numberingmethod.value=_('{Y} {X}');
140 document.getElementById("more_options").innerHTML = '';
141 document.f.irreg_check.value=1;
144 var d = new Date(document.f.startdate.value);
145 var sYear = d.getFullYear();
146 document.f.add1.value=1;
147 document.f.add2.value=1;
148 document.f.add3.value='';
149 document.f.every1.value=12;
150 document.f.every2.value=1;
151 document.f.every3.value='';
152 document.f.whenmorethan1.value=9999999;
153 document.f.whenmorethan2.value=12;
154 document.f.whenmorethan3.value='';
155 document.f.setto1.value=0;
156 document.f.setto2.value=1;
157 document.f.setto3.value='';
158 // document.f.setto3.value='';
159 if (document.f.lastvalue1.value==0){document.f.lastvalue1.value=sYear};
160 if (document.f.lastvalue2.value==0 ||document.f.lastvalue2.value=='' ){
161 switch (document.f.periodicity.value){
163 var doy = dayofyear(d);
164 //var Weeknumber=YWDA[1];
165 document.f.lastvalue2.value=doy;
168 var doy = dayofyear(d);
169 //var Weeknumber=YWDA[1];
170 document.f.lastvalue2.value=doy*2;
173 var doy = dayofyear(d);
174 //var Weeknumber=YWDA[1];
175 document.f.lastvalue2.value=doy/3;
180 var YWDa = YMDaToYWDa(d);
181 //var Weeknumber=YWDA[1];
182 document.f.lastvalue2.value=YWDA[1]/(document.f.periodicity.value-1);
185 var smonth = d.getMonth();
186 document.f.lastvalue2.value=smonth;
189 var smonth = d.getMonth();
190 document.f.lastvalue2.value=smonth/2;
194 var smonth = d.getMonth();
195 document.f.lastvalue2.value=smonth/3;
198 var smonth = d.getMonth();
199 document.f.lastvalue2.value=smonth/6;
204 // document.f.lastvalue2.value=document.f.lastvaluetemp2.value;
205 document.f.lastvalue3.value='';
206 document.f.numberingmethod.value=_('{X}/{Y}');
207 moreoptions(text[16],text[0]);
211 document.f.add1.value=1;
212 document.f.add2.value='';
213 document.f.add3.value='';
214 document.f.every1.value=1;
215 document.f.every2.value='';
216 document.f.every3.value='';
217 document.f.whenmorethan1.value=9999999;
218 document.f.whenmorethan2.value='';
219 document.f.whenmorethan3.value='';
220 document.f.setto1.value=0;
221 document.f.setto2.value='';
222 document.f.setto3.value='';
223 /* document.f.lastvalue1.value=1;
224 document.f.lastvalue2.value='';
225 document.f.lastvalue3.value='';*/
226 document.f.numberingmethod.value='{X}';
227 moreoptions_daily_check(text[0]);
228 document.f.irreg_check.value=1;
234 function display_table(n) {
236 document.getElementById("basetable").style.display = 'block';
238 document.getElementById("basetable").style.display = 'none';
242 function modify_num_pattern() {
243 if(!document.getElementById("numberpattern")){ return false; }
244 document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
247 document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
248 document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
249 document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
250 document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
251 document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
252 document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
253 document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
254 document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
255 document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
256 document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
257 document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
258 document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
259 document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
260 document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
261 document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
262 document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
266 <!-- TMPL_IF NAME="add2" -->
267 if(<!-- TMPL_VAR NAME="add2" --> > 0){
271 <!-- TMPL_IF NAME="add3" -->
272 if(<!-- TMPL_VAR NAME="add3" --> > 0){
277 document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
279 document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
280 document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
283 document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
284 document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
288 // a pre check with more options to see if 'number' and '1/day' are chosen
289 function moreoptions_daily_check(x) {
290 var periodicity = document.f.periodicity.value;
292 if(periodicity == 1){
293 document.getElementById("irregularity").innerHTML = '';
294 var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
295 errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
296 for(var j=0;j<daynames.length;j++){
297 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" ";
299 var error = errortext;
301 document.getElementById("irregularity").innerHTML = error;
303 document.getElementById("irregularity").innerHTML = '';
304 document.getElementById("more_options").innerHTML = '';
309 // to dispaly the more options section
310 function moreoptions(x,y,z){
311 document.getElementById("irregularity").innerHTML = '';
312 document.getElementById("more_options").innerHTML = '';
314 // alert("X: "+x+"Y: "+y+"Z: "+z);
316 textbox +="<table>\n<tr><td> <\/td><td>"+x+"<\/td>";
318 textbox +="<td>"+y+"<\/td>";
320 textbox +="<td>"+z+"<\/td>";
323 textbox +="<\/tr>\n";
324 textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")' value=" + document.f.lastvalue1.value +" /><\/td>\n";
326 textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")' value=" + document.f.lastvalue2.value + " /><\/td>\n";
328 textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")' value=" + document.f.lastvalue3.value + " /><\/td>\n";
331 textbox +="<\/tr>\n";
333 textbox +="<tr><td>"+text[6]+"<\/td>";
334 textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
335 textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
337 textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
341 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>";
343 textbox +="<\/table>\n";
345 document.getElementById("more_options").innerHTML = textbox;
348 function hemispheres(chosen){
349 var selbox = document.getElementById("season1");
351 var selboxselected = selbox.options[selbox.selectedIndex].value;
352 selbox.options.length = 0;
355 selbox.options[selbox.options.length] = new Option(text[11],'1');
356 selbox.options[selbox.options.length] = new Option(text[12],'2');
357 selbox.options[selbox.options.length] = new Option(text[13],'3');
358 selbox.options[selbox.options.length] = new Option(text[14],'4');
360 selbox.options[selboxselected-1].selected = true;
364 selbox.options[selbox.options.length] = new Option(text[13],'1');
365 selbox.options[selbox.options.length] = new Option(text[10],'2');
366 selbox.options[selbox.options.length] = new Option(text[11],'3');
367 selbox.options[selbox.options.length] = new Option(text[12],'4');
369 selbox.options[selboxselected-1].selected = true;
374 // to dispaly the more options section for seasons
375 function moreoptions_seasons(x,y){
376 document.getElementById("irregularity").innerHTML = '';
377 document.getElementById("more_options").innerHTML = '';
379 // alert("X: "+x+"Year: "+y);
381 var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
382 textbox +="<table>\n<tr><td>"+ text[7] +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
383 for(var i = 1; i <= 2; i++){
384 textbox +="<option value='"+i+"'";
385 if(i == hemi_select){
386 textbox += " selected "
388 textbox +=">"+text[i+7]+"<\/option>";
390 textbox +="<\/select><\/td><\/tr>\n";
391 textbox +="<tr><td> <\/td><td>"+x+"<\/td>";
392 textbox +="<td>"+text[16]+"<\/td>";
393 textbox +="<\/tr>\n";
394 textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
395 for(var j = 1; j <= 4; j++){
396 textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
398 textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
399 for(var k = parseInt(y); k <= parseInt(y)+15; k++){
400 textbox +="<option value='"+k+"'>"+k+"<\/option>";
402 textbox +="<\/select><\/td><\/tr>\n";
403 textbox +="<tr><td>"+text[6]+"<\/td>";
404 textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
405 textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
406 textbox +="<\/tr><\/table>\n";
408 document.getElementById("more_options").innerHTML = textbox;
411 function irregularity_check(){
412 document.f.irreg_check.value = 1; // Irregularity button now pushed
413 var periodicity = document.f.periodicity.value;
414 var rollover = document.f.issuesexpected1.value;
415 if(document.f.whenmorethantemp2){
416 rollover = document.f.whenmorethantemp2.value;
418 if(document.f.whenmorethantemp3){
419 rollover = document.f.whenmorethantemp3.value;
424 var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
427 if(rollover < 730) expected =730;
434 if(rollover < 365) expected =365;
441 if(rollover < 156) expected =156;
448 if(rollover < 52) expected =52;
455 if(rollover < 26) expected =26;
462 if(rollover < 17) expected =17;
469 if(rollover < 12) expected =12;
476 if(rollover < 6) expected =6;
483 if(rollover < 4) expected =4;
490 if(rollover < 4) expected =4;
497 if(rollover < 2) expected =2;
504 if(rollover < 1) expected =1;
514 if(expected == 365 || expected==730){
515 var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
516 errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
517 for(var j=0;j<daynames.length;j++){
518 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" ";
522 errortext +=expected+_(" issues expected ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
524 for(var i=rollover;i<expected;i++){
525 errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
526 errortext +=irregular_options(periodicity);
527 errortext +="<\/select>\n";
534 errortext +=expectedover+_(" issues expected ")+rollover+_(" were entered.<br \/> You seem to have indicated more issues per year than expected.");
537 if(error.length ==0){
538 error=_('No irregularities noticed');
540 display_example(expected);
541 document.getElementById("irregularity").innerHTML = error;
544 function irregular_options(periodicity){
547 <!-- TMPL_IF NAME="weekarrayjs" -->
548 var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->);
550 var months = new Array(_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),_('July'),_('August'),_('September'),_('October'),_('November'),_('December'));
551 var seasons = new Array(_('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'));
553 if(periodicity == 1) {
558 if(periodicity == 2 || periodicity == 3 || periodicity == 4) {
560 <!-- TMPL_IF NAME="weekarrayjs" -->
562 count = <!-- TMPL_VAR NAME="weekno" -->;
568 if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
569 if(periodicity == 8) {
570 is_season = 1; // setting up from edit page
575 if(is_hemisphere == 2){
586 for(var j=1;j<=expected;j++){
589 count = count-expected;
591 if(is_season && is_hemisphere == 1){
592 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
593 // alert("value: "+((count*3)-2)+" title: "+titles[j]);
594 } else if(is_season && is_hemisphere == 2){
595 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
596 // alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
598 errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
602 errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
608 function irregular_order(){
609 var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
610 var periodicity = document.f.periodicity.value;
611 var irregarray = irregular.split(',');
613 for(j=0;j<irregarray.length;j++){
614 document.getElementById("irregular"+irregarray[j]).checked = true;
617 for(i=0;i<irregarray.length;i++){
618 document.getElementById("irregular"+i).value = irregarray[i];
623 function display_example(expected){
624 var startfrom1 = parseInt(document.f.lastvalue1.value);
625 var startfrom2 = parseInt(document.f.lastvalue2.value);
626 var startfrom3 = parseInt(document.f.lastvalue3.value);
627 var every1 = parseInt(document.f.every1.value);
628 var every2 = parseInt(document.f.every2.value);
629 var every3 = parseInt(document.f.every3.value);
630 var numberpattern = document.f.numberingmethod.value;
631 var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
632 var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
633 var setto2 = parseInt(document.f.setto2.value);
634 var setto3 = parseInt(document.f.setto3.value);
635 var displaytext = _('Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n');
637 var count=startfrom3-1;
638 var count2=startfrom2;
639 for(var i=0;i<12;i++){
640 if(count>=whenmorethan3){
642 if(count2>=whenmorethan2){
651 displaytext += numberpattern.replace(/{Z}/,count)+'\n';
652 displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
653 displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
657 if(startfrom2>0 && !startfrom3){
658 var count=startfrom2-1;
659 for(var i=0;i<12;i++){
660 if(count>=whenmorethan2){
668 if(is_hemisphere == 2){
670 displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
672 displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
675 displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
678 displaytext += numberpattern.replace(/{Y}/,count)+'\n';
680 displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
683 if(startfrom1>0 && !startfrom2 && !startfrom3){
684 var offset=eval(document.f.issuesexpected1.value);
688 for(var i=startfrom1;i<(startfrom1+offset);i+=every1){
689 displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n';
692 displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
693 document.getElementById("displayexample").innerHTML = displaytext;
696 function isArray(obj) {
697 if (obj.constructor.toString().indexOf("Array") == -1)
703 function moreoptionsupdate(fieldnames,rollover){
704 fieldname = fieldnames;
705 fld = fieldname.length;
707 fieldnametempnumber = fieldname.substr(fld);
708 //alert(fieldnametempnumber);
709 fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
710 // alert(fieldnametemp);
711 eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
712 // alert (fieldname+" : "+eval("document.f."+fieldname+".value") +' '+fieldnametemp+' : ' +eval("document.f."+fieldnametemp+".value"));
713 var patternchoice = document.getElementById("numberpattern").value;
714 switch(patternchoice){
719 if (document.f.lastvaluetemp2.value>0){document.f.innerloop1.value = document.f.lastvaluetemp2.value;}
723 eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
728 function check_input(e){
729 var unicode=e.charCode? e.charCode : e.keyCode
730 if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete
731 if (unicode<48||unicode>57) { // if not a number
732 alert(_("Needs to be entered in digit form -eg 10"));
733 return false // disable key press
738 function Create_biblio(f)
740 window.open('/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup','FindABibIndex','width=1024,height=768,toolbar=no,scrollbars=yes');
745 window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
748 function FindAcqui(f)
750 window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
753 function Find_ISSN(f)
755 window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
760 if (f.startdate.value.length != 0 && f.sublength.value > 0) {
761 if (f.irreg_check.value == 1) {
764 if(f.numbering_pattern.value == ''){
765 alert(_("need to choose a numbering pattern"));
767 alert(_("need to check for irregularity by clicking 'Irregularity?'"));
771 alert(_('field marked with * are mandatory'));
775 <!-- TMPL_IF name="mod" -->
776 window.onload = modify_num_pattern();
777 <!-- TMPL_IF name="hemisphere" -->
778 window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
781 <!-- TMPL_IF name="irregularity" -->
782 window.onload = irregularity_check();
783 window.onload = irregular_order();
789 <!-- TMPL_INCLUDE NAME="header.inc" -->
790 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
792 <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>
794 <div id="doc3" class="yui-t2">
802 <!-- TMPL_IF name="mod" -->
803 <h1>Modify a subscription</h1>
804 <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
805 <input type="hidden" name="op" value="modsubscription" />
806 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
808 <h1>Add a subscription (Serial Holdings Record)</h1>
809 <form method="post" action="/cgi-bin/koha/serials/subscription-add.pl" name="f">
810 <input type="hidden" name="op" value="addsubscription" />
812 <input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->" />
813 <input type="hidden" name="irreg_check" value="0" />
814 <input type="hidden" name="issuesexpected1" value="0" />
816 <h2>Subscription information for subscription #<!--TMPL_VAR name="subscriptionid"--></h2>
820 <td><!-- TMPL_VAR name="loggedinusername" --></td>
823 <td><label>Supplier:</label></td>
824 <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>
827 <td><label>Biblio</label></td>
829 <input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8" />
830 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />)
831 <a href="#" onclick="Plugin(f)">Search for Biblio</a> <!--TMPL_UNLESS Name="mod"--> |
832 <a href="#" onclick="Create_biblio(f)">Create Biblio</a><!--/TMPL_UNLESS-->
836 <td><label>Call Number</label></td>
837 <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20" /></td>
842 <select name="branchcode">
843 <option value="">Any branch</option>
844 <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
846 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
849 </select> (select a branch)
853 <td><label>Notes</label></td>
854 <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td>
857 <td><label>Management Notes</label></td>
858 <td><textarea name="internalnotes" cols="30" rows="2"><!-- TMPL_VAR name="internalnotes" --></textarea></td>
861 <td>Patron alert with </td>
863 <select name="letter">
864 <option value="">un-activated</option>
865 <!-- TMPL_LOOP name="letterloop" -->
866 <!-- TMPL_IF name="selected" -->
867 <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="lettername" --></option>
869 <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="lettername" --></option>
872 </select> (select a letter & patrons will be able to "follow" this subscription and recieve a mail on every new issue)
876 <td><b>Warning:</b></td>
879 <li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
880 <li>You also must have selected a supplier if you want to ask for late issues</li>
885 <div id="subscription_form_planning">
889 <td>First Issue ETA:</td>
891 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button2" style="cursor: pointer;" alt=""/>
892 <input type="text" name="firstacquidate" value="<!-- TMPL_VAR name="firstacquidate" -->" size=13 maxlength=10 id="acqui_date" style="border-width: 0px;" />
893 <!-- both scripts for calendar must follow the input field -->
894 <script type="text/javascript">
896 inputField:"acqui_date",
897 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
902 <script type="text/javascript">
904 inputField : "acqui_date",
905 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
906 button : "acqui_date",
912 <div id="displayexample"></div>
916 <td>Frequency: (*)</td>
918 <select name="periodicity" size="1" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1);num_pattern;">
919 <option value="" selected="selected">-- please choose --</option>
920 <!-- TMPL_IF name="periodicity16" -->
921 <option value="16" selected="selected">Without Periodicity</option>
923 <option value="16">Without Periodicity</option>
925 <!-- TMPL_IF name="periodicity48" -->
926 <option value="48" selected="selected">Unknown</option>
928 <option value="48">Unknown</option>
930 <!-- TMPL_IF name="periodicity32" -->
931 <option value="32" selected="selected">Irregular</option>
933 <option value="32">Irregular</option>
936 <!-- TMPL_IF name="periodicity12" -->
937 <option value="12" selected="selected">2/day</option>
939 <option value="12">2/day</option>
941 <!-- TMPL_IF name="periodicity1" -->
942 <option value="1" selected="selected">1/day</option>
944 <option value="1">1/day</option>
946 <!-- TMPL_IF name="periodicity13" -->
947 <option value="13" selected="selected">3/week</option>
949 <option value="13">3/week</option>
951 <!-- TMPL_IF name="periodicity2" -->
952 <option value="2" selected="selected">1/week</option>
954 <option value="2">1/week</option>
956 <!-- TMPL_IF name="periodicity3" -->
957 <option value="3" selected="selected">1/2 weeks (2/month)</option>
959 <option value="3">1/2 weeks (2/months)</option>
961 <!-- TMPL_IF name="periodicity4" -->
962 <option value="4" selected="selected">1/3 weeks</option>
964 <option value="4">1/3 weeks</option>
966 <!-- TMPL_IF name="periodicity5" -->
967 <option value="5" selected="selected">1/month</option>
969 <option value="5">1/month</option>
971 <!-- TMPL_IF name="periodicity6" -->
972 <option value="6" selected="selected">1/2 months (6/year)</option>
974 <option value="6">1/2 months (6/year)</option>
976 <!-- TMPL_IF name="periodicity7" -->
977 <option value="7" selected="selected">1/3 months (1/quarter)</option>
979 <option value="7">1/3 months (1/quarter)</option>
981 <!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
982 <!-- TMPL_IF name="periodicity8" -->
983 <option value="8" selected="selected">1/quarter (seasonal)</option>
985 <option value="8">1/quarter (seasonal)</option>
988 <!-- TMPL_IF name="periodicity9" -->
989 <option value="9" selected="selected">2/years</option>
991 <option value="9">2/year</option>
993 <!-- TMPL_IF name="periodicity10" -->
994 <option value="10" selected="selected">1/year</option>
996 <option value="10">1/year</option>
998 <!-- TMPL_IF name="periodicity11" -->
999 <option value="11" selected="selected">1/2 years</option>
1001 <option value="11">1/2 years</option>
1004 Manual History :<input type="checkbox" name="manualhist" value="1" />
1008 <td>Numbering Pattern:</td>
1010 <select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
1011 <option value="" selected="selected">-- please choose --</option>
1012 <!-- TMPL_IF name="numberpattern1" -->
1013 <option value="1" selected="selected">Number</option>
1015 <option value="1">Number</option>
1017 <!-- TMPL_IF name="numberpattern2" -->
1018 <option value="2" selected="selected">Volume, Number, Issue</option>
1020 <option value="2">Volume, Number, Issue</option>
1022 <!-- TMPL_IF name="numberpattern3" -->
1023 <option value="3" selected="selected">Volume, Number</option>
1025 <option value="3">Volume, Number</option>
1027 <!-- TMPL_IF name="numberpattern4" -->
1028 <option value="4" selected="selected">Volume, Issue</option>
1030 <option value="4">Volume, Issue</option>
1032 <!-- TMPL_IF name="numberpattern5" -->
1033 <option value="5" selected="selected">Number, Issue</option>
1035 <option value="5">Number, Issue</option>
1037 <!-- TMPL_IF name="numberpattern6" -->
1038 <option value="6" selected="selected">Seasonal only</option>
1040 <option value="6">Seasonal only</option>
1042 <!-- TMPL_IF name="numberpattern8" -->
1043 <option value="8" selected="selected">Year/Number</option>
1045 <option value="8">Year/Number</option>
1047 <!-- TMPL_IF name="numberpattern7" -->
1048 <option value="7" selected="selected">None of the above</option>
1050 <option value="7">None of the above</option>
1053 <div id="more_options"></div>
1054 <div id="irregularity"></div>
1058 <td>Begins On: (*)</td>
1060 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="" />
1061 <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="beginning_date" />
1062 <!-- both scripts for calendar must follow the input field -->
1063 <script type="text/javascript">
1065 inputField : "beginning_date",
1066 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1071 <script type="text/javascript">
1073 inputField : "beginning_date",
1074 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
1075 button : "beginning_date",
1082 <td>Subscription length</td>
1084 <select name="subtype">
1085 <!-- TMPL_LOOP NAME="subtype" -->
1086 <!-- TMPL_IF NAME="selected" -->
1087 <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
1089 <option value="<!-- TMPL_VAR NAME="name" -->">
1091 <!-- TMPL_VAR NAME="name" -->
1095 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (*) (enter amount in numerals)
1099 <td>Numbering calculation</td>
1100 <td>Numbering formula: <input type="text" name="numberingmethod" id="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->" /></td>
1104 <div id="basetable" style="display: none;">
1105 <table class="small">
1115 <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
1118 <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
1121 <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
1126 <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
1127 <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
1128 <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
1131 <td>When more than</td>
1132 <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
1133 <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
1134 <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
1137 <td>inner counter</td>
1138 <td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
1139 <td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
1140 <td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
1143 <td>Set back to</td>
1144 <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
1145 <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
1146 <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
1150 <!-- TMPL_IF name="mod" -->
1156 <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
1157 <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
1158 <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
1165 <!--TMPL_IF Name="history"-->
1166 <div id="subscription_form_history">
1170 <td>Starting date:</td>
1171 <td><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (the date of the 1st subscription)</td>
1174 <td>Ending date:</td>
1175 <td><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" />(if empty : subscription still active)</td>
1178 <td>Recieved issues</td>
1179 <td><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></td>
1182 <td>Missing issues</td>
1183 <td><textarea name="missinglist" cols="60" rows="5"><!-- TMPL_VAR name="missinglist" --></textarea></td>
1186 <td>Opac's notes</td>
1187 <td><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></td>
1190 <td>Librarian notes</td>
1191 <td><textarea name="librariannote" cols="60" rows="5"><!-- TMPL_VAR name="librariannote" --></textarea></td>
1196 <!-- TMPL_IF name="mod" -->
1197 <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
1199 <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
1207 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
1210 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->