Bug 17047: SQL reports management with Mana-KB
[srvgit] / 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                 [% IF ( Koha.Preference('Mana') == 2) %]
218                     <fieldset>
219                         <p><center>You haven't activated the Mana Knowledge Base, click
220                         <a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a>
221                          to configure.</center></p>
222                     </fieldset>
223                 [% END %]
224
225                         <div hidden id="mana_search" class="dialog message">
226                         </div>
227                         <div id="subscription_form_planning">
228                             <fieldset class="rows">
229                                 <legend>Serials planning</legend>
230                                 <ol>
231                                     <li>
232                                         <label for="firstacquidate" class="required">First issue publication date:</label>
233                                         [% UNLESS (more_than_one_serial) %]
234                                           <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
235                                         [% ELSE %]
236                                           [% firstacquidate | $KohaDates %]
237                                           <input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
238                                         [% END %]
239                                     </li>
240                                     [% IF (more_than_one_serial) %]
241                                       <li>
242                                         <label for="nextacquidate">Next issue publication date:</label>
243                                         <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
244                                       </li>
245                                     [% END %]
246                                     <li>
247                                         <label for="frequency" class="required">Frequency:</label>
248                                         <select name="frequency" size="1" id="frequency" class="required" required="required">
249                                             <option value="">-- please choose --</option>
250                                             [% FOREACH frequency IN frequencies %]
251                                                 [% IF (frequency.selected) %]
252                                                     <option value="[% frequency.id | html %]" selected="selected">
253                                                 [% ELSE %]
254                                                     <option value="[% frequency.id | html %]">
255                                                 [% END %]
256                                                     [% frequency.label | html %]
257                                                 </option>
258                                             [% END %]
259                                         </select>
260                                     </li>
261                                     <li>
262                                         <label for="subtype">Subscription length:</label>
263                                         <select name="subtype" id="subtype">
264                                             [% FOREACH st IN subtypes %]
265                                                 [% SWITCH st %]
266                                                     [% CASE 'numberlength' %]
267                                                         [% IF st == subtype %]
268                                                             <option value="issues" selected="selected">
269                                                         [% ELSE %]
270                                                             <option value="issues">
271                                                         [% END %]
272                                                         issues
273                                                     [% CASE 'weeklength' %]
274                                                         [% IF st == subtype %]
275                                                             <option value="weeks" selected="selected">
276                                                         [% ELSE %]
277                                                             <option value="weeks">
278                                                         [% END %]
279                                                         weeks
280                                                     [% CASE 'monthlength' %]
281                                                         [% IF st == subtype %]
282                                                             <option value="months" selected="selected">
283                                                         [% ELSE %]
284                                                             <option value="months">
285                                                         [% END %]
286                                                         months
287                                                     [% CASE %][% st | html %]
288                                                 [% END %]
289                                                 </option>
290                                             [% END %]
291                                         </select>
292                                         <input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" /> (enter amount in numerals)
293                                         <input type="hidden" name="issuelengthcount">
294                                     </li>
295                                     <li>
296                                         <label for="startdate" class="required"> Subscription start date:</label>
297                                         <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
298                                     </li>
299                                     <li>
300                                         <label for="enddate">Subscription end date:</label>
301                                         <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
302                                     </li>
303                                     <li>
304                                         <label for="numberpattern" class="required">Numbering pattern:</label>
305                                         <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
306                                             <option value="">-- please choose --</option>
307                                             [% FOREACH numberpattern IN numberpatterns %]
308                                                 [% IF (numberpattern.selected) %]
309                                                     <option value="[% numberpattern.id | html %]" selected="selected">
310                                                 [% ELSE %]
311                                                     <option value="[% numberpattern.id | html %]">
312                                                 [% END %]
313                                                     [% numberpattern.label | html %]
314                                                 </option>
315                                             [% END %]
316                                         </select>
317                                     </li>
318                                     <li>
319                                         <label for="locale">Locale:</label>
320                                         <select id="locale" name="locale">
321                                             <option value=""></option>
322                                             [% FOREACH l IN locales %]
323                                                 [% IF l.language == locale %]
324                                                     <option value="[% l.language | html %]" selected="selected">[% l.description | html %]</option>
325                                                 [% ELSE %]
326                                                     <option value="[% l.language | html %]">[% l.description | html %]</option>
327                                                 [% END %]
328                                             [% END %]
329                                         </select>
330                                         <span class="hint">If empty, English is used</span>
331                                     </li>
332                                     <li id="more_options">
333                                         <table id="moreoptionst">
334                                             <thead>
335                                                 <tr>
336                                                     <th>&nbsp;</th>
337                                                     <th id="headerX">&nbsp;</th>
338                                                     <th id="headerY">&nbsp;</th>
339                                                     <th id="headerZ">&nbsp;</th>
340                                                 </tr>
341                                             </thead>
342                                             <tbody>
343                                                 <tr>
344                                                     <td>
345                                                       [% IF (more_than_one_serial) %]
346                                                         Last value
347                                                       [% ELSE %]
348                                                         Begins with
349                                                       [% END %]
350                                                     </td>
351                                                     <td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 | html %]" /></td>
352                                                     <td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 | html %]" /></td>
353                                                     <td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 | html %]" /></td>
354                                                 </tr>
355                                                 <tr>
356                                                     <td>Inner counter</td>
357                                                     <td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 | html %]" /></td>
358                                                     <td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 | html %]" /></td>
359                                                     <td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 | html %]" /></td>
360                                                 </tr>
361                                             </tbody>
362                                         </table>
363                                     </li>
364                                     <li>
365                                         <a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
366                                         <a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
367                                     </li>
368                                     <div id="advancedpredictionpattern" style="display:none">
369                                       <li>
370                                         <label for="patternname" class="required">Pattern name:</label>
371                                         <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
372                                       </li>
373                                       <li>
374                                         <label for="numberingmethod">Numbering formula:</label>
375                                         <input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod | html %]" />
376                                       </li>
377                                         <table id="advancedpredictionpatternt">
378                                             <thead>
379                                                 <tr>
380                                                     <th colspan="4">Advanced prediction pattern</th>
381                                                 </tr>
382                                                 <tr>
383                                                     <th>&nbsp;</th>
384                                                     <th>X</th>
385                                                     <th>Y</th>
386                                                     <th>Z</th>
387                                                 </tr>
388                                             </thead>
389                                             <tbody>
390                                                 <tr>
391                                                     <td>Label</td>
392                                                     <td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
393                                                     <td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
394                                                     <td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
395                                                 </tr>
396                                                 <tr>
397                                                     <td>Begins with</td>
398                                                     <td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
399                                                     <td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
400                                                     <td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
401                                                 </tr>
402                                                 <tr>
403                                                     <td>Add</td>
404                                                     <td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
405                                                     <td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
406                                                     <td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
407                                                 </tr>
408                                                 <tr>
409                                                     <td>Every</td>
410                                                     <td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
411                                                     <td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
412                                                     <td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
413                                                 </tr>
414                                                 <tr>
415                                                     <td>Set back to</td>
416                                                     <td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
417                                                     <td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
418                                                     <td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
419                                                 </tr>
420                                                 <tr>
421                                                     <td>When more than</td>
422                                                     <td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
423                                                     <td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
424                                                     <td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
425                                                 </tr>
426                                                 <tr>
427                                                     <td>Inner counter</td>
428                                                     <td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
429                                                     <td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
430                                                     <td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
431                                                 </tr>
432                                                 <tr>
433                                                     [% BLOCK numbering_select %]
434                                                         <select disabled="disabled" id="[% name | html %]" name="[% name | html %]">
435                                                             <option value=""></option>
436                                                             <option value="dayname">Name of day</option>
437                                                             <option value="dayabrv">Name of day (abbreviated)</option>
438                                                             <option value="monthname">Name of month</option>
439                                                             <option value="monthabrv">Name of month (abbreviated)</option>
440                                                             <option value="season">Name of season</option>
441                                                             <option value="seasonabrv">Name of season (abbreviated)</option>
442                                                         </select>
443                                                     [% END %]
444                                                     <td>Formatting</td>
445                                                     <td>[% PROCESS numbering_select name="numbering1" %]</td>
446                                                     <td>[% PROCESS numbering_select name="numbering2" %]</td>
447                                                     <td>[% PROCESS numbering_select name="numbering3" %]</td>
448                                                 </tr>
449                                             </tbody>
450                                         </table>
451                                         <input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
452                                         <input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
453                                         <input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
454                                     </div>
455                                 </ol>
456                             </fieldset>
457
458                             [% IF additional_fields_for_subscription %]
459                               <div id="subscription_additional_fields">
460                                 <fieldset class="rows">
461                                   <legend>Additional fields</legend>
462                                   <ol>
463                                     [% FOR field IN additional_fields_for_subscription %]
464                                       <li>
465                                         <label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label>
466                                         [% IF field.authorised_value_choices %]
467                                           <select name="additional_field_[% field.id | html %]" id="additional_field_[% field.id | html %]">
468                                             [% FOREACH av IN field.authorised_value_choices %]
469                                               [% IF av.authorised_value == additional_fields.${field.name} %]
470                                                 <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option>
471                                               [% ELSE %]
472                                                 <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option>
473                                               [% END %]
474                                             [% END %]
475                                           </select> (Authorised values for [% field.authorised_value_category | html %])
476                                         [% ELSE %]
477                                           [% IF field.marcfield %]
478                                             <input type="text" value="[% additional_fields.${field.name} | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" readonly="readonly" />
479                                             This value will be filled with the [% field.marcfield | html %] subfield of the selected biblio.
480                                           [% ELSE %]
481                                             <input type="text" value="[% additional_fields.${field.name} | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" />
482                                           [% END %]
483                                         [% END %]
484                                       </li>
485                                     [% END %]
486                                   </ol>
487                                 </fieldset>
488                               </div>
489                             [% END %]
490
491                             <input type="hidden" id="mana_id"  name="mana_id" value=""/>
492                             <input type="hidden" id="sndescription"  name="sndescription" value=""/>
493                             <input type="hidden" id="sfdescription"  name="sfdescription" value=""/>
494                             <input type="hidden" id="unit"  name="unit" value=""/>
495                             <input type="hidden" id="unitsperissue"  name="unitsperissue" value=""/>
496                             <input type="hidden" id="issuesperunit"  name="issuesperunit" value=""/>
497                             <fieldset class="action">
498                                 <input type="button" id="subscription_add_previous" value="&lt;&lt; Previous" style="float:left;"/>
499                                 <input id="testpatternbutton" type="button" value="Test prediction pattern" />
500                                 <input id="save-subscription" type="submit" value="Save subscription" style="float:right;" accesskey="w"/>
501                             </fieldset>
502                         </div>
503                     </div>
504                     <div class="col-md-6">
505                         <li id="displayexample"></li>
506                     </div>
507                 </div>
508             </form>
509         </div>
510         <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;">
511             <div class="modal-dialog modal-lg">
512                 <div class="modal-content">
513                     <div class="modal-header">
514                         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
515                         <h3 id="mana_search_result_label"></h3>
516                     </div>
517                     <div class="modal-body">
518             </div>
519         </div>
520
521 [% MACRO jsinclude BLOCK %]
522     [% INCLUDE 'calendar.inc' %]
523     [% INCLUDE 'datatables.inc' %]
524     <script type="text/javascript">
525         var subscriptionid = "[% subscriptionid | html %]";
526         var irregularity = "[% irregularity | html %]";
527         var more_than_one_serial = "[% more_than_one_serial | html %]";
528         var tags = [];
529         [% FOREACH field IN dont_export_field_loop %]
530             tags.push("[% field.fieldid | html %]");
531         [% END %]
532         var mana_enabled = [% Koha.Preference('Mana') %]
533         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");
534         var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record");
535         var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date.");
536         var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription.");
537         var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date");
538         var MSG = _("You have modified the advanced prediction pattern. Please save your work or cancel modifications.");
539         var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid")
540         var MSG_PATTERN_NAME = _("Please enter a name for this pattern");
541         var MSG_PATTERN_NAME_EXISTS = _("This pattern name already exists. Do you want to modify it?");
542         var MSG_OVERWRITE_PATTERNS = _("Warning: it will modify the pattern for all subscriptions that are using it.");
543         var MSG_PATTERN_CREATE_FAILED = _("Something went wrong. Unable to create a new numbering pattern.");
544         var MSG_PATTERN_TEST_FAILED = _("Cannot test prediction pattern for the following reason(s): %s");
545         var MSG_FREQUENCY_UNDEFINED = _("Frequency is not defined");
546         var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
547         var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
548     </script>
549     [% Asset.js("js/subscription-add.js") | $raw %]
550     [% Asset.js("js/showpredictionpattern.js") | $raw %]
551 [% END %]
552
553 [% INCLUDE 'intranet-bottom.inc' %]