Lines 1-1450
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'help-top.inc' %] |
2 |
<title>Koha › Serials › [% IF ( modify ) %][% bibliotitle |html %] › Modify subscription[% ELSE %]New subscription[% END %]</title> |
2 |
|
3 |
[% INCLUDE 'doc-head-close.inc' %] |
3 |
<h1>Add A New Serial Subscription</h1> |
4 |
[% INCLUDE 'calendar.inc' %] |
4 |
|
|
|
5 |
<p>Subscriptions can be added by clicking the 'New' button on any bibliographic record or by visiting the Serials module and clicking 'New Subscription'</p> |
6 |
|
7 |
<p>If you are entering a new subscription from the Serials module you will be presented with a blank form (if creating new from a bibliographic record the form will include the bib info).</p> |
8 |
|
9 |
<ul> |
10 |
<li>'Librarian' field will show the logged in librarian's username</li> |
11 |
<li>'Vendor' can be found by either searching vendors entered via the Acquisitions module or entering the vendor ID number |
12 |
<ul> |
13 |
<li>Vendor information is not required</li> |
14 |
<li>In order to claim missing and late issues you need to enter vendor information</li> |
15 |
</ul> |
16 |
</li> |
17 |
<li>'Biblio' is the MARC record you'd like to link this subscription to |
18 |
<ul> |
19 |
<li>This can be done by searching for an existing record by clicking on the 'Search for Biblio' link below the boxes or by entering the bib number for a record in the first box. Only if you search with the field between the parenthesis.</li> |
20 |
</ul> |
21 |
</li> |
22 |
<li>Next you can choose whether a new item is created when receiving an issue</li> |
23 |
<li>'Location' is for the shelving location</li> |
24 |
<li>'Call Number' is for your item's call number prefix</li> |
25 |
<li>'Library' is the library that owns this subscription. |
26 |
<ul> |
27 |
<li>If more than one library subscribes to this serial you will need to create a subscription for each library</li> |
28 |
<li>This can be done easily by using the 'Edit as New (Duplicate)' option found on the subscription information page and changing only the 'Library' field</li> |
29 |
</ul> |
30 |
</li> |
31 |
<li>The 'Grace Period' is the number of days before an issue is automatically moved from 'expected' status to 'waiting' and how many days before an issue is automatically moved from 'waiting' status to 'late'</li> |
32 |
<li>Use the 'Public Note' for any notes you would like to appear in the OPAC for the patrons</li> |
33 |
<li>'Nonpublic Note' should be used for notes that are only visible to the librarians via the staff client</li> |
34 |
<li>To set up a routing list for serials, choose 'Routing List' from the 'Patron notification' field. |
35 |
<ul> |
36 |
<li>For this option to appear you need to make sure that you have a Routing List notice set up in the Notices Tool</li> |
37 |
<li>Learn more about Routing Lists later in this manual</li> |
38 |
</ul> |
39 |
</li> |
40 |
<li>The Staff and OPAC Display options allow you to control how many issues appear by default on bibliographic records in the Staff Client and the OPAC |
41 |
<ul> |
42 |
<li>If no values are entered in these fields, they will use the OPACSerialIssueDisplayCount and StaffSerialIssueDisplayCount system preference values</li> |
43 |
</ul> |
44 |
</li> |
45 |
<li>In 'First issue publication date' you want to enter the date of the issue you have in your hand, the date from which the prediction pattern will start</li> |
46 |
<li>There are several pre-defined options for the 'Frequency' of publication |
47 |
<ul> |
48 |
<li>Without periodicy: some very specific (usually high level science journals) don't have a true periodicity. When you subscribe to the title, you subscribe for 6 issues, which can arrive in 1 year... or 2... There is no regularity or known schedule.</li> |
49 |
<li>Unknown select this if none of the other choices are relevant</li> |
50 |
<li>Irregular: The journal is not "regular" but has a periodicity. You know that it comes out on January, then in October and December, it is irregular, but you know when it's going to arrive.</li> |
51 |
<li>2/day: Twice daily</li> |
52 |
<li>1/day: Daily</li> |
53 |
<li>3/week: Three times a week</li> |
54 |
<li>1/week: Weekly</li> |
55 |
<li>1/ 2 weeks: Twice monthly (fortnightly)</li> |
56 |
<li>1/ 3 weeks: Tri-weekly</li> |
57 |
<li>1/month: Monthly</li> |
58 |
<li>1/ 2 months (6/year): Bi-monthly</li> |
59 |
<li>1/ 3 months (1/quarter): Quarterly</li> |
60 |
<li>1/quarter (seasonal) : Quarterly related to seasons (ie. Summer, Autumn, Winter, Spring)</li> |
61 |
<li>2/year: Half yearly</li> |
62 |
<li>1/year: Annual</li> |
63 |
<li>1/ 2 years: Bi-annual</li> |
64 |
</ul> |
65 |
</li> |
66 |
<li>Checking the 'Manual history' box will allow you to enter serials outside the prediction pattern.</li> |
67 |
<li>'Numbering pattern' will help you determine how the numbers are printed for each issue |
68 |
<ul> |
69 |
<li>Start with the numbering on the issue you have in hand, the numbering that matches the date you entered in the 'First issue publication' field</li> |
70 |
<li>If you have chosen any 'Numbering Format' other than 'Number' in the 'Rollover at' field, enter the last issue number before the volume number changes |
71 |
<ul> |
72 |
<li>If you chose the 'Number' Numbering Format you will see 'issues expected' in which you will enter the total number of issues you expect to receive.</li> |
73 |
</ul> |
74 |
</li> |
75 |
<li>You can choose to create your own numbering pattern by choosing 'None of the above' and clicking the 'Show/Hide Advanced Pattern' button at the bottom of the form</li> |
76 |
</ul> |
77 |
</li> |
78 |
<li>'Subscription start date' is the date at which the subscription begins. This is used for setting up renewal alerts</li> |
79 |
<li>'Subscription length' is the number of issues or months in the subscription. This is also used for setting up renewal alerts</li> |
80 |
<li>'Subscription end date' should only be entered for subscriptions that have ended (if you're entering in a backlog of serials)</li> |
81 |
<li>The 'Numbering formula' is editable to match the way you'd like your numbering to print on the item record and subscription information pages</li> |
82 |
</ul> |
83 |
|
84 |
<p>Click 'Save Subscription' to save the information you have entered.</p> |
85 |
|
86 |
<p><strong>See the full documentation for Adding a Subscription in the <a href="http://manual.koha-community.org/3.8/en/serials.html#newsubscription">manual</a> (online).</strong></p> |
87 |
|
88 |
[% INCLUDE 'help-bottom.inc' %] |
5 |
|
89 |
|
6 |
<style type="text/css"> |
|
|
7 |
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ |
8 |
.yui-u li p label.widelabel { |
9 |
width: 300px; /* not enough for IE7 apparently */ |
10 |
} |
11 |
</style> |
12 |
<script type="text/javascript"> |
13 |
//<![CDATA[ |
14 |
|
15 |
// the english words used in display purposes |
16 |
var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern"), |
17 |
_("Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year")); |
18 |
var weekno_label = _("Week # "); |
19 |
var is_season = 0; |
20 |
var is_hemisphere = 1; |
21 |
var irregular_issues; // will hold irregularity object. |
22 |
|
23 |
function formatDate(myDate) { |
24 |
var d = new Array( myDate.getFullYear(), myDate.getMonth() + 1 ,myDate.getDate()); |
25 |
if(d[1].toString().length == 1) { d[1] = '0'+d[1] }; |
26 |
if(d[2].toString().length == 1) { d[2] = '0'+d[2] }; |
27 |
[% IF ( dateformat_us ) %] |
28 |
return(d[1] + '/' + d[2] + '/' + d[0]) ; |
29 |
[% ELSIF ( dateformat_metric ) %] |
30 |
return(d[2] + '/' + d[1] + '/' + d[0]) ; |
31 |
[% ELSE %] |
32 |
return(''+d[0] + '-' + d[1] + '-' + d[2]) ; |
33 |
[% END %] |
34 |
} |
35 |
|
36 |
Date.prototype.addDays = function(days) { |
37 |
this.setDate(this.getDate()+days); |
38 |
} |
39 |
|
40 |
function getWeeksArray(startDate,periodicity) { |
41 |
// returns an array of syspref-formatted dates starting at the first day of startDate's year. |
42 |
// This prediction method will not accurately predict irregularites beyond the first year. |
43 |
// FIXME : Should replace with ajax query to get the first Monday of the year so that week numbers have correct dates. |
44 |
var incr=1; |
45 |
if(periodicity==3) { // 1/2 wks |
46 |
incr=2; |
47 |
} else if(periodicity == 4) { // 1/3 wks |
48 |
incr=3; |
49 |
} |
50 |
var weeksArray = new Array; |
51 |
var jan01 = new Date(); |
52 |
jan01.setDate(1); |
53 |
jan01.setMonth(0); |
54 |
jan01.setFullYear(startDate.getFullYear()); |
55 |
for(var i=0;i<52;i++) { |
56 |
weeksArray[i] = formatDate(jan01) + ' ' + weekno_label + (i + 1); |
57 |
jan01.addDays( 7 ); |
58 |
} |
59 |
return weeksArray; |
60 |
} |
61 |
|
62 |
function YMDaToYWDa(S) { |
63 |
with (new Date(Date.UTC(S[0], S[1] - 1, S[2]))) { |
64 |
var DoW = getUTCDay(); |
65 |
setUTCDate(getUTCDate() - (DoW + 6) % 7 + 3); |
66 |
var ms = valueOf(); |
67 |
setUTCMonth(0, 4); |
68 |
var WN = Math.round((ms - valueOf()) / 604800000) + 1; |
69 |
return [getUTCFullYear(), WN, DoW == 0 ? 7 : DoW]; |
70 |
} |
71 |
} |
72 |
function dayofyear(d) { // d is a Date object |
73 |
var yn = d.getFullYear(); |
74 |
var mn = d.getMonth(); |
75 |
var dn = d.getDate(); |
76 |
var d1 = new Date(yn,0,1,12,0,0); // noon on Jan. 1 |
77 |
var d2 = new Date(yn,mn,dn,12,0,0); // noon on input date |
78 |
var ddiff = Math.round((d2-d1)/864e5); |
79 |
return ddiff+1; |
80 |
} |
81 |
|
82 |
|
83 |
// create irregularity object. |
84 |
function IrregularPattern() { |
85 |
this.months = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")); |
86 |
this.seasons = new Array(_("Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall")); |
87 |
this.daynames = new Array(_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday")); |
88 |
// create weeks irregularity selection array: |
89 |
this.firstissue = new Date(); |
90 |
this.firstissue.setDate(1); |
91 |
this.firstissue.setMonth(0); |
92 |
[% IF ( firstacquiyear ) %] // it's a mod, we already have a start date. |
93 |
this.firstissue.setFullYear( [% firstacquiyear %] ); |
94 |
[% END %] |
95 |
this.weeks = getWeeksArray(this.firstissue); |
96 |
|
97 |
this.numskipped = 0; |
98 |
// init: |
99 |
var irregular = '[% irregularity %]'; |
100 |
this.skipped = irregular.split(','); |
101 |
} |
102 |
|
103 |
IrregularPattern.prototype.update = function() { |
104 |
this.skipped= new Array; |
105 |
var cnt = 0; |
106 |
// daily periodicity, we interpret irregular array as which days of week to skip. |
107 |
// else if weekly periodicity, week numbers (starting from 01 Jan) to skip. |
108 |
// else irregular array is list of issues to skip |
109 |
var summary_str = ''; |
110 |
this.numskipped = 0; |
111 |
if(document.f.irregularity_select) { |
112 |
//$("#irregularity_select option:selected").each(...); //jquery can combine both conditionals and the for loop |
113 |
for( var i in document.f.irregularity_select.options ) { |
114 |
if( document.f.irregularity_select.options[i].selected ) { |
115 |
this.skipped[cnt] = document.f.irregularity_select.options[i].value ; |
116 |
summary_str += document.f.irregularity_select.options[i].text + "\n" ; |
117 |
cnt++; |
118 |
this.numskipped++; |
119 |
} |
120 |
} |
121 |
var summary = document.getElementById("irregularity_summary"); |
122 |
if(summary) { |
123 |
summary.value = summary_str; |
124 |
summary.rows= ( cnt > 6 ) ? cnt : 6 ; // textarea will bre resized, but not more than 6 lines will show. |
125 |
} |
126 |
} |
127 |
} |
128 |
|
129 |
IrregularPattern.prototype.irregular = function(index) { |
130 |
for( var i in this.skipped) { |
131 |
if( this.skipped[i] == index) { |
132 |
return true; |
133 |
} |
134 |
} |
135 |
return false; |
136 |
} |
137 |
|
138 |
function init_pattern() { |
139 |
irregular_issues = new IrregularPattern(); |
140 |
} |
141 |
function reset_pattern() { |
142 |
document.getElementById("numberpattern").value = ''; |
143 |
document.getElementById("irregularity").innerHTML = ''; |
144 |
init_pattern(); |
145 |
reset_num_pattern(); |
146 |
} |
147 |
|
148 |
// common pre defined number patterns |
149 |
function reset_num_pattern() { |
150 |
var patternchoice = document.getElementById("numberpattern").value; |
151 |
switch(patternchoice){ |
152 |
case "2": |
153 |
document.f.add1.value=1; |
154 |
document.f.add2.value=1; |
155 |
document.f.add3.value=1; |
156 |
document.f.every1.value=12; |
157 |
document.f.every2.value=1; |
158 |
document.f.every3.value=1; |
159 |
document.f.whenmorethan1.value=9999999; |
160 |
document.f.whenmorethan2.value=12; |
161 |
document.f.whenmorethan3.value=4; |
162 |
document.f.setto1.value=0; |
163 |
document.f.setto2.value=1; |
164 |
document.f.setto3.value=1; |
165 |
document.f.lastvalue1.value=1; |
166 |
document.f.lastvalue2.value=1; |
167 |
document.f.lastvalue3.value=1; |
168 |
document.f.numberingmethod.value=_("Vol {X}, No {Y}, Issue {Z}"); |
169 |
moreoptions(text[1],text[0],text[2]); |
170 |
display_table(0); // toggle info box on (1) or off (0) |
171 |
break; |
172 |
case "3": |
173 |
document.f.add1.value=1; |
174 |
document.f.add2.value=1; |
175 |
document.f.add3.value=''; |
176 |
document.f.every1.value=12; |
177 |
document.f.every2.value=1; |
178 |
document.f.every3.value=''; |
179 |
document.f.whenmorethan1.value=9999999; |
180 |
document.f.whenmorethan2.value=12; |
181 |
document.f.whenmorethan3.value=''; |
182 |
document.f.setto1.value=0; |
183 |
document.f.setto2.value=1; |
184 |
document.f.setto3.value=''; |
185 |
document.f.lastvalue1.value=1; |
186 |
document.f.lastvalue2.value=1; |
187 |
document.f.lastvalue3.value=''; |
188 |
document.f.numberingmethod.value=_("Vol {X}, No {Y}"); |
189 |
moreoptions(text[1],text[0]); |
190 |
display_table(0); |
191 |
break; |
192 |
case "4": |
193 |
document.f.add1.value=1; |
194 |
document.f.add2.value=1; |
195 |
document.f.add3.value=''; |
196 |
document.f.every1.value=12; |
197 |
document.f.every2.value=1; |
198 |
document.f.every3.value=''; |
199 |
document.f.whenmorethan1.value=9999999; |
200 |
document.f.whenmorethan2.value=12; |
201 |
document.f.whenmorethan3.value=''; |
202 |
document.f.setto1.value=0; |
203 |
document.f.setto2.value=1; |
204 |
document.f.setto3.value=''; |
205 |
document.f.lastvalue1.value=1; |
206 |
document.f.lastvalue2.value=1; |
207 |
document.f.lastvalue3.value=''; |
208 |
document.f.numberingmethod.value=_("Vol {X}, Issue {Y}"); |
209 |
moreoptions(text[1],text[2]); |
210 |
display_table(0); |
211 |
break; |
212 |
case "5": |
213 |
// var d = new Date(document.f.firstacquidate.value); |
214 |
// var smonth = d.getMonth(); |
215 |
document.f.add1.value=1; |
216 |
document.f.add2.value=1; |
217 |
document.f.add3.value=''; |
218 |
document.f.every1.value=12; |
219 |
document.f.every2.value=1; |
220 |
document.f.every3.value=''; |
221 |
document.f.whenmorethan1.value=9999999; |
222 |
document.f.whenmorethan2.value=12; |
223 |
document.f.whenmorethan3.value=''; |
224 |
document.f.setto1.value=0; |
225 |
document.f.setto2.value=1; |
226 |
document.f.setto3.value=''; |
227 |
document.f.numberingmethod.value=_("No {X}, Issue {Y}"); |
228 |
moreoptions(text[0],text[2]); |
229 |
display_table(0); |
230 |
break; |
231 |
case "6": |
232 |
var d = new Date(document.f.firstacquidate.value); |
233 |
var sYear = d.getFullYear(); |
234 |
moreoptions_seasons(text[15],sYear); |
235 |
var d = new Date(document.f.firstacquidate.value); |
236 |
var sYear = d.getFullYear(); |
237 |
document.f.add1.value=1; |
238 |
document.f.add2.value='1'; |
239 |
document.f.add3.value=''; |
240 |
document.f.every1.value=4; |
241 |
document.f.every2.value='1'; |
242 |
document.f.every3.value=''; |
243 |
document.f.whenmorethan1.value=9999999; |
244 |
document.f.whenmorethan2.value='4'; |
245 |
document.f.whenmorethan3.value=''; |
246 |
document.f.setto1.value=0; |
247 |
document.f.setto2.value='1'; |
248 |
document.f.setto3.value=''; |
249 |
document.f.periodicity.value='8'; |
250 |
document.f.numberingmethod.value=_("{Y} {X}"); |
251 |
moreoptions_seasons(text[15],sYear); |
252 |
document.f.lastvalue1temp.value=document.f.lastvalue1.value=sYear; |
253 |
display_table(0); |
254 |
is_season = 1; |
255 |
break; |
256 |
case "7": |
257 |
display_table(1); |
258 |
document.getElementById("more_options").innerHTML = ''; |
259 |
document.f.irreg_check.value=1; |
260 |
break; |
261 |
case "8": // Year/Number |
262 |
var d = (document.f.firstacquidate.value) ? new Date( document.f.firstacquidate.value) : new Date() ; |
263 |
var sYear = d.getFullYear(); |
264 |
document.f.add1.value=1; |
265 |
document.f.add2.value=1; |
266 |
document.f.add3.value=''; |
267 |
document.f.every1.value=12; |
268 |
document.f.every2.value=1; |
269 |
document.f.every3.value=''; |
270 |
document.f.whenmorethan1.value=9999999; |
271 |
document.f.whenmorethan2.value=12; |
272 |
document.f.whenmorethan3.value=''; |
273 |
document.f.setto1.value=0; |
274 |
document.f.setto2.value=1; |
275 |
document.f.setto3.value=''; |
276 |
document.f.lastvalue1.value=sYear; |
277 |
switch (document.f.periodicity.value){ |
278 |
case 1: |
279 |
var doy = dayofyear(d); |
280 |
document.f.lastvalue2.value=doy; |
281 |
document.f.whenmorethan2.value=365; |
282 |
break; |
283 |
case 12: |
284 |
var doy = dayofyear(d); |
285 |
document.f.lastvalue2.value=doy*2; |
286 |
document.f.whenmorethan2.value=730; |
287 |
break; |
288 |
case 2: |
289 |
case 3: |
290 |
case 4: |
291 |
var YWDa = YMDaToYWDa(d); |
292 |
document.f.lastvalue2.value=YWDA[1]/(document.f.periodicity.value-1); |
293 |
break; |
294 |
case 5: |
295 |
var smonth = d.getMonth(); |
296 |
document.f.lastvalue2.value=smonth; |
297 |
break; |
298 |
case 6: |
299 |
var smonth = d.getMonth(); |
300 |
document.f.lastvalue2.value=smonth/2; |
301 |
document.f.whenmorethan2.value=6; |
302 |
break; |
303 |
case 7: |
304 |
case 8: |
305 |
var smonth = d.getMonth(); |
306 |
document.f.lastvalue2.value=smonth/3; |
307 |
document.f.whenmorethan2.value=4; |
308 |
break; |
309 |
case 9: |
310 |
var smonth = d.getMonth(); |
311 |
document.f.lastvalue2.value=smonth/6; |
312 |
document.f.whenmorethan2.value=2; |
313 |
break; |
314 |
default: |
315 |
} |
316 |
document.f.lastvalue3.value=''; |
317 |
document.f.numberingmethod.value=_("{X} / {Y}"); |
318 |
moreoptions(text[16],text[0]); |
319 |
// document.f.lastvalue1temp.value=sYear; |
320 |
// document.f.lastvalue2temp.value=document.f.lastvalue2.value; |
321 |
display_table(0); |
322 |
break; |
323 |
default: |
324 |
document.f.add1.value=1; |
325 |
document.f.add2.value=''; |
326 |
document.f.add3.value=''; |
327 |
document.f.every1.value=1; |
328 |
document.f.every2.value=''; |
329 |
document.f.every3.value=''; |
330 |
document.f.whenmorethan1.value=9999999; |
331 |
document.f.whenmorethan2.value=''; |
332 |
document.f.whenmorethan3.value=''; |
333 |
document.f.setto1.value=0; |
334 |
document.f.setto2.value=''; |
335 |
document.f.setto3.value=''; |
336 |
document.f.lastvalue1.value=1; |
337 |
document.f.lastvalue2.value=''; |
338 |
document.f.lastvalue3.value=''; |
339 |
document.f.numberingmethod.value='{X}'; |
340 |
// moreoptions_daily_check(text[0]); |
341 |
moreoptions(text[0]); |
342 |
document.f.irreg_check.value=1; |
343 |
display_table(0); |
344 |
break; |
345 |
} |
346 |
} |
347 |
|
348 |
function display_table(n) { |
349 |
if(n==1){ |
350 |
document.getElementById("basetable").style.display = 'block'; |
351 |
} else if(n==0){ |
352 |
document.getElementById("basetable").style.display = 'none'; |
353 |
} else { |
354 |
var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ; |
355 |
document.getElementById("basetable").style.display = disp_val; |
356 |
} |
357 |
} |
358 |
|
359 |
function set_num_pattern_from_template_vars() { |
360 |
if(!document.getElementById("numberpattern")){ return false; } |
361 |
document.getElementById("numberpattern").value = '[% numberpattern %]'; |
362 |
reset_num_pattern(); |
363 |
|
364 |
document.f.add1.value='[% add1 %]'; |
365 |
document.f.add2.value='[% add2 %]'; |
366 |
document.f.add3.value='[% add3 %]'; |
367 |
document.f.every1.value='[% every1 %]'; |
368 |
document.f.every2.value='[% every2 %]'; |
369 |
document.f.every3.value='[% every3 %]'; |
370 |
document.f.whenmorethan1.value='[% whenmorethan1 %]'; |
371 |
document.f.whenmorethan2.value='[% whenmorethan2 %]'; |
372 |
document.f.whenmorethan3.value='[% whenmorethan3 %]'; |
373 |
document.f.setto1.value='[% setto1 %]'; |
374 |
document.f.setto2.value='[% setto2 %]'; |
375 |
document.f.setto3.value='[% setto3 %]'; |
376 |
document.f.lastvalue1.value='[% lastvalue1 %]'; |
377 |
document.f.lastvalue2.value='[% lastvalue2 %]'; |
378 |
document.f.lastvalue3.value='[% lastvalue3 %]'; |
379 |
document.f.numberingmethod.value='[% numberingmethod %]'; |
380 |
|
381 |
var more_strY; |
382 |
var more_strZ; |
383 |
[% IF ( add2 ) %] |
384 |
if([% add2 %] > 0){ |
385 |
more_strY="Y"; |
386 |
} |
387 |
[% END %] |
388 |
[% IF ( add3 ) %] |
389 |
if([% add3 %] > 0){ |
390 |
more_strZ="Z"; |
391 |
} |
392 |
[% END %] |
393 |
document.f.lastvalue1temp.value='[% lastvalue1 %]'; |
394 |
if(more_strY){ |
395 |
document.f.lastvalue2temp.value='[% lastvalue2 %]'; |
396 |
document.f.whenmorethan2temp.value='[% whenmorethan2 %]'; |
397 |
} |
398 |
if(more_strZ){ |
399 |
document.f.lastvalue3temp.value='[% lastvalue3 %]'; |
400 |
document.f.whenmorethan3temp.value='[% whenmorethan3 %]'; |
401 |
} |
402 |
} |
403 |
|
404 |
// a pre check with more options to see if 'number' and '1/day' are chosen |
405 |
function moreoptions_daily_check(x) { |
406 |
var periodicity = document.f.periodicity.value; |
407 |
var errortext=''; |
408 |
if(periodicity == 1){ // i.e. daily |
409 |
document.getElementById("irregularity").innerHTML = ''; |
410 |
errortext =_("Please indicate which days of the week you DO NOT expect to receive issues.")+"<br \/>"; |
411 |
for(var j=0;j<irregular_issues.daynames.length;j++){ |
412 |
errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+irregular_issues.daynames[j]+" "; |
413 |
} |
414 |
var error = errortext; |
415 |
moreoptions(x); |
416 |
document.getElementById("irregularity").innerHTML = error; |
417 |
} else { |
418 |
document.getElementById("irregularity").innerHTML = ''; |
419 |
document.getElementById("more_options").innerHTML = ''; |
420 |
moreoptions(x); |
421 |
} |
422 |
} |
423 |
|
424 |
// to dispaly the more options section |
425 |
function moreoptions(x,y,z){ |
426 |
document.getElementById("irregularity").innerHTML = ''; |
427 |
document.getElementById("more_options").innerHTML = ''; |
428 |
var textbox = ''; |
429 |
// alert("X: "+x+"Y: "+y+"Z: "+z); |
430 |
if(x){ |
431 |
textbox +="<table id='irregularity_table'>\n<tr><th> <\/th><th>"+x+"<\/th>"; |
432 |
if(y){ |
433 |
textbox +="<th>"+y+"<\/th>"; |
434 |
if(z){ |
435 |
textbox +="<th>"+z+"<\/th>"; |
436 |
} |
437 |
} |
438 |
textbox +="<\/tr>\n"; |
439 |
textbox +="<tr><th scope=\"row\">"+text[5]+"<\/td><td><input type='text' name='lastvalue1temp' id='lastvalue1temp' size='4' onkeyup='moreoptionsupdate(this)' value=\"" + document.f.lastvalue1.value + "\" /><\/td>\n"; |
440 |
if(y){ |
441 |
textbox +="<td><input type=\"text\" name=\"lastvalue2temp\" id=\"lastvalue2temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this)\" value=\"" + document.f.lastvalue2.value + "\" /><\/td>\n"; |
442 |
if(z){ |
443 |
textbox +="<td><input type=\"text\" name=\"lastvalue3temp\" id=\"lastvalue3temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this)\" value=\"" + document.f.lastvalue3.value + "\" /><\/td>\n"; |
444 |
} |
445 |
} |
446 |
textbox +="<\/tr>\n"; |
447 |
if(y){ |
448 |
textbox +="<tr><th scope=\"row\">"+text[6]+"<\/th>"; |
449 |
textbox +="<td> <\/td>\n"; |
450 |
textbox +="<td><input type=\"text\" name=\"whenmorethan2temp\" id=\"whenmorethan2temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this,1)\"><\/td>\n"; |
451 |
if(z){ |
452 |
textbox +="<td><input type=\"text\" name=\"whenmorethan3temp\" id=\"whenmorethan3temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this,1)\"><\/td>\n"; |
453 |
} |
454 |
textbox +="<\/tr>"; |
455 |
} else { |
456 |
textbox +="<tr> <td>"+_("issues expected")+"<\/td><td><input type=\"text\" name=\"issuesexpected1temp\" id=\"issuesexpected1temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this,0)\" value=\"" + document.f.issuesexpected1.value + "\" ><\/td><\/tr>"; |
457 |
} |
458 |
textbox +="<\/table>\n"; |
459 |
} |
460 |
document.getElementById("more_options").innerHTML = textbox; |
461 |
} |
462 |
|
463 |
function hemispheres(chosen){ |
464 |
var selbox = document.getElementById("season1"); |
465 |
if(selbox){ |
466 |
var selboxselected = selbox.options[selbox.selectedIndex].value; |
467 |
selbox.options.length = 0; |
468 |
|
469 |
if ( (chosen == "1") || ( ! (chosen) && is_hemisphere == 1 )) { |
470 |
selbox.options[selbox.options.length] = new Option(text[11],'1'); |
471 |
selbox.options[selbox.options.length] = new Option(text[12],'2'); |
472 |
selbox.options[selbox.options.length] = new Option(text[13],'3'); |
473 |
selbox.options[selbox.options.length] = new Option(text[14],'4'); |
474 |
is_hemisphere = 1; |
475 |
selbox.options[selboxselected-1].selected = true; |
476 |
} |
477 |
|
478 |
if ( (chosen == "2") || ( ! (chosen) && is_hemisphere == 2 )) { |
479 |
selbox.options[selbox.options.length] = new Option(text[13],'1'); |
480 |
selbox.options[selbox.options.length] = new Option(text[10],'2'); |
481 |
selbox.options[selbox.options.length] = new Option(text[11],'3'); |
482 |
selbox.options[selbox.options.length] = new Option(text[12],'4'); |
483 |
is_hemisphere = 2; |
484 |
selbox.options[selboxselected-1].selected = true; |
485 |
} |
486 |
} |
487 |
} |
488 |
|
489 |
// to display the more options section for seasons |
490 |
function moreoptions_seasons(x,y){ |
491 |
// x = 'Season'. y = 'Year'. |
492 |
document.getElementById("irregularity").innerHTML = ''; |
493 |
document.getElementById("more_options").innerHTML = ''; |
494 |
var textbox = ''; |
495 |
//alert("X: "+x+"Year: "+y); |
496 |
if(x){ |
497 |
var hemi_select = parseInt('[% hemisphere %]'); |
498 |
textbox +="<li><label for=\"hemisphere\">"+ text[7] +"<\/label><select name=\"hemisphere\" id=\"hemisphere\" onchange=\"hemispheres(this.options[this.selectedIndex].value)\">"; |
499 |
for(var i = 1; i <= 2; i++){ |
500 |
textbox +="<option value='"+i+"'"; |
501 |
if(i == hemi_select){ |
502 |
textbox += " selected " |
503 |
} |
504 |
textbox +=">"+text[i+7]+"<\/option>"; |
505 |
} |
506 |
textbox +="<\/li>\n"; |
507 |
textbox +="<table id=\"seasonal_irregularity\"><tr><th> <\/th><th>"+x+"<\/th>"; |
508 |
textbox +="<th>"+text[16]+"<\/th>"; |
509 |
textbox +="<\/tr>\n"; |
510 |
textbox +="<tr><th scope=\"row\">"+text[5]+"<\/th><td><select name=\"lastvalue2temp\" id=\"lastvalue2temp\" id=\"season1\" onchange=\"moreoptionsupdate(this)\">"; |
511 |
for(var j = 1; j <= 4; j++){ |
512 |
textbox +="<option value='"+j+"'>"+text[j+9]+"<\/option>"; |
513 |
} |
514 |
textbox +="<\/select><\/td>"; |
515 |
var isyr = irregular_issues.firstissue; |
516 |
textbox += "<td>" + irregular_issues.firstissue.getFullYear() + "<\/td><\/tr>\n"; |
517 |
textbox +="<tr><th scope=\"row\">"+text[6]+"<\/th>"; |
518 |
textbox +="<td><input type=\"text\" name=\"whenmorethan2temp\" id=\"whenmorethan2temp\" size=\"4\" onkeyup=\"moreoptionsupdate(this,1)\"><\/td>\n"; |
519 |
textbox +="<\/tr><\/table>\n"; |
520 |
} |
521 |
document.getElementById("more_options").innerHTML = textbox; |
522 |
} |
523 |
|
524 |
function irregularity_check(){ |
525 |
document.f.irreg_check.value = 1; // Irregularity button now pushed |
526 |
var periodicity = document.f.periodicity.value; |
527 |
var rollover = document.f.issuesexpected1.value; |
528 |
if( (document.f.whenmorethan2) && ( document.f.whenmorethan2.value > 0) ){ |
529 |
rollover = document.f.whenmorethan2.value; |
530 |
} |
531 |
if((document.f.whenmorethan3) && document.f.whenmorethan3.value > 0 ){ |
532 |
// FIXME: Irregularity check assumes that the full prediction pattern repeats each year. |
533 |
// In cases where the outermost periodicity is > 1 year, |
534 |
// e.g. where a volume spans two years, the irregularity check will be incorrect, |
535 |
// but you can safely ignore the check, submit the form, and the prediction pattern should be correct. |
536 |
// a way to distinguish between these two cases is needed. |
537 |
rollover = document.f.whenmorethan3.value * document.f.whenmorethan2.value; |
538 |
} |
539 |
var error=''; |
540 |
var toobig; |
541 |
var expected; |
542 |
var errortext = "<b>"+_("Warning irregularity detected")+"</b><br \/>"; |
543 |
switch(periodicity){ |
544 |
case "12": |
545 |
if(rollover < 730) expected =730; |
546 |
if(rollover > 730) { |
547 |
expectedover=730; |
548 |
toobig=1; |
549 |
} |
550 |
break; |
551 |
case "1": |
552 |
if(rollover < 365) expected =365; |
553 |
if(rollover > 365) { |
554 |
expectedover=365; |
555 |
toobig=1; |
556 |
} |
557 |
break; |
558 |
case "2": |
559 |
if(rollover < 52) expected =52; |
560 |
if(rollover > 52){ |
561 |
expectedover=52; |
562 |
toobig=1; |
563 |
} |
564 |
break; |
565 |
case "3": |
566 |
if(rollover < 26) expected =26; |
567 |
if(rollover > 26){ |
568 |
expectedover=26; |
569 |
toobig=1; |
570 |
} |
571 |
break; |
572 |
case "4": |
573 |
if(rollover < 17) expected =17; |
574 |
if(rollover > 17){ |
575 |
expectedover=17; |
576 |
toobig=1; |
577 |
} |
578 |
break; |
579 |
case "5": |
580 |
if(rollover < 12) expected =12; |
581 |
if(rollover > 12){ |
582 |
expectedover=12; |
583 |
toobig=1; |
584 |
} |
585 |
break; |
586 |
case "6": |
587 |
if(rollover < 6) expected =6; |
588 |
if(rollover > 6){ |
589 |
expectedover=6; |
590 |
toobig=1; |
591 |
} |
592 |
break; |
593 |
case "7": |
594 |
if(rollover < 4) expected =4; |
595 |
if(rollover > 4){ |
596 |
expectedover=4; |
597 |
toobig=1; |
598 |
} |
599 |
break; |
600 |
case "8": |
601 |
if(rollover < 4) expected =4; |
602 |
if(rollover > 4){ |
603 |
expectedover=4; |
604 |
toobig=1; |
605 |
} |
606 |
break; |
607 |
case "9": |
608 |
if(rollover < 2) expected =2; |
609 |
if(rollover > 2){ |
610 |
expectedover=2; |
611 |
toobig=1; |
612 |
} |
613 |
break; |
614 |
case "10": |
615 |
if(rollover < 1) expected =1; |
616 |
if(rollover > 1){ |
617 |
expectedover=1; |
618 |
toobig=1; |
619 |
} |
620 |
break; |
621 |
default: |
622 |
break; |
623 |
} |
624 |
if(expected){ |
625 |
if(expected == 365 || expected==730){ // what about leap years ? |
626 |
// FIXME: We interpret irregularity as which days per week for periodicity==1. |
627 |
// We need two cases: one in which we're published n days/week, in which case irregularity should be per week, |
628 |
// and a regular daily pub, where irregularity should be per year. |
629 |
errortext += _("Please indicate which days of the week you DO NOT expect to receive issues.")+"<br \/>"; |
630 |
} else { |
631 |
errortext +=expected+_(" issues expected, ")+rollover+_(" were entered.")+"<br \/>"+_("Please indicate which date(s) an issue is not expected")+"<br \/>"; |
632 |
irregular_issues.numskipped = expected - rollover; |
633 |
} |
634 |
errortext +="<select multiple id=\"irregularity_select\" name=\"irregularity_select\" onchange=\"irregular_issues.update();\">\n"; |
635 |
errortext +=irregular_options(periodicity); |
636 |
errortext += "<\/select>\n <textarea rows=\"6\" width=\"18\" id=\"irregularity_summary\" name=\"irregularity_summary\" value=\"foo\"><\/textarea>"; |
637 |
error=errortext; |
638 |
} |
639 |
if(toobig){ |
640 |
errortext +=expectedover+_(" issues expected, ")+rollover+_(" were entered")+"<p class=\"warning\">"+_("You seem to have indicated more issues per year than expected.<\/p>"); |
641 |
error=errortext; |
642 |
} |
643 |
if(error.length ==0){ |
644 |
error=_("No irregularities noticed"); |
645 |
} |
646 |
display_example(expected); |
647 |
document.getElementById("irregularity").innerHTML = error; |
648 |
irregular_issues.update(); |
649 |
} |
650 |
|
651 |
function irregular_options(periodicity){ |
652 |
var titles; |
653 |
var count; |
654 |
var errortext=''; |
655 |
var numberpattern = document.getElementById('numberpattern').value; |
656 |
if(periodicity == 1) { |
657 |
expected = 7; |
658 |
titles = irregular_issues.daynames; |
659 |
count = 1; |
660 |
} |
661 |
if(periodicity == 2 || periodicity == 3 || periodicity == 4) { |
662 |
titles = irregular_issues.weeks; |
663 |
count = 1; |
664 |
if(periodicity==3) { // 1/2 wks |
665 |
expected = 26; |
666 |
} else if(periodicity == 4) { // 1/3 wks |
667 |
expected = 17; |
668 |
} else { |
669 |
expected = 52; |
670 |
} |
671 |
} |
672 |
if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) { |
673 |
if(periodicity == 8 && numberpattern==8) { |
674 |
is_season = 1; // setting up from edit page |
675 |
} |
676 |
if(is_season){ |
677 |
titles = irregular_issues.seasons; |
678 |
expected = 4; |
679 |
if(is_hemisphere == 2){ |
680 |
count = 2; |
681 |
} else { |
682 |
count = 1; |
683 |
} |
684 |
} else { |
685 |
titles = irregular_issues.months; |
686 |
expected = 12; |
687 |
count = 1; |
688 |
} |
689 |
} |
690 |
if( !expected) { |
691 |
return ''; // don't know how to deal with irregularity. |
692 |
} |
693 |
for(var j=0;j<expected;j++){ // rch - changed frrom (1..expected). |
694 |
if(isArray(titles)){ |
695 |
if(count>expected){ |
696 |
count = count-expected; |
697 |
} |
698 |
if(is_season && is_hemisphere == 1){ |
699 |
errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n"; |
700 |
// alert("value: "+((count*3)-2)+" title: "+titles[j]); |
701 |
} else if(is_season && is_hemisphere == 2){ |
702 |
errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n"; |
703 |
// alert("value: "+((count*3)-2)+" title: "+titles[j-1]); |
704 |
} else { // all non-seasonal periodicities: |
705 |
var incr=1; // multiplier for ( 1/n weeks) patterns; in this case the irreg calc relies on the week# , not the issue#. |
706 |
if(periodicity==3) { // 1/2 wks |
707 |
incr=2; |
708 |
} else if(periodicity == 4) { // 1/3 wks |
709 |
incr=3; |
710 |
} |
711 |
errortext += "<option value='" + (1+j*incr) ; |
712 |
if(irregular_issues.irregular(1+incr*j)) { |
713 |
errortext += "' selected='selected" ; |
714 |
} |
715 |
errortext += "'>"+titles[incr*j]+"<\/option>\n"; |
716 |
} |
717 |
count++; |
718 |
} else { |
719 |
errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n"; |
720 |
} |
721 |
} |
722 |
return errortext; |
723 |
} |
724 |
|
725 |
|
726 |
function display_example(expected){ |
727 |
var startfrom1 = parseInt(document.f.lastvalue1.value); |
728 |
var startfrom2 = parseInt(document.f.lastvalue2.value); |
729 |
var startfrom3 = parseInt(document.f.lastvalue3.value); |
730 |
var every1 = parseInt(document.f.every1.value); |
731 |
var every2 = parseInt(document.f.every2.value); |
732 |
var every3 = parseInt(document.f.every3.value); |
733 |
var numberpattern = document.f.numberingmethod.value; |
734 |
var whenmorethan2 = parseInt(document.f.whenmorethan2.value); |
735 |
var whenmorethan3 = parseInt(document.f.whenmorethan3.value); |
736 |
var setto2 = parseInt(document.f.setto2.value); |
737 |
var setto3 = parseInt(document.f.setto3.value); |
738 |
var displaytext = _("Based on the information entered, the Numbering Pattern will look like this: ") + "<br \/><ul class=\"numpattern_preview\">"; |
739 |
if(startfrom3>0){ |
740 |
var count=startfrom3-1; |
741 |
var count2=startfrom2; |
742 |
for(var i = 0 ; i < 12; i++){ |
743 |
if(count>=whenmorethan3){ |
744 |
count=setto3; |
745 |
if(count2>=whenmorethan2){ |
746 |
startfrom1++; |
747 |
count2=setto2; |
748 |
} else { |
749 |
count2++; |
750 |
} |
751 |
} else { |
752 |
count++; |
753 |
} |
754 |
displaytext += '<li>' + numberpattern.replace(/{Z}/,count) + '<\/li>\n'; |
755 |
displaytext = displaytext.replace(/{Y}/,count2); |
756 |
displaytext = displaytext.replace(/{X}/,startfrom1); |
757 |
|
758 |
} |
759 |
} |
760 |
if(startfrom2>0 && !startfrom3){ |
761 |
var count=startfrom2-1; |
762 |
for(var i=0;i<12;i++){ |
763 |
if(count>=whenmorethan2){ |
764 |
startfrom1++; |
765 |
count=setto2; |
766 |
} else { |
767 |
count++; |
768 |
} |
769 |
|
770 |
if(is_season){ |
771 |
if(is_hemisphere == 2){ |
772 |
if(count == 1) { |
773 |
displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n'; |
774 |
} else { |
775 |
displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n'; |
776 |
} |
777 |
} else { |
778 |
displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n'; |
779 |
} |
780 |
} else { |
781 |
displaytext += numberpattern.replace(/{Y}/,count)+'\n'; |
782 |
} |
783 |
displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n'; |
784 |
} |
785 |
} |
786 |
if(startfrom1>0 && !startfrom2 && !startfrom3){ |
787 |
var offset=eval(document.f.issuesexpected1.value); |
788 |
if (!offset){ |
789 |
offset = 12 |
790 |
} |
791 |
for(var i=startfrom1;i<(startfrom1+offset);i+=every1){ |
792 |
displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n'; |
793 |
} |
794 |
} |
795 |
// displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>"; |
796 |
document.getElementById("displayexample").innerHTML = displaytext; |
797 |
} |
798 |
|
799 |
function isArray(obj) { |
800 |
if (obj.constructor.toString().indexOf("Array") == -1) |
801 |
return false; |
802 |
else |
803 |
return true; |
804 |
} |
805 |
|
806 |
function moreoptionsupdate(inputfield,rollover){ |
807 |
fieldname = inputfield.name; |
808 |
// find parent element in base table by stripping 'temp' from element name. |
809 |
basefield = document.getElementById(fieldname.slice(0,-4)); |
810 |
var fieldnumber = fieldname.slice(-5,-4); |
811 |
|
812 |
basefield.value = inputfield.value; |
813 |
var patternchoice = document.getElementById("numberpattern").value; |
814 |
switch(patternchoice){ |
815 |
case "2": |
816 |
case "4": |
817 |
case "5": |
818 |
case "8": // Year, Number. -- Why not just use Vol, Number withvol==year?? |
819 |
// FIXME: this my conflict with innerloop calc below. |
820 |
if (document.f.lastvalue2temp.value > 0){document.f.innerloop1.value = document.f.lastvalue2temp.value - 1;} |
821 |
break; |
822 |
} |
823 |
if(basefield.name.slice(0,-1) == 'lastvalue' || 'whenmorethan' ) { |
824 |
// The enumeration string is held in a positional numeral notation with three positions, X,Y,Z. |
825 |
// The last values lastvalue1, lastvalue2,lastvalue3 should match the last received serial's X,Y,Z enumeration. |
826 |
// make array indexes start with 1 for consistency with variable names. |
827 |
var innerloop = new Array( undefined, document.getElementById('innerloop1'), document.getElementById('innerloop2'), document.getElementById('innerloop3') ); |
828 |
var lastvalue = new Array( undefined, document.getElementById('lastvalue1').value *1 , document.getElementById('lastvalue2').value *1 , document.getElementById('lastvalue3').value *1 ); |
829 |
var every = new Array( undefined, document.getElementById('every1').value *1 , document.getElementById('every2').value *1 , document.getElementById('every3').value *1 ); |
830 |
var add = new Array( undefined, document.getElementById('add1').value *1 , document.getElementById('add2').value *1 , document.getElementById('add3').value *1 ); |
831 |
var whenmorethan = new Array( undefined, document.getElementById('whenmorethan1').value *1 , document.getElementById('whenmorethan2').value *1 , document.getElementById('whenmorethan3').value *1 ); |
832 |
|
833 |
if(rollover){ |
834 |
// calculate rollover for higher level of periodicity. |
835 |
// if there are two levels of periodicity, (e.g. vol{X},num{Y},issue{Z}, then every1=every2*whenmorethan2 / add2 . |
836 |
for(var N=3;N>1;N--){ |
837 |
if( add[N] > 0){ |
838 |
var addN = (add[N]) ? add[N] : 1 ; |
839 |
var everyN = (document.getElementById('every'+N)) ? document.getElementById('every'+N).value : 1 ; |
840 |
document.getElementById('every'+(N-1)).value = whenmorethan[N] * everyN / addN ; |
841 |
} |
842 |
} |
843 |
} |
844 |
innerloop[3].value = ( every[3] > 1 ) ? lastvalue[3] % every[3] : 0 ; |
845 |
innerloop[2].value = ( every[2] > 1 ) ? lastvalue[3] - 1 : 0 ; |
846 |
innerloop[1].value = ( every[1] > 1 ) ? |
847 |
( whenmorethan[3] > 0 ) ? (lastvalue[2] - 1) * every[2] + 1* innerloop[2].value |
848 |
: lastvalue[2] - 1 |
849 |
: 0 ; |
850 |
} |
851 |
//FIXME : add checks for innerloop || lastvalue .gt. rollover |
852 |
} |
853 |
|
854 |
|
855 |
function check_input(e){ |
856 |
var unicode=e.charCode? e.charCode : e.keyCode |
857 |
if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete |
858 |
if (unicode<48||unicode>57) { // if not a number |
859 |
alert(_("Needs to be entered in digit form -eg 10")); |
860 |
return false // disable key press |
861 |
} |
862 |
} |
863 |
} |
864 |
|
865 |
function addbiblioPopup(biblionumber) { |
866 |
var destination = "/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup"; |
867 |
if(biblionumber){ destination += "&biblionumber="+biblionumber; } |
868 |
window.open(destination,'AddBiblioPopup','width=1024,height=768,toolbar=no,scrollbars=yes'); |
869 |
} |
870 |
|
871 |
function Plugin(f) |
872 |
{ |
873 |
window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes'); |
874 |
} |
875 |
|
876 |
function FindAcqui(f) |
877 |
{ |
878 |
window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes'); |
879 |
} |
880 |
|
881 |
function Find_ISSN(f) |
882 |
{ |
883 |
window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes'); |
884 |
} |
885 |
|
886 |
|
887 |
function Check(f) { |
888 |
if (f.aqbooksellerid.value.length==0) { |
889 |
input_box = confirm(_("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor")); |
890 |
if (input_box==true) { |
891 |
} |
892 |
else { |
893 |
return false; |
894 |
} |
895 |
} |
896 |
if (f.biblionumber.value.length==0) { |
897 |
alert(_("You must choose or create a biblio")); |
898 |
} else if(f.startdate.value.length != 0 && f.sublength.value > 0) { |
899 |
if (f.irreg_check.value == 1) { |
900 |
document.f.submit(); |
901 |
} else { |
902 |
if(f.numbering_pattern.value == ''){ |
903 |
alert(_("Please choose a numbering pattern")); |
904 |
} else { |
905 |
alert(_("Please check for irregularity by clicking 'Test Prediction Pattern'")); |
906 |
} |
907 |
} |
908 |
} else { |
909 |
alert(_("You must choose a start date and a subscription length")); |
910 |
} |
911 |
if(irregular_issues.numskipped < irregular_issues.skipped.length ) { |
912 |
alert(_("You have not accounted for all missing issues.")); |
913 |
} |
914 |
return false; |
915 |
} |
916 |
|
917 |
$(document).ready(function() { |
918 |
init_pattern(); |
919 |
|
920 |
[% IF ( history ) %] $("#subscription_form_history").show();[% END %] |
921 |
$("#cancel_manual_history").click(function(){ |
922 |
$("#subscription_form_history").hide(); |
923 |
$("#manuallist").attr("checked",""); |
924 |
}); |
925 |
$("#manuallist").click( function(){ |
926 |
if($(this).attr("checked")){ |
927 |
$("#subscription_form_history").show(); |
928 |
} else { |
929 |
$("#subscription_form_history").hide(); |
930 |
} |
931 |
} |
932 |
); |
933 |
// $(".widelabel").attr("width", "300px"); // labels stay skinny in IE7 anyway. |
934 |
[% IF ( modify ) %] |
935 |
set_num_pattern_from_template_vars(); |
936 |
[% IF ( hemisphere ) %] |
937 |
is_hemisphere = [% hemisphere %] ; |
938 |
hemispheres(); |
939 |
[% END %] |
940 |
[% END %] |
941 |
[% IF ( irregularity ) %] |
942 |
irregularity_check(); |
943 |
[% END %] |
944 |
$('#numberpattern').change( function() { |
945 |
reset_num_pattern(); |
946 |
}); |
947 |
|
948 |
var node; |
949 |
[% FOREACH field IN dont_export_field_loop %] |
950 |
node = $("#[% field.fieldid %]"); |
951 |
if ( $(node).is('input') || $(node).is('textarea') ) { |
952 |
$(node).val(""); |
953 |
} else if ( $(node).is('select') ) { |
954 |
$(node).find("option:first").attr('selected','selected'); |
955 |
} |
956 |
[% END %] |
957 |
}); |
958 |
//]]> |
959 |
</script> |
960 |
</head> |
961 |
<body id="ser_subscription-add" class="ser"> |
962 |
[% INCLUDE 'header.inc' %] |
963 |
[% INCLUDE 'serials-search.inc' %] |
964 |
|
965 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]"><i>[% bibliotitle |html %]</i></a> › Modify subscription[% ELSE %]New subscription[% END %]</div> |
966 |
|
967 |
<div id="doc3" class="yui-t7"> |
968 |
|
969 |
<div id="bd"> |
970 |
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %]</h1> |
971 |
<div class="yui-g"> |
972 |
<form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl"> |
973 |
[% IF ( modify ) %] |
974 |
<input type="hidden" name="op" value="modsubscription" /> |
975 |
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" /> |
976 |
[% ELSE %] |
977 |
<input type="hidden" name="op" value="addsubscription" /> |
978 |
[% END %] |
979 |
<input type="hidden" name="user" value="[% loggedinusername %]" /> |
980 |
<input type="hidden" name="irreg_check" value="0" /> |
981 |
<input type="hidden" name="issuesexpected1" id="issuesexpected1" value="0" /> |
982 |
|
983 |
<div class="yui-u first"> |
984 |
<fieldset id="subscription_add_information" class="rows"> |
985 |
<legend>Subscription details</legend> |
986 |
<ol> |
987 |
[% IF ( subscriptionid ) %] |
988 |
<li><span class="label">Subscription #</span> [% subscriptionid %]</li> |
989 |
[% END %] |
990 |
<li> |
991 |
<label for="aqbooksellerid">Vendor: </label> |
992 |
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a> |
993 |
</li> |
994 |
<li> |
995 |
<label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Biblio:</label> |
996 |
|
997 |
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" /> |
998 |
(<input type="text" name="title" value="[% bibliotitle %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span> |
999 |
<div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for Biblio</a> |
1000 |
[% IF ( CAN_user_editcatalogue ) %] |
1001 |
[% IF ( modify ) %] |
1002 |
| <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit biblio</a> |
1003 |
[% ELSE %] |
1004 |
| <a href="#" onclick="addbiblioPopup(); return false;">Create Biblio</a> |
1005 |
[% END %] |
1006 |
[% END %] |
1007 |
</div> |
1008 |
|
1009 |
</li> |
1010 |
<li class="radio"> |
1011 |
[% IF ( serialsadditems ) %] |
1012 |
<p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p> |
1013 |
<p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial </label></p> |
1014 |
[% ELSE %] |
1015 |
<p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p> |
1016 |
<p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial</label></p> |
1017 |
[% END %] |
1018 |
</li> |
1019 |
<li> |
1020 |
<label for="branchcode">Library:</label> |
1021 |
|
1022 |
<select name="branchcode" id="branchcode" style="width: 20em;"> |
1023 |
[% UNLESS ( Independantbranches ) %]<option value="">None</option>[% END %] |
1024 |
[% FOREACH branchloo IN branchloop %][% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> |
1025 |
[% ELSE %] |
1026 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
1027 |
[% END %] |
1028 |
[% END %] |
1029 |
</select> (select a library) |
1030 |
|
1031 |
</li> |
1032 |
<li> |
1033 |
<label for="location">Location:</label> |
1034 |
<select name="location" id="location"> |
1035 |
<option value="">None</option> |
1036 |
[% FOREACH locations_loo IN locations_loop %][% IF ( locations_loo.selected ) %]<option value="[% locations_loo.authorised_value %]" selected="selected">[% locations_loo.lib %]</option>[% ELSE %]<option value="[% locations_loo.authorised_value %]">[% locations_loo.lib %]</option>[% END %][% END %] |
1037 |
</select> |
1038 |
</li> |
1039 |
<li> |
1040 |
<label for="callnumber">Call number:</label> |
1041 |
<input type="text" name="callnumber" id="callnumber" value="[% callnumber %]" size="20" /> |
1042 |
</li> |
1043 |
<li> |
1044 |
<label for="graceperiod">Grace period:</label> <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod %]" size="5"/> day(s) |
1045 |
</li> |
1046 |
<li> |
1047 |
<label for="notes">OPAC note:</label> |
1048 |
<textarea name="notes" id="notes" cols="30" rows="2">[% notes %]</textarea> |
1049 |
</li> |
1050 |
<li> |
1051 |
<label for="internalnotes">Nonpublic note:</label> |
1052 |
<textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes %]</textarea> |
1053 |
</li> |
1054 |
<li> |
1055 |
|
1056 |
[% IF ( letterloop ) %] |
1057 |
<label for="letter">Patron notification: </label> |
1058 |
<select name="letter" id="letter"> |
1059 |
<option value="">None</option> |
1060 |
[% FOREACH letterloo IN letterloop %] |
1061 |
[% IF ( letterloo.selected ) %] |
1062 |
<option value="[% letterloo.value %]" selected="selected">[% letterloo.lettername %]</option> |
1063 |
[% ELSE %] |
1064 |
<option value="[% letterloo.value %]">[% letterloo.lettername %]</option> |
1065 |
[% END %] |
1066 |
[% END %] |
1067 |
</select> |
1068 |
<div class="hint">Select a notice and subscribers will be notified when new issues are received.</div> |
1069 |
[% ELSE %] |
1070 |
<span class="label">Patron notification: </span> |
1071 |
<div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div> |
1072 |
[% END %] |
1073 |
</li> |
1074 |
<li> |
1075 |
<label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label> |
1076 |
<input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount %]" size="4"/> |
1077 |
</li> |
1078 |
<li> |
1079 |
<label class="widelabel" for="opacdisplaycount">Number of issues to display in OPAC: </label> |
1080 |
<input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount %]" size="4"/> |
1081 |
</li> |
1082 |
</ol> |
1083 |
</fieldset> |
1084 |
</div> |
1085 |
|
1086 |
<div id="subscription_form_history" class="yui-u" style="display:none"> |
1087 |
<div><h3 style="display:inline">Subscription history</h3> <a href="#" id="cancel_manual_history">[cancel manual history]</a></div> |
1088 |
<p>Hint: you can update the serial history manually. This can be useful for an old subscription or to clean the existing history. Modify these fields with care, as future serial receive will continue to update them automatically.</p> |
1089 |
<fieldset class="rows"> |
1090 |
<ol> |
1091 |
<li> |
1092 |
<label for="histstartdate">Subscription start date</label> |
1093 |
<input type="text" name="histstartdate" id="histstartdate" value="[% histstartdate %]" /><div class="hint"> (start date of the 1st subscription)</div> |
1094 |
</li> |
1095 |
<li> |
1096 |
<label for="histenddate">Subscription end date</label> |
1097 |
<input type="text" name="histenddate" id="histenddate" value="[% histenddate %]" /> <div class="hint">(if empty, subscription is still active)</div> |
1098 |
</li> |
1099 |
<li> |
1100 |
<label for="recievedlist">Received issues</label> |
1101 |
<textarea name="recievedlist" id="recievedlist" cols="60" rows="5">[% recievedlist %]</textarea> |
1102 |
</li> |
1103 |
<li> |
1104 |
<label for="missinglist">Missing issues</label> |
1105 |
<textarea name="missinglist" id="missinglist" cols="60" rows="5">[% missinglist %]</textarea> |
1106 |
</li> |
1107 |
<li> |
1108 |
<label for="opacnote">Note for OPAC</label> |
1109 |
<textarea name="opacnote" id="opacnote" cols="60" rows="5">[% opacnote %]</textarea> |
1110 |
</li> |
1111 |
<li> |
1112 |
<label for="librariannote">Note for staff</label> |
1113 |
<textarea name="librariannote" id="librariannote" cols="60" rows="5">[% librariannote %]</textarea> |
1114 |
</li> |
1115 |
</ol> |
1116 |
</fieldset> |
1117 |
<fieldset class="action"><input type="submit" value="Save subscription history" /></fieldset> |
1118 |
</div> |
1119 |
|
1120 |
<div class="yui-g"> |
1121 |
<div id="subscription_form_planning"> |
1122 |
<fieldset class="rows"> |
1123 |
<legend>Serials planning</legend> |
1124 |
<ol> |
1125 |
<li> |
1126 |
<label for="acqui_date"> First issue publication date:</label> |
1127 |
[% UNLESS ( modify ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %] |
1128 |
[% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" disabled="disabled" /> |
1129 |
[% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" />[% END %] |
1130 |
</li> |
1131 |
[% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label> |
1132 |
<img src="[% themelang %]/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" /> |
1133 |
<input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" /> |
1134 |
</li>[% END %] |
1135 |
|
1136 |
<li><!-- both scripts for calendar must follow the input field --> |
1137 |
<script type="text/javascript"> |
1138 |
Calendar.setup({ |
1139 |
inputField : "[% IF ( modify ) %]next_[% END %]acqui_date", |
1140 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1141 |
button : "[% IF ( modify ) %]next_[% END %]acqui_button", |
1142 |
align : "Tl", |
1143 |
onUpdate : function(cal) { |
1144 |
irregular_issues.weeks = getWeeksArray(cal.date); |
1145 |
irregular_issues.firstissue = cal.date; |
1146 |
if(document.irregularity_summary) { |
1147 |
irregular_issues.update(); |
1148 |
} |
1149 |
if(document.getElementById("seasonal_irregularity")) { |
1150 |
moreoptions_seasons(text[15]); |
1151 |
} |
1152 |
} |
1153 |
}); |
1154 |
Calendar.setup({ |
1155 |
inputField : "[% IF ( modify ) %]next_[% END %]acqui_date", |
1156 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1157 |
button : "[% IF ( modify ) %]next_[% END %]acqui_date", |
1158 |
align : "Tl", |
1159 |
onUpdate : function(cal) { irregular_issues.weeks = getWeeksArray(cal.date); |
1160 |
irregular_issues.firstissue = cal.date; |
1161 |
if(document.irregularity_summary) { |
1162 |
irregular_issues.update(); |
1163 |
} |
1164 |
if(document.getElementById("seasonal_irregularity")) { |
1165 |
moreoptions_seasons(text[15]); |
1166 |
} |
1167 |
} |
1168 |
}); |
1169 |
</script> |
1170 |
<label for="periodicity" class="required">Frequency:</label> |
1171 |
|
1172 |
<select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();"> |
1173 |
<option value="" selected="selected">-- please choose --</option> |
1174 |
[% IF ( periodicity16 ) %] |
1175 |
<option value="16" selected="selected">Without periodicity</option> |
1176 |
[% ELSE %] |
1177 |
<option value="16">Without periodicity</option> |
1178 |
[% END %] |
1179 |
[% IF ( periodicity48 ) %] |
1180 |
<option value="48" selected="selected">Unknown</option> |
1181 |
[% ELSE %] |
1182 |
<option value="48">Unknown</option> |
1183 |
[% END %] |
1184 |
[% IF ( periodicity32 ) %] |
1185 |
<option value="32" selected="selected">Irregular</option> |
1186 |
[% ELSE %] |
1187 |
<option value="32">Irregular</option> |
1188 |
[% END %] |
1189 |
|
1190 |
[% IF ( periodicity12 ) %] |
1191 |
<option value="12" selected="selected">2/day</option> |
1192 |
[% ELSE %] |
1193 |
<option value="12">2/day</option> |
1194 |
[% END %] |
1195 |
[% IF ( periodicity1 ) %] |
1196 |
<option value="1" selected="selected">daily (n/week)</option> |
1197 |
[% ELSE %] |
1198 |
<option value="1">daily (n/week)</option> |
1199 |
[% END %] |
1200 |
[% IF ( periodicity2 ) %] |
1201 |
<option value="2" selected="selected">1/week</option> |
1202 |
[% ELSE %] |
1203 |
<option value="2">1/week</option> |
1204 |
[% END %] |
1205 |
[% IF ( periodicity3 ) %] |
1206 |
<option value="3" selected="selected">1/2 weeks </option> |
1207 |
[% ELSE %] |
1208 |
<option value="3">1/2 weeks </option> |
1209 |
[% END %] |
1210 |
[% IF ( periodicity4 ) %] |
1211 |
<option value="4" selected="selected">1/3 weeks</option> |
1212 |
[% ELSE %] |
1213 |
<option value="4">1/3 weeks</option> |
1214 |
[% END %] |
1215 |
[% IF ( periodicity5 ) %] |
1216 |
<option value="5" selected="selected">1/month</option> |
1217 |
[% ELSE %] |
1218 |
<option value="5">1/month</option> |
1219 |
[% END %] |
1220 |
[% IF ( periodicity6 ) %] |
1221 |
<option value="6" selected="selected">1/2 months (6/year)</option> |
1222 |
[% ELSE %] |
1223 |
<option value="6">1/2 months (6/year)</option> |
1224 |
[% END %] |
1225 |
[% IF ( periodicity7 ) %] |
1226 |
<option value="7" selected="selected">1/3 months (1/quarter)</option> |
1227 |
[% ELSE %] |
1228 |
<option value="7">1/3 months (1/quarter)</option> |
1229 |
[% END %] |
1230 |
<!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option --> |
1231 |
[% IF ( periodicity8 ) %] |
1232 |
<option value="8" selected="selected">1/quarter (seasonal)</option> |
1233 |
[% ELSE %] |
1234 |
<option value="8">1/quarter (seasonal)</option> |
1235 |
[% END %] |
1236 |
[% IF ( periodicity13 ) %] |
1237 |
<option value="13" selected="selected">1/4 months (3/year)</option> |
1238 |
[% ELSE %] |
1239 |
<option value="13">1/4 months (3/year)</option> |
1240 |
[% END %] |
1241 |
|
1242 |
[% IF ( periodicity9 ) %] |
1243 |
<option value="9" selected="selected">2/years</option> |
1244 |
[% ELSE %] |
1245 |
<option value="9">2/year</option> |
1246 |
[% END %] |
1247 |
[% IF ( periodicity10 ) %] |
1248 |
<option value="10" selected="selected">1/year</option> |
1249 |
[% ELSE %] |
1250 |
<option value="10">1/year</option> |
1251 |
[% END %] |
1252 |
[% IF ( periodicity11 ) %] |
1253 |
<option value="11" selected="selected">1/2 years</option> |
1254 |
[% ELSE %] |
1255 |
<option value="11">1/2 years</option> |
1256 |
[% END %] |
1257 |
</select> <span class="required">Required</span></li> |
1258 |
<li> |
1259 |
<label for="manuallist"> Manual history:</label> |
1260 |
[% IF ( manualhistory ) %] |
1261 |
<input type="checkbox" name="manualhist" id="manuallist" value="1" checked="checked" /> |
1262 |
[% ELSE %] |
1263 |
<input type="checkbox" name="manualhist" id="manuallist" value="1" /> |
1264 |
[% END %] |
1265 |
</li> |
1266 |
<li> |
1267 |
<label for="numberpattern"> Numbering pattern:</label> |
1268 |
|
1269 |
<select name="numbering_pattern" size="1" id="numberpattern" > |
1270 |
<option value="" selected="selected">-- please choose --</option> |
1271 |
[% IF ( numberpattern1 ) %] |
1272 |
<option value="1" selected="selected">Number</option> |
1273 |
[% ELSE %] |
1274 |
<option value="1">Number</option> |
1275 |
[% END %] |
1276 |
[% IF ( numberpattern2 ) %] |
1277 |
<option value="2" selected="selected">Volume, number, issue</option> |
1278 |
[% ELSE %] |
1279 |
<option value="2">Volume, number, issue</option> |
1280 |
[% END %] |
1281 |
[% IF ( numberpattern3 ) %] |
1282 |
<option value="3" selected="selected">Volume, number</option> |
1283 |
[% ELSE %] |
1284 |
<option value="3">Volume, number</option> |
1285 |
[% END %] |
1286 |
[% IF ( numberpattern4 ) %] |
1287 |
<option value="4" selected="selected">Volume, issue</option> |
1288 |
[% ELSE %] |
1289 |
<option value="4">Volume, issue</option> |
1290 |
[% END %] |
1291 |
[% IF ( numberpattern5 ) %] |
1292 |
<option value="5" selected="selected">Number, issue</option> |
1293 |
[% ELSE %] |
1294 |
<option value="5">Number, issue</option> |
1295 |
[% END %] |
1296 |
[% IF ( numberpattern6 ) %] |
1297 |
<option value="6" selected="selected">Seasonal only</option> |
1298 |
[% ELSE %] |
1299 |
<option value="6">Seasonal only</option> |
1300 |
[% END %] |
1301 |
[% IF ( numberpattern8 ) %] |
1302 |
<option value="8" selected="selected">Year/Number</option> |
1303 |
[% ELSE %] |
1304 |
<option value="8">Year/Number</option> |
1305 |
[% END %] |
1306 |
[% IF ( numberpattern7 ) %] |
1307 |
<option value="7" selected="selected">None of the above</option> |
1308 |
[% ELSE %] |
1309 |
<option value="7">None of the above</option> |
1310 |
[% END %] |
1311 |
</select> |
1312 |
</li> |
1313 |
<li id="more_options"></li> |
1314 |
<li id="irregularity"></li> |
1315 |
<li id="displayexample"></li> |
1316 |
<li> |
1317 |
<label for="beginning_date" class="required"> Subscription start date:</label> |
1318 |
|
1319 |
<img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show calendar" title="Show calendar" /> |
1320 |
<input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" /> |
1321 |
<!-- both scripts for calendar must follow the input field --> |
1322 |
<script type="text/javascript"> |
1323 |
Calendar.setup({ |
1324 |
inputField : "beginning_date", |
1325 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1326 |
button : "button1", |
1327 |
align : "Tl" |
1328 |
}); |
1329 |
Calendar.setup({ |
1330 |
inputField : "beginning_date", |
1331 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1332 |
button : "beginning_date", |
1333 |
align : "Tl" |
1334 |
}); |
1335 |
</script> |
1336 |
<span class="required">Required</span> |
1337 |
</li> |
1338 |
<li> |
1339 |
<label for="subtype" class="required">Subscription length:</label> |
1340 |
|
1341 |
<select name="subtype" id="subtype"> |
1342 |
[% IF ( subtype_monthlength ) %]<option value="monthlength" selected="selected">[% ELSE %]<option value="monthlength">[% END %] Number of months</option> |
1343 |
[% IF ( subtype_numberlength ) %]<option value="numberlength" selected="selected">[% ELSE %]<option value="numberlength">[% END %] Number of issues</option> |
1344 |
[% IF ( subtype_weeklength ) %]<option value="weeklength" selected="selected">[% ELSE %]<option value="weeklength">[% END %] Number of weeks</option> |
1345 |
</select> |
1346 |
<input type="text" id="numberlength" name="sublength" value="[% sublength %]" size="3" onkeypress="return check_input(event)" /> (enter amount in numerals) |
1347 |
<span class="required">Required</span> |
1348 |
</li> |
1349 |
<li> |
1350 |
<label for="ending_date"> Subscription end date:</label> |
1351 |
|
1352 |
<img src="[% themelang %]/lib/calendar/cal.gif" id="buttonend1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" /> |
1353 |
<input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" /> |
1354 |
<!-- both scripts for calendar must follow the input field --> |
1355 |
<script type="text/javascript"> |
1356 |
Calendar.setup({ |
1357 |
inputField : "ending_date", |
1358 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1359 |
button : "buttonend1", |
1360 |
align : "Tl" |
1361 |
}); |
1362 |
Calendar.setup({ |
1363 |
inputField : "ending_date", |
1364 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
1365 |
button : "ending_date", |
1366 |
align : "Tl" |
1367 |
}); |
1368 |
</script> |
1369 |
</li> |
1370 |
<li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" /> |
1371 |
</li> |
1372 |
</ol> |
1373 |
</fieldset> |
1374 |
</div> |
1375 |
<fieldset class="action"> |
1376 |
<input type="button" class="action_test" value="Test prediction pattern" onclick="javascript:irregularity_check()" /> |
1377 |
<input type="button" class="action_reset" value="Reset pattern" onclick="javascript:reset_pattern()" /> |
1378 |
<input type="button" class="action_save" value="Save subscription" onclick="Check(this.form)" accesskey="w" /> |
1379 |
</fieldset> |
1380 |
<fieldset class="action"> |
1381 |
<input type="button" class="action_advanced" value="Show/Hide advanced pattern" onclick="javascript:display_table()" /> |
1382 |
</fieldset> |
1383 |
<div id="basetable" style="display: none;"> |
1384 |
<table class="small"> |
1385 |
<tr><th colspan="4">Advanced prediction pattern</th></tr> |
1386 |
<tr> |
1387 |
<th> </th> |
1388 |
<th>X</th> |
1389 |
<th>Y</th> |
1390 |
<th>Z</th> |
1391 |
</tr> |
1392 |
<tr> |
1393 |
<td>Add</td> |
1394 |
<td> |
1395 |
<input type="text" name="add1" id="add1" value="[% add1 %]" /> |
1396 |
</td> |
1397 |
<td> |
1398 |
<input type="text" name="add2" id="add2" value="[% add2 %]" /> |
1399 |
</td> |
1400 |
<td> |
1401 |
<input type="text" name="add3" id="add3" value="[% add3 %]" /> |
1402 |
</td> |
1403 |
</tr> |
1404 |
<tr> |
1405 |
<td>once every</td> |
1406 |
<td><input type="text" name="every1" id="every1" value="[% every1 %]" /></td> |
1407 |
<td><input type="text" name="every2" id="every2" value="[% every2 %]" /></td> |
1408 |
<td><input type="text" name="every3" id="every3" value="[% every3 %]" /></td> |
1409 |
</tr> |
1410 |
<tr> |
1411 |
<td>When more than</td> |
1412 |
<td><input type="text" name="whenmorethan1" id="whenmorethan1" value="[% whenmorethan1 %]" /></td> |
1413 |
<td><input type="text" name="whenmorethan2" id="whenmorethan2" value="[% whenmorethan2 %]" /></td> |
1414 |
<td><input type="text" name="whenmorethan3" id="whenmorethan3" value="[% whenmorethan3 %]" /></td> |
1415 |
</tr> |
1416 |
<tr> |
1417 |
<td>inner counter</td> |
1418 |
<td><input type="text" name="innerloop1" id="innerloop1" value="[% innerloop1 %]" /></td> |
1419 |
<td><input type="text" name="innerloop2" id="innerloop2" value="[% innerloop2 %]" /></td> |
1420 |
<td><input type="text" name="innerloop3" id="innerloop3" value="[% innerloop3 %]" /></td> |
1421 |
</tr> |
1422 |
<tr> |
1423 |
<td>Set back to</td> |
1424 |
<td><input type="text" name="setto1" id="setto1" value="[% setto1 %]" /></td> |
1425 |
<td><input type="text" name="setto2" id="setto2" value="[% setto2 %]" /></td> |
1426 |
<td><input type="text" name="setto3" id="setto3" value="[% setto3 %]" /></td> |
1427 |
</tr> |
1428 |
<tr> |
1429 |
<td> |
1430 |
[% IF ( modify ) %] |
1431 |
Last value |
1432 |
[% ELSE %] |
1433 |
Begins with |
1434 |
[% END %] |
1435 |
</td> |
1436 |
<td><input type="text" name="lastvalue1" id="lastvalue1" value="[% lastvalue1 %]" /></td> |
1437 |
<td><input type="text" name="lastvalue2" id="lastvalue2" value="[% lastvalue2 %]" /></td> |
1438 |
<td><input type="text" name="lastvalue3" id="lastvalue3" value="[% lastvalue3 %]" /></td> |
1439 |
</tr> |
1440 |
</table> |
1441 |
</div> |
1442 |
|
1443 |
</div> |
1444 |
|
1445 |
</form> |
1446 |
</div> |
1447 |
|
1448 |
</div> |
1449 |
|
1450 |
[% INCLUDE 'intranet-bottom.inc' %] |