Bug 19778: Move template JavaScript to the footer: Serials, part 4
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-add.tt
1 [% USE KohaDates %]
2 [% USE Branches %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Serials &rsaquo; [% IF ( modify ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <style type="text/css">
8 fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
9 .yui-u li p label.widelabel {
10     width: 300px;  /* not enough for IE7 apparently */
11 }
12 </style>
13 </head>
14
15 <body id="ser_subscription-add" class="ser">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'serials-search.inc' %]
18
19 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]"><i>[% bibliotitle |html %]</i></a> &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</div>
20
21 <div id="doc3" class="yui-t7">
22     <div id="bd">
23         <div class="yui-g">
24             <h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
25             <form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated">
26                 [% IF ( modify ) %]
27                     <input type="hidden" name="op" value="modsubscription" />
28                     <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
29                 [% ELSE %]
30                         <input type="hidden" name="op" value="addsubscription" />
31                 [% END %]
32                 <input type="hidden" name="user" value="[% loggedinusername %]" />
33                 <input type="hidden" name="irreg_check" value="0" />
34
35                 <div id="page_1">
36                     <div class="yui-u first">
37                         <fieldset id="subscription_add_information" class="rows">
38                             <legend>Subscription details</legend>
39                             <ol>
40                                 [% IF ( subscriptionid ) %]
41                                     <li><span class="label">Subscription #</span> [% subscriptionid %]</li>
42                                 [% END %]
43                                 <li>
44                                     <label for="aqbooksellerid">Vendor: </label>
45                                     <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" id="vendor_search"><i class="fa fa-search"></i> Search for a vendor</a>
46                                 </li>
47                                 <li>
48                                     <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
49                                     <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" />
50                                     (<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>
51                                     <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
52                                         [% IF ( CAN_user_editcatalogue ) %]
53                                             [% IF ( modify ) %]
54                                             | <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum %]"><i class="fa fa-pencil"></i> Edit record</a>
55                                             [% ELSE %]
56                                             | <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a>
57                                             [% END %]
58                                         [% END %]
59                                     </div>
60                                 </li>
61                                 <li class="radio">
62                                     [% IF ( serialsadditems ) %]
63                                         <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>
64                                         <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>
65                                     [% ELSE %]
66                                         <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>
67                                         <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>
68                                     [% END %]
69                                 </li>
70                                 <li class="radio">
71                                   <p>When there is an irregular issue:</p>
72                                   [% IF (skip_serialseq) %]
73                                     <p>
74                                       <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" checked="checked" />
75                                       <label for="skip_serialseq_yes">Skip issue number</label>
76                                     </p>
77                                     <p>
78                                       <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" />
79                                       <label for="skip_serialseq_no">Keep issue number</label>
80                                     </p>
81                                   [% ELSE %]
82                                     <p>
83                                       <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" />
84                                       <label for="skip_serialseq_yes">Skip issue number</label>
85                                     </p>
86                                     <p>
87                                       <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" checked="checked" />
88                                       <label for="skip_serialseq_no">Keep issue number</label>
89                                     </p>
90                                   [% END %]
91                                 </li>
92                                 <li>
93                                     <label for="manualhistory">Manual history:</label>
94                                     [% IF (manualhistory) %]
95                                         <input type="checkbox" id="manualhistory" name="manualhist" checked="checked" />
96                                     [% ELSE %]
97                                         <input type="checkbox" id="manualhistory" name="manualhist" />
98                                     [% END %]
99                                 </li>
100                                 <li>
101                                     <label for="callnumber">Call number:</label>
102                                     <input type="text" name="callnumber" id="callnumber" value="[% callnumber %]" size="20" />
103                                 </li>
104                                 <li>
105                                     <label for="branchcode">Library:</label>
106                                     <select name="branchcode" id="branchcode" style="width: 20em;">
107                                         [% UNLESS ( Independentbranches ) %]
108                                             <option value="">None</option>
109                                         [% END %]
110                                         [% IF CAN_user_serials_superserials %]
111                                             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
112                                         [% ELSE %]
113                                             [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
114                                         [% END %]
115                                     </select> (select a library)
116                                 </li>
117                                 <li>
118                                     <label for="notes">Public note:</label>
119                                     <textarea name="notes" id="notes" cols="30" rows="2">[% notes %]</textarea>
120                                 </li>
121                                 <li>
122                                     <label for="internalnotes">Nonpublic note:</label>
123                                     <textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes %]</textarea>
124                                 </li>
125                                 <li>
126                                     [% IF ( letterloop ) %]
127                                         <label for="letter">Patron notification: </label>
128                                         <select name="letter" id="letter">
129                                             <option value="">None</option>
130                                             [% FOREACH letterloo IN letterloop %]
131                                                 [% IF ( letterloo.selected ) %]
132                                                     <option value="[% letterloo.value %]" selected="selected">[% letterloo.lettername %]</option>
133                                                 [% ELSE %]
134                                                     <option value="[% letterloo.value %]">[% letterloo.lettername %]</option>
135                                                 [% END %]
136                                             [% END %]
137                                         </select>
138                                         <div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
139                                     [% ELSE %]
140                                         <span class="label">Patron notification: </span>
141                                         <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>
142                                     [% END %]
143                                 </li>
144                                 <li>
145                                     <label for="location">Location:</label>
146                                     <select name="location" id="location">
147                                         <option value="">None</option>
148                                         [% FOREACH locations_loo IN locations_loop %]
149                                             [% IF locations_loo.authorised_value == location %]
150                                                 <option value="[% locations_loo.authorised_value %]" selected="selected">[% locations_loo.lib %]</option>
151                                             [% ELSE %]
152                                                 <option value="[% locations_loo.authorised_value %]">[% locations_loo.lib %]</option>
153                                             [% END %]
154                                         [% END %]
155                                     </select>
156                                 </li>
157                                 <li>
158                                     <label for="itemtype">Item type:</label>
159                                     <select name="itemtype" id="itemtype">
160                                         <option value=""></option>
161                                         [% FOREACH type IN typeloop %]
162                                             [% IF ( type.selected ) %]
163                                                 <option value="[% type.code %]" selected="selected">[% type.value %]</option>
164                                             [% ELSE %]
165                                                 <option value="[% type.code %]">[% type.value %]</option>
166                                             [% END %]
167                                         [% END %]
168                                     </select>
169                                 </li>
170                                 [%IF makePreviousSerialAvailable %]
171                                 <li>
172                                     <label for="previousitemtype">item type for older issues:</label>
173                                     <select name="previousitemtype" id="previousitemtype">
174                                             <option value=""></option>
175                                         [% FOREACH previous IN previoustypeloop %]
176                                             [% IF ( previous.selected ) %]
177                                                 <option value="[% previous.code %]" selected="selected">[% previous.value %]</option>
178                                             [% ELSE %]
179                                                 <option value="[% previous.code %]">[% previous.value %]</option>
180                                             [% END %]
181                                         [% END %]
182                                     </select>
183                                 </li>
184                                 [% END %]
185                                     <li>
186                                     <label for="graceperiod">Grace period:</label>
187                                     <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod %]" size="5"/> day(s)
188                                 </li>
189                                 <li>
190                                      <label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label>
191                                      <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount %]" size="4"/>
192                                  </li>
193                                  <li>
194                                     <label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
195                                     <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount %]" size="4"/>
196                                 </li>
197                             </ol>
198                         </fieldset>
199                         <fieldset class="action">
200                             <input type="button" value="Next &gt;&gt;" id="subscription_add_next" style="float:right;" />
201                         </fieldset>
202                     </div>
203                 </div>
204
205                 <div id="page_2">
206                     <div class="yui-u first">
207                         <div id="subscription_form_planning">
208                             <fieldset class="rows">
209                                 <legend>Serials planning</legend>
210                                 <ol>
211                                     <li>
212                                         <label for="firstacquidate" class="required">First issue publication date:</label>
213                                         [% UNLESS (more_than_one_serial) %]
214                                           <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
215                                         [% ELSE %]
216                                           [% firstacquidate | $KohaDates %]
217                                           <input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
218                                         [% END %]
219                                     </li>
220                                     [% IF (more_than_one_serial) %]
221                                       <li>
222                                         <label for="nextacquidate">Next issue publication date:</label>
223                                         <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
224                                       </li>
225                                     [% END %]
226                                     <li>
227                                         <label for="frequency" class="required">Frequency:</label>
228                                         <select name="frequency" size="1" id="frequency" class="required" required="required">
229                                             <option value="">-- please choose --</option>
230                                             [% FOREACH frequency IN frequencies %]
231                                                 [% IF (frequency.selected) %]
232                                                     <option value="[% frequency.id %]" selected="selected">
233                                                 [% ELSE %]
234                                                     <option value="[% frequency.id %]">
235                                                 [% END %]
236                                                     [% frequency.label %]
237                                                 </option>
238                                             [% END %]
239                                         </select>
240                                     </li>
241                                     <li>
242                                         <label for="subtype">Subscription length:</label>
243                                         <select name="subtype" id="subtype">
244                                             [% FOREACH st IN subtypes %]
245                                                 [% SWITCH st %]
246                                                     [% CASE 'numberlength' %]
247                                                         [% IF st == subtype %]
248                                                             <option value="issues" selected="selected">
249                                                         [% ELSE %]
250                                                             <option value="issues">
251                                                         [% END %]
252                                                         issues
253                                                     [% CASE 'weeklength' %]
254                                                         [% IF st == subtype %]
255                                                             <option value="weeks" selected="selected">
256                                                         [% ELSE %]
257                                                             <option value="weeks">
258                                                         [% END %]
259                                                         weeks
260                                                     [% CASE 'monthlength' %]
261                                                         [% IF st == subtype %]
262                                                             <option value="months" selected="selected">
263                                                         [% ELSE %]
264                                                             <option value="months">
265                                                         [% END %]
266                                                         months
267                                                     [% CASE %][% st %]
268                                                 [% END %]
269                                                 </option>
270                                             [% END %]
271                                         </select>
272                                         <input type="text" name="sublength" id="sublength" value="[% sublength %]" size="3" /> (enter amount in numerals)
273                                         <input type="hidden" name="issuelengthcount">
274                                     </li>
275                                     <li>
276                                         <label for="startdate" class="required"> Subscription start date:</label>
277                                         <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
278                                     </li>
279                                     <li>
280                                         <label for="enddate">Subscription end date:</label>
281                                         <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
282                                     </li>
283                                     <li>
284                                         <label for="numberpattern" class="required">Numbering pattern:</label>
285                                         <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
286                                             <option value="">-- please choose --</option>
287                                             [% FOREACH numberpattern IN numberpatterns %]
288                                                 [% IF (numberpattern.selected) %]
289                                                     <option value="[% numberpattern.id %]" selected="selected">
290                                                 [% ELSE %]
291                                                     <option value="[% numberpattern.id %]">
292                                                 [% END %]
293                                                     [% numberpattern.label %]
294                                                 </option>
295                                             [% END %]
296                                         </select>
297                                     </li>
298                                     <li>
299                                         <label for="locale">Locale:</label>
300                                         <select id="locale" name="locale">
301                                             <option value=""></option>
302                                             [% FOREACH l IN locales %]
303                                                 [% IF l.language == locale %]
304                                                     <option value="[% l.language %]" selected="selected">[% l.description %]</option>
305                                                 [% ELSE %]
306                                                     <option value="[% l.language %]">[% l.description %]</option>
307                                                 [% END %]
308                                             [% END %]
309                                         </select>
310                                         <span class="hint">If empty, English is used</span>
311                                     </li>
312                                     <li id="more_options">
313                                         <table id="moreoptionst">
314                                             <thead>
315                                                 <tr>
316                                                     <th>&nbsp;</th>
317                                                     <th id="headerX">&nbsp;</th>
318                                                     <th id="headerY">&nbsp;</th>
319                                                     <th id="headerZ">&nbsp;</th>
320                                                 </tr>
321                                             </thead>
322                                             <tbody>
323                                                 <tr>
324                                                     <td>
325                                                       [% IF (more_than_one_serial) %]
326                                                         Last value
327                                                       [% ELSE %]
328                                                         Begins with
329                                                       [% END %]
330                                                     </td>
331                                                     <td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 %]" /></td>
332                                                     <td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 %]" /></td>
333                                                     <td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 %]" /></td>
334                                                 </tr>
335                                                 <tr>
336                                                     <td>Inner counter</td>
337                                                     <td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 %]" /></td>
338                                                     <td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 %]" /></td>
339                                                     <td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 %]" /></td>
340                                                 </tr>
341                                             </tbody>
342                                         </table>
343                                     </li>
344                                     <li>
345                                         <a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
346                                         <a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
347                                     </li>
348                                     <div id="advancedpredictionpattern" style="display:none">
349                                       <li>
350                                         <label for="patternname" class="required">Pattern name:</label>
351                                         <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
352                                       </li>
353                                       <li>
354                                         <label for="numberingmethod">Numbering formula:</label>
355                                         <input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod %]" />
356                                       </li>
357                                         <table id="advancedpredictionpatternt">
358                                             <thead>
359                                                 <tr>
360                                                     <th colspan="4">Advanced prediction pattern</td>
361                                                 </tr>
362                                                 <tr>
363                                                     <th>&nbsp;</th>
364                                                     <th>X</th>
365                                                     <th>Y</th>
366                                                     <th>Z</th>
367                                                 </tr>
368                                             </thead>
369                                             <tbody>
370                                                 <tr>
371                                                     <td>Label</td>
372                                                     <td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
373                                                     <td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
374                                                     <td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
375                                                 </tr>
376                                                 <tr>
377                                                     <td>Begins with</td>
378                                                     <td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
379                                                     <td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
380                                                     <td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
381                                                 </tr>
382                                                 <tr>
383                                                     <td>Add</td>
384                                                     <td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
385                                                     <td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
386                                                     <td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
387                                                 </tr>
388                                                 <tr>
389                                                     <td>Every</td>
390                                                     <td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
391                                                     <td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
392                                                     <td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
393                                                 </tr>
394                                                 <tr>
395                                                     <td>Set back to</td>
396                                                     <td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
397                                                     <td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
398                                                     <td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
399                                                 </tr>
400                                                 <tr>
401                                                     <td>When more than</td>
402                                                     <td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
403                                                     <td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
404                                                     <td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
405                                                 </tr>
406                                                 <tr>
407                                                     <td>Inner counter</td>
408                                                     <td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
409                                                     <td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
410                                                     <td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
411                                                 </tr>
412                                                 <tr>
413                                                     [% BLOCK numbering_select %]
414                                                         <select disabled="disabled" id="[% name %]" name="[% name %]" />
415                                                             <option value=""></option>
416                                                             <option value="dayname">Name of day</option>
417                                                             <option value="dayabrv">Name of day (abbreviated)</option>
418                                                             <option value="monthname">Name of month</option>
419                                                             <option value="monthabrv">Name of month (abbreviated)</option>
420                                                             <option value="season">Name of season</option>
421                                                             <option value="seasonabrv">Name of season (abbreviated)</option>
422                                                         </select>
423                                                     [% END %]
424                                                     <td>Formatting</td>
425                                                     <td>[% PROCESS numbering_select name="numbering1" %]</td>
426                                                     <td>[% PROCESS numbering_select name="numbering2" %]</td>
427                                                     <td>[% PROCESS numbering_select name="numbering3" %]</td>
428                                                 </tr>
429                                             </tbody>
430                                         </table>
431                                         <input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
432                                         <input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
433                                         <input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
434                                     </div>
435                                 </ol>
436                             </fieldset>
437
438                             [% IF additional_fields_for_subscription %]
439                               <div id="subscription_additional_fields">
440                                 <fieldset class="rows">
441                                   <legend>Additional fields</legend>
442                                   <ol>
443                                     [% FOR field IN additional_fields_for_subscription %]
444                                       <li>
445                                         <label for="additional_field_[% field.id %]"> [% field.name %]: </label>
446                                         [% IF field.authorised_value_choices %]
447                                           <select name="additional_field_[% field.id %]" id="additional_field_[% field.id %]">
448                                             [% FOREACH av IN field.authorised_value_choices %]
449                                               [% IF av.authorised_value == additional_fields.${field.name} %]
450                                                 <option value="[% av.authorised_value %]" selected="selected">[% av.lib %]</option>
451                                               [% ELSE %]
452                                                 <option value="[% av.authorised_value %]">[% av.lib %]</option>
453                                               [% END %]
454                                             [% END %]
455                                           </select> (Authorised values for [% field.authorised_value_category %])
456                                         [% ELSE %]
457                                           [% IF field.marcfield %]
458                                             <input type="text" value="[% additional_fields.${field.name} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" readonly="readonly" />
459                                             This value will be filled with the [% field.marcfield %] subfield of the selected biblio.
460                                           [% ELSE %]
461                                             <input type="text" value="[% additional_fields.${field.name} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" />
462                                           [% END %]
463                                         [% END %]
464                                       </li>
465                                     [% END %]
466                                   </ol>
467                                 </fieldset>
468                               </div>
469                             [% END %]
470
471                             <fieldset class="action">
472                                 <input type="button" id="subscription_add_previous" value="&lt;&lt; Previous" style="float:left;"/>
473                                 <input id="testpatternbutton" type="button" value="Test prediction pattern" />
474                                 <input type="submit" value="Save subscription" style="float:right;" accesskey="w" />
475                             </fieldset>
476                         </div>
477                     </div>
478                     <div class="yui-u">
479                         <li id="displayexample"></li>
480                     </div>
481                 </div>
482             </form>
483         </div>
484     </div>
485 </div>
486
487 [% MACRO jsinclude BLOCK %]
488     [% INCLUDE 'calendar.inc' %]
489     <script type="text/javascript">
490         var subscriptionid = "[% subscriptionid %]";
491         var irregularity = "[% irregularity %]";
492         var more_than_one_serial = "[% more_than_one_serial %]";
493         var tags = [];
494         [% FOREACH field IN dont_export_field_loop %]
495             tags.push("[% field.fieldid %]");
496         [% END %]
497         var MSG_LINK_TO_VENDOR = _("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");
498         var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record");
499         var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date.");
500         var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription.");
501         var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date");
502         var MSG = _("You have modified the advanced prediction pattern. Please save your work or cancel modifications.");
503         var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid")
504         var MSG_PATTERN_NAME = _("Please enter a name for this pattern");
505         var MSG_PATTERN_NAME_EXISTS = _("This pattern name already exists. Do you want to modify it?");
506         var MSG_OVERWRITE_PATTERNS = _("Warning: it will modify the pattern for all subscriptions that are using it.");
507         var MSG_PATTERN_CREATE_FAILED = _("Something went wrong. Unable to create a new numbering pattern.");
508         var MSG_PATTERN_TEST_FAILED = _("Cannot test prediction pattern for the following reason(s): %s");
509         var MSG_FREQUENCY_UNDEFINED = _("Frequency is not defined");
510         var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
511         var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
512     </script>
513     <script type="text/javascript" src="[% interface %]/[% theme %]/js/subscription-add.js"></script>
514     <script type="text/javascript" src="[% interface %]/[% theme %]/js/showpredictionpattern.js"></script>
515 [% END %]
516
517 [% INCLUDE 'intranet-bottom.inc' %]