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