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