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