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