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