7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Serials › [% IF ( modify ) %][% bibliotitle | html %] › Modify subscription[% ELSE %]New subscription[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") | $raw %]
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; }
20 <body id="ser_subscription-add" class="ser">
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'serials-search.inc' %]
24 <div id="breadcrumbs">
25 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
27 [% UNLESS blocking_error %]
28 › [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><i>[% bibliotitle | html %]</i></a> › Modify subscription[% ELSE %]New subscription[% END %]
31 [% INCLUDE 'blocking_errors.inc' %]
33 <div class="main container-fluid">
35 <div class="col-sm-12">
36 <h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle | html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
38 <form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated">
40 <input type="hidden" name="op" value="modsubscription" />
41 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
43 <input type="hidden" name="op" value="addsubscription" />
45 <input type="hidden" name="user" value="[% logged_in_user.userid | html %]" />
46 <input type="hidden" name="irreg_check" value="0" />
49 <div class="col-md-6">
50 <fieldset id="subscription_add_information" class="rows">
51 <legend>Subscription details</legend>
53 [% IF ( subscriptionid ) %]
54 <li><span class="label">Subscription #</span> [% subscriptionid | html %]</li>
57 <label for="aqbooksellerid">Vendor: </label>
58 <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid | html %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername | html %]" disabled="disabled" readonly="readonly" />) <a href="#" id="vendor_search"><i class="fa fa-search"></i> Search for a vendor</a>
61 <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
62 <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
63 (<input type="text" name="title" value="[% bibliotitle | html %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
64 <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
65 [% IF ( CAN_user_editcatalogue ) %]
67 | <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum | html %]"><i class="fa fa-pencil"></i> Edit record</a>
69 | <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a>
75 [% IF ( serialsadditems ) %]
76 <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p>
77 <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial </label></p>
79 <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p>
80 <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial</label></p>
84 <p>When there is an irregular issue:</p>
85 [% IF (skip_serialseq) %]
87 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" checked="checked" />
88 <label for="skip_serialseq_yes">Skip issue number</label>
91 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" />
92 <label for="skip_serialseq_no">Keep issue number</label>
96 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" />
97 <label for="skip_serialseq_yes">Skip issue number</label>
100 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" checked="checked" />
101 <label for="skip_serialseq_no">Keep issue number</label>
106 <label for="manualhistory">Manual history:</label>
107 [% IF (manualhistory) %]
108 <input type="checkbox" id="manualhistory" name="manualhist" checked="checked" />
110 <input type="checkbox" id="manualhistory" name="manualhist" />
114 <label for="callnumber">Call number:</label>
115 <input type="text" name="callnumber" id="callnumber" value="[% callnumber | html %]" size="20" />
118 <label for="branchcode">Library:</label>
119 <select name="branchcode" id="branchcode" style="width: 20em;">
120 [% UNLESS ( Independentbranches ) %]
121 <option value="">None</option>
123 [% IF CAN_user_serials_superserials %]
124 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
126 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
128 </select> (select a library)
131 <label for="notes">Public note:</label>
132 <textarea name="notes" id="notes" cols="30" rows="2">[% notes | html %]</textarea>
135 <label for="internalnotes">Nonpublic note:</label>
136 <textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes | html %]</textarea>
139 [% IF ( letterloop ) %]
140 <label for="letter">Patron notification: </label>
141 <select name="letter" id="letter">
142 <option value="">None</option>
143 [% FOREACH letterloo IN letterloop %]
144 [% IF ( letterloo.selected ) %]
145 <option value="[% letterloo.value | html %]" selected="selected">[% letterloo.lettername | html %]</option>
147 <option value="[% letterloo.value | html %]">[% letterloo.lettername | html %]</option>
151 <div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
153 <span class="label">Patron notification: </span>
154 <div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
158 <label for="location">Location:</label>
159 <select name="location" id="location">
160 <option value="">None</option>
161 [% FOREACH locations_loo IN locations_loop %]
162 [% IF locations_loo.authorised_value == location %]
163 <option value="[% locations_loo.authorised_value | html %]" selected="selected">[% locations_loo.lib | html %]</option>
165 <option value="[% locations_loo.authorised_value | html %]">[% locations_loo.lib | html %]</option>
171 <label for="itemtype">Item type:</label>
172 <select name="itemtype" id="itemtype">
173 <option value=""></option>
174 [% FOREACH type IN typeloop %]
175 [% IF ( type.selected ) %]
176 <option value="[% type.code | html %]" selected="selected">[% type.value | html %]</option>
178 <option value="[% type.code | html %]">[% type.value | html %]</option>
183 [%IF makePreviousSerialAvailable %]
185 <label for="previousitemtype">item type for older issues:</label>
186 <select name="previousitemtype" id="previousitemtype">
187 <option value=""></option>
188 [% FOREACH previous IN previoustypeloop %]
189 [% IF ( previous.selected ) %]
190 <option value="[% previous.code | html %]" selected="selected">[% previous.value | html %]</option>
192 <option value="[% previous.code | html %]">[% previous.value | html %]</option>
199 <label for="graceperiod">Grace period:</label>
200 <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod | html %]" size="5"/> day(s)
203 <label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label>
204 <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount | html %]" size="4"/>
207 <label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
208 <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount | html %]" size="4"/>
212 <fieldset class="action">
213 <input type="button" value="Next >>" id="subscription_add_next" style="float:right;" />
219 <div class="col-md-6">
220 [% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
222 <p><center>The Mana Knowledge Base can be used to import subscription patterns submitted by other libraries and save you extra work. Ask your system administrator to configure this service and complete the configuration, or remove this message by disabling the system preference
223 <a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a></center></p>
226 <div hidden id="mana_search" class="dialog message">
228 <div id="subscription_form_planning">
229 <fieldset class="rows">
230 <legend>Serials planning</legend>
233 <label for="acqui_date" class="required">First issue publication date:</label>
234 [% UNLESS (more_than_one_serial) %]
235 <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
237 [% firstacquidate | $KohaDates %]
238 <input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
241 [% IF (more_than_one_serial) %]
243 <label for="nextacquidate">Next issue publication date:</label>
244 <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
248 <label for="frequency" class="required">Frequency:</label>
249 <select name="frequency" size="1" id="frequency" class="required" required="required">
250 <option value="">-- please choose --</option>
251 [% FOREACH frequency IN frequencies %]
252 [% IF (frequency.selected) %]
253 <option value="[% frequency.id | html %]" selected="selected">
255 <option value="[% frequency.id | html %]">
257 [% frequency.label | html %]
263 <label for="subtype">Subscription length:</label>
264 <select name="subtype" id="subtype">
265 [% FOREACH st IN subtypes %]
267 [% CASE 'numberlength' %]
268 [% IF st == subtype %]
269 <option value="issues" selected="selected">
271 <option value="issues">
274 [% CASE 'weeklength' %]
275 [% IF st == subtype %]
276 <option value="weeks" selected="selected">
278 <option value="weeks">
281 [% CASE 'monthlength' %]
282 [% IF st == subtype %]
283 <option value="months" selected="selected">
285 <option value="months">
288 [% CASE %][% st | html %]
293 <input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" /> (enter amount in numerals)
294 <input type="hidden" name="issuelengthcount">
297 <label for="from" class="required"> Subscription start date:</label>
298 <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
301 <label for="to">Subscription end date:</label>
302 <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
305 <label for="numberpattern" class="required">Numbering pattern:</label>
306 <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
307 <option value="">-- please choose --</option>
308 [% FOREACH numberpattern IN numberpatterns %]
309 [% IF (numberpattern.selected) %]
310 <option value="[% numberpattern.id | html %]" selected="selected">
312 <option value="[% numberpattern.id | html %]">
314 [% numberpattern.label | html %]
320 <label for="locale">Locale:</label>
321 <select id="locale" name="locale">
322 <option value=""></option>
323 [% FOREACH l IN locales %]
324 [% IF l.language == locale %]
325 <option value="[% l.language | html %]" selected="selected">[% l.description | html %]</option>
327 <option value="[% l.language | html %]">[% l.description | html %]</option>
331 <span class="hint">If empty, English is used</span>
333 <li id="more_options">
334 <table id="moreoptionst">
338 <th id="headerX"> </th>
339 <th id="headerY"> </th>
340 <th id="headerZ"> </th>
346 [% IF (more_than_one_serial) %]
352 <td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 | html %]" /></td>
353 <td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 | html %]" /></td>
354 <td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 | html %]" /></td>
357 <td>Inner counter</td>
358 <td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 | html %]" /></td>
359 <td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 | html %]" /></td>
360 <td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 | html %]" /></td>
366 <a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
367 <a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
369 <div id="advancedpredictionpattern" style="display:none">
371 <label for="patternname" class="required">Pattern name:</label>
372 <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
375 <label for="numberingmethod">Numbering formula:</label>
376 <input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod | html %]" />
378 <table id="advancedpredictionpatternt">
381 <th colspan="4">Advanced prediction pattern</th>
393 <td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
394 <td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
395 <td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
399 <td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
400 <td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
401 <td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
405 <td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
406 <td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
407 <td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
411 <td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
412 <td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
413 <td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
417 <td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
418 <td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
419 <td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
422 <td>When more than</td>
423 <td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
424 <td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
425 <td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
428 <td>Inner counter</td>
429 <td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
430 <td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
431 <td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
434 [% BLOCK numbering_select %]
435 <select disabled="disabled" id="[% name | html %]" name="[% name | html %]">
436 <option value=""></option>
437 <option value="dayname">Name of day</option>
438 <option value="dayabrv">Name of day (abbreviated)</option>
439 <option value="monthname">Name of month</option>
440 <option value="monthabrv">Name of month (abbreviated)</option>
441 <option value="season">Name of season</option>
442 <option value="seasonabrv">Name of season (abbreviated)</option>
446 <td>[% PROCESS numbering_select name="numbering1" %]</td>
447 <td>[% PROCESS numbering_select name="numbering2" %]</td>
448 <td>[% PROCESS numbering_select name="numbering3" %]</td>
452 <input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
453 <input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
454 <input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
459 [% IF additional_fields %]
460 <div id="subscription_additional_fields">
461 [% INCLUDE 'additional-fields-entry.inc' available=additional_fields values=additional_field_values %]
465 <input type="hidden" id="mana_id" name="mana_id" value=""/>
466 <input type="hidden" id="sndescription" name="sndescription" value=""/>
467 <input type="hidden" id="sfdescription" name="sfdescription" value=""/>
468 <input type="hidden" id="unit" name="unit" value=""/>
469 <input type="hidden" id="unitsperissue" name="unitsperissue" value=""/>
470 <input type="hidden" id="issuesperunit" name="issuesperunit" value=""/>
471 <fieldset class="action">
472 <input type="button" id="subscription_add_previous" value="<< Previous" style="float:left;"/>
473 <input id="testpatternbutton" type="button" value="Test prediction pattern" />
474 <input id="save-subscription" type="submit" value="Save subscription" style="float:right;" accesskey="w"/>
478 <div class="col-md-6">
479 <li id="displayexample"></li>
485 <!-- Mana Search Result Modal -->
486 <div class="modal" id="mana_search_result" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label">
487 <div class="modal-dialog modal-lg" role="document">
488 <div class="modal-content">
489 <div class="modal-header">
490 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
491 <h4 class="modal-title" id="mana_search_result_label">Modal title</h4>
493 <div class="modal-body">
495 <div class="modal-footer">
496 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
502 [% MACRO jsinclude BLOCK %]
503 [% INCLUDE 'calendar.inc' %]
504 [% INCLUDE 'datatables.inc' %]
505 [% Asset.js("js/mana.js") | $raw %]
507 var subscriptionid = "[% subscriptionid | html %]";
508 var irregularity = "[% irregularity | html %]";
509 var more_than_one_serial = "[% more_than_one_serial | html %]";
511 var interface = "[% interface | html %]";
512 var theme = "[% theme | html %]";
513 [% FOREACH field IN dont_export_field_loop %]
514 tags.push("[% field.fieldid | html %]");
516 var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %]0[% END %];
517 var MSG_LINK_TO_VENDOR = _("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor");
518 var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record");
519 var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date.");
520 var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription.");
521 var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date");
522 var MSG_SAVE_PREDICTION_PATTERN = _("You have modified the advanced prediction pattern. Please save your work or cancel modifications.");
523 var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid")
524 var MSG_PATTERN_NAME = _("Please enter a name for this pattern");
525 var MSG_PATTERN_NAME_EXISTS = _("This pattern name already exists. Do you want to modify it?");
526 var MSG_OVERWRITE_PATTERNS = _("Warning: This will modify the pattern for all subscriptions that are using it.");
527 var MSG_PATTERN_CREATE_FAILED = _("Something went wrong. Unable to create a new numbering pattern.");
528 var MSG_PATTERN_TEST_FAILED = _("Cannot test prediction pattern for the following reason(s): %s");
529 var MSG_FREQUENCY_UNDEFINED = _("Frequency is not defined");
530 var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
531 var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
532 var MSG_MANA_SEARCHING = _("Searching for subscription in Mana Knowledge Base");
533 var MSG_MANA_RESULTS = _("Results from Mana Knowledge Base");
534 var MSG_MANA_SUBSCRIPTION_FOUND = _("Subscription found on Mana Knowledge Base:");
535 var MSG_MANA_SHOW_DETAILS = _("Show Mana results");
536 var MSG_MANA_NO_SUBSCRIPTION_FOUND = _("No subscription found on Mana Knowledge Base");
537 var MSG_MANA_SHARE_PATTERN = _("Please feel free to share your pattern with all others librarians once you are done");
539 [% Asset.js("js/subscription-add.js") | $raw %]
540 [% Asset.js("js/showpredictionpattern.js") | $raw %]
543 [% INCLUDE 'intranet-bottom.inc' %]