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' %]
11 fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
15 <body id="ser_subscription-add" class="ser">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'serials-search.inc' %]
19 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
22 [% UNLESS blocking_error %]
23 › [% 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 %]
26 [% INCLUDE 'blocking_errors.inc' %]
28 <div class="main container-fluid">
31 <h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle | html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
32 <form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated">
34 <input type="hidden" name="op" value="modsubscription" />
35 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
37 <input type="hidden" name="op" value="addsubscription" />
39 <input type="hidden" name="user" value="[% logged_in_user.userid | html %]" />
40 <input type="hidden" name="irreg_check" value="0" />
43 <div class="col-md-6">
44 <fieldset id="subscription_add_information" class="rows">
45 <legend>Subscription details</legend>
47 [% IF ( subscriptionid ) %]
48 <li><span class="label">Subscription #</span> [% subscriptionid | html %]</li>
51 <label for="aqbooksellerid">Vendor: </label>
52 <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>
55 <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
56 <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
57 (<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>
58 <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
59 [% IF ( CAN_user_editcatalogue ) %]
61 | <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum | html %]"><i class="fa fa-pencil"></i> Edit record</a>
63 | <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a>
69 [% IF ( serialsadditems ) %]
70 <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>
71 <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>
73 <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>
74 <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial</label></p>
78 <p>When there is an irregular issue:</p>
79 [% IF (skip_serialseq) %]
81 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" checked="checked" />
82 <label for="skip_serialseq_yes">Skip issue number</label>
85 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" />
86 <label for="skip_serialseq_no">Keep issue number</label>
90 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" />
91 <label for="skip_serialseq_yes">Skip issue number</label>
94 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" checked="checked" />
95 <label for="skip_serialseq_no">Keep issue number</label>
100 <label for="manualhistory">Manual history:</label>
101 [% IF (manualhistory) %]
102 <input type="checkbox" id="manualhistory" name="manualhist" checked="checked" />
104 <input type="checkbox" id="manualhistory" name="manualhist" />
108 <label for="callnumber">Call number:</label>
109 <input type="text" name="callnumber" id="callnumber" value="[% callnumber | html %]" size="20" />
112 <label for="branchcode">Library:</label>
113 <select name="branchcode" id="branchcode" style="width: 20em;">
114 [% UNLESS ( Independentbranches ) %]
115 <option value="">None</option>
117 [% IF CAN_user_serials_superserials %]
118 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
120 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
122 </select> (select a library)
125 <label for="notes">Public note:</label>
126 <textarea name="notes" id="notes" cols="30" rows="2">[% notes | html %]</textarea>
129 <label for="internalnotes">Nonpublic note:</label>
130 <textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes | html %]</textarea>
133 [% IF ( letterloop ) %]
134 <label for="letter">Patron notification: </label>
135 <select name="letter" id="letter">
136 <option value="">None</option>
137 [% FOREACH letterloo IN letterloop %]
138 [% IF ( letterloo.selected ) %]
139 <option value="[% letterloo.value | html %]" selected="selected">[% letterloo.lettername | html %]</option>
141 <option value="[% letterloo.value | html %]">[% letterloo.lettername | html %]</option>
145 <div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
147 <span class="label">Patron notification: </span>
148 <div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
152 <label for="location">Location:</label>
153 <select name="location" id="location">
154 <option value="">None</option>
155 [% FOREACH locations_loo IN locations_loop %]
156 [% IF locations_loo.authorised_value == location %]
157 <option value="[% locations_loo.authorised_value | html %]" selected="selected">[% locations_loo.lib | html %]</option>
159 <option value="[% locations_loo.authorised_value | html %]">[% locations_loo.lib | html %]</option>
165 <label for="itemtype">Item type:</label>
166 <select name="itemtype" id="itemtype">
167 <option value=""></option>
168 [% FOREACH type IN typeloop %]
169 [% IF ( type.selected ) %]
170 <option value="[% type.code | html %]" selected="selected">[% type.value | html %]</option>
172 <option value="[% type.code | html %]">[% type.value | html %]</option>
177 [%IF makePreviousSerialAvailable %]
179 <label for="previousitemtype">item type for older issues:</label>
180 <select name="previousitemtype" id="previousitemtype">
181 <option value=""></option>
182 [% FOREACH previous IN previoustypeloop %]
183 [% IF ( previous.selected ) %]
184 <option value="[% previous.code | html %]" selected="selected">[% previous.value | html %]</option>
186 <option value="[% previous.code | html %]">[% previous.value | html %]</option>
193 <label for="graceperiod">Grace period:</label>
194 <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod | html %]" size="5"/> day(s)
197 <label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label>
198 <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount | html %]" size="4"/>
201 <label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
202 <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount | html %]" size="4"/>
206 <fieldset class="action">
207 <input type="button" value="Next >>" id="subscription_add_next" style="float:right;" />
213 <div class="col-md-6">
214 [% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
216 <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
217 <a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a></center></p>
220 <div hidden id="mana_search" class="dialog message">
222 <div id="subscription_form_planning">
223 <fieldset class="rows">
224 <legend>Serials planning</legend>
227 <label for="acqui_date" class="required">First issue publication date:</label>
228 [% UNLESS (more_than_one_serial) %]
229 <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
231 [% firstacquidate | $KohaDates %]
232 <input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
235 [% IF (more_than_one_serial) %]
237 <label for="nextacquidate">Next issue publication date:</label>
238 <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
242 <label for="frequency" class="required">Frequency:</label>
243 <select name="frequency" size="1" id="frequency" class="required" required="required">
244 <option value="">-- please choose --</option>
245 [% FOREACH frequency IN frequencies %]
246 [% IF (frequency.selected) %]
247 <option value="[% frequency.id | html %]" selected="selected">
249 <option value="[% frequency.id | html %]">
251 [% frequency.label | html %]
257 <label for="subtype">Subscription length:</label>
258 <select name="subtype" id="subtype">
259 [% FOREACH st IN subtypes %]
261 [% CASE 'numberlength' %]
262 [% IF st == subtype %]
263 <option value="issues" selected="selected">
265 <option value="issues">
268 [% CASE 'weeklength' %]
269 [% IF st == subtype %]
270 <option value="weeks" selected="selected">
272 <option value="weeks">
275 [% CASE 'monthlength' %]
276 [% IF st == subtype %]
277 <option value="months" selected="selected">
279 <option value="months">
282 [% CASE %][% st | html %]
287 <input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" /> (enter amount in numerals)
288 <input type="hidden" name="issuelengthcount">
291 <label for="from" class="required"> Subscription start date:</label>
292 <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
295 <label for="to">Subscription end date:</label>
296 <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
299 <label for="numberpattern" class="required">Numbering pattern:</label>
300 <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
301 <option value="">-- please choose --</option>
302 [% FOREACH numberpattern IN numberpatterns %]
303 [% IF (numberpattern.selected) %]
304 <option value="[% numberpattern.id | html %]" selected="selected">
306 <option value="[% numberpattern.id | html %]">
308 [% numberpattern.label | html %]
314 <label for="locale">Locale:</label>
315 <select id="locale" name="locale">
316 <option value=""></option>
317 [% FOREACH l IN locales %]
318 [% IF l.language == locale %]
319 <option value="[% l.language | html %]" selected="selected">[% l.description | html %]</option>
321 <option value="[% l.language | html %]">[% l.description | html %]</option>
325 <span class="hint">If empty, English is used</span>
327 <li id="more_options">
328 <table id="moreoptionst">
332 <th id="headerX"> </th>
333 <th id="headerY"> </th>
334 <th id="headerZ"> </th>
340 [% IF (more_than_one_serial) %]
346 <td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 | html %]" /></td>
347 <td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 | html %]" /></td>
348 <td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 | html %]" /></td>
351 <td>Inner counter</td>
352 <td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 | html %]" /></td>
353 <td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 | html %]" /></td>
354 <td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 | html %]" /></td>
360 <a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
361 <a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
363 <div id="advancedpredictionpattern" style="display:none">
365 <label for="patternname" class="required">Pattern name:</label>
366 <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
369 <label for="numberingmethod">Numbering formula:</label>
370 <input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod | html %]" />
372 <table id="advancedpredictionpatternt">
375 <th colspan="4">Advanced prediction pattern</th>
387 <td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
388 <td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
389 <td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
393 <td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
394 <td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
395 <td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
399 <td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
400 <td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
401 <td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
405 <td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
406 <td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
407 <td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
411 <td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
412 <td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
413 <td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
416 <td>When more than</td>
417 <td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
418 <td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
419 <td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
422 <td>Inner counter</td>
423 <td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
424 <td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
425 <td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
428 [% BLOCK numbering_select %]
429 <select disabled="disabled" id="[% name | html %]" name="[% name | html %]">
430 <option value=""></option>
431 <option value="dayname">Name of day</option>
432 <option value="dayabrv">Name of day (abbreviated)</option>
433 <option value="monthname">Name of month</option>
434 <option value="monthabrv">Name of month (abbreviated)</option>
435 <option value="season">Name of season</option>
436 <option value="seasonabrv">Name of season (abbreviated)</option>
440 <td>[% PROCESS numbering_select name="numbering1" %]</td>
441 <td>[% PROCESS numbering_select name="numbering2" %]</td>
442 <td>[% PROCESS numbering_select name="numbering3" %]</td>
446 <input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
447 <input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
448 <input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
453 [% IF additional_fields_for_subscription %]
454 <div id="subscription_additional_fields">
455 [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_fields %]
459 <input type="hidden" id="mana_id" name="mana_id" value=""/>
460 <input type="hidden" id="sndescription" name="sndescription" value=""/>
461 <input type="hidden" id="sfdescription" name="sfdescription" value=""/>
462 <input type="hidden" id="unit" name="unit" value=""/>
463 <input type="hidden" id="unitsperissue" name="unitsperissue" value=""/>
464 <input type="hidden" id="issuesperunit" name="issuesperunit" value=""/>
465 <fieldset class="action">
466 <input type="button" id="subscription_add_previous" value="<< Previous" style="float:left;"/>
467 <input id="testpatternbutton" type="button" value="Test prediction pattern" />
468 <input id="save-subscription" type="submit" value="Save subscription" style="float:right;" accesskey="w"/>
472 <div class="col-md-6">
473 <li id="displayexample"></li>
478 <div id="mana_search_result" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="width: 100%; left:0%; margin-left: auto; display: none;">
479 <div class="modal-dialog modal-lg">
480 <div class="modal-content">
481 <div class="modal-header">
482 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
483 <h3 id="mana_search_result_label"></h3>
485 <div class="modal-body">
489 [% MACRO jsinclude BLOCK %]
490 [% INCLUDE 'calendar.inc' %]
491 [% INCLUDE 'datatables.inc' %]
493 var subscriptionid = "[% subscriptionid | html %]";
494 var irregularity = "[% irregularity | html %]";
495 var more_than_one_serial = "[% more_than_one_serial | html %]";
497 [% FOREACH field IN dont_export_field_loop %]
498 tags.push("[% field.fieldid | html %]");
500 var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %]0[% END %];
501 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");
502 var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record");
503 var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date.");
504 var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription.");
505 var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date");
506 var MSG = _("You have modified the advanced prediction pattern. Please save your work or cancel modifications.");
507 var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid")
508 var MSG_PATTERN_NAME = _("Please enter a name for this pattern");
509 var MSG_PATTERN_NAME_EXISTS = _("This pattern name already exists. Do you want to modify it?");
510 var MSG_OVERWRITE_PATTERNS = _("Warning: it will modify the pattern for all subscriptions that are using it.");
511 var MSG_PATTERN_CREATE_FAILED = _("Something went wrong. Unable to create a new numbering pattern.");
512 var MSG_PATTERN_TEST_FAILED = _("Cannot test prediction pattern for the following reason(s): %s");
513 var MSG_FREQUENCY_UNDEFINED = _("Frequency is not defined");
514 var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
515 var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
517 [% Asset.js("js/subscription-add.js") | $raw %]
518 [% Asset.js("js/showpredictionpattern.js") | $raw %]
521 [% INCLUDE 'intranet-bottom.inc' %]