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