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