4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Serials › [% IF ( modify ) %][% bibliotitle |html %] › Modify subscription[% ELSE %]New subscription[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'calendar.inc' %]
8 <style type="text/css">
9 fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
10 .yui-u li p label.widelabel {
11 width: 300px; /* not enough for IE7 apparently */
14 <script type="text/javascript">
17 var globalnumpatterndata;
19 var advancedpatternlocked;
20 var patternneedtobetested = 0;
21 [% IF ( irregularity ) %]patternneedtobetested = 1;[% END %]
23 function check_issues(){
24 if (globalfreqdata.unit.length >0) {
25 if (document.f.subtype.value == globalfreqdata.unit){
26 document.f.issuelengthcount.value=(document.f.sublength.value*globalfreqdata.issuesperunit)/globalfreqdata.unitsperissue;
27 } else if (document.f.subtype.value != "issues"){
28 alert(_("Frequency and subscription length provided doesn't combine well. Please consider entering an issue count rather than a time period."));
33 function addbiblioPopup(biblionumber) {
34 var destination = "/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup";
36 destination += "&biblionumber="+biblionumber;
38 window.open(destination,'AddBiblioPopup','width=1024,height=768,toolbar=no,scrollbars=yes');
43 window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
48 window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
53 window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
60 function Check_page1() {
61 if ( $("#aqbooksellerid").val().length == 0) {
62 input_box = confirm(_("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"));
63 if (input_box==false) {
67 if ($("#biblionumber").val().length == 0) {
68 alert(_("You must choose or create a biblio"));
75 function Check_page2(){
76 [% UNLESS (more_than_one_serial) %]
77 if($("#acqui_date").val().length == 0){
78 alert(_("You must choose a first publication date"));
82 if($("#sublength").val().length == 0 && $("input[name='enddate']").val().length == 0){
83 alert(_("You must choose a subscription length or an end date."));
86 if(advancedpatternlocked == 0){
87 alert(_("You have modified the advanced prediction pattern. Please save your work or cancel modifications."));
90 if(patternneedtobetested){
91 [% IF (irregularity) %]
92 alert(_("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid"));
93 [% ELSE %]alert(_("Please click on 'Test prediction pattern' before saving subscription."));[% END %]
100 function frequencyload(){
101 $.getJSON("subscription-frequency.pl",{"frequency_id":document.f.frequency.value,ajax:'true'},
103 globalfreqdata=freqdata;
104 if ( globalfreqdata.unit && globalfreqdata.unit.length == 0 ) {
105 var option = $("#subtype option[value='issues']");
106 $(option).attr('selected', 'selected');
107 $("#subtype option[value!='issues']").prop('disabled', true)
109 $("#subtype option").prop('disabled', false)
115 function numberpatternload(){
116 $.getJSON("subscription-numberpattern.pl",{"numberpattern_id":document.f.numbering_pattern.value,ajax:'true'},
117 function(numpatterndata){
118 globalnumpatterndata=numpatterndata;
119 if (globalnumpatterndata==undefined){
122 displaymoreoptions();
123 restoreAdvancedPattern();
128 function displaymoreoptions() {
129 if(globalnumpatterndata == undefined){
130 $("#moreoptionst").hide();
134 var X = 0, Y = 0, Z = 0;
135 var numberingmethod = globalnumpatterndata.numberingmethod;
136 if(numberingmethod.match(/{X}/)) X = 1;
137 if(numberingmethod.match(/{Y}/)) Y = 1;
138 if(numberingmethod.match(/{Z}/)) Z = 1;
141 $("#moreoptionst").show();
143 $("#moreoptionst").hide();
147 if(globalnumpatterndata.label1) {
148 $("#headerX").html(globalnumpatterndata.label1);
150 $("#headerX").html("X");
152 $("#headerX").show();
153 $("#beginsX").show();
156 $("#headerX").hide();
157 $("#beginsX").hide();
159 $("#lastvaluetemp1").val('');
160 $("#innerlooptemp1").val('');
163 if(globalnumpatterndata.label2) {
164 $("#headerY").html(globalnumpatterndata.label2);
166 $("#headerY").html("Y");
168 $("#headerY").show();
169 $("#beginsY").show();
172 $("#headerY").hide();
173 $("#beginsY").hide();
175 $("#lastvaluetemp2").val('');
176 $("#innerlooptemp2").val('');
179 if(globalnumpatterndata.label3) {
180 $("#headerZ").html(globalnumpatterndata.label3);
182 $("#headerZ").html("Z");
184 $("#headerZ").show();
185 $("#beginsZ").show();
188 $("#headerZ").hide();
189 $("#beginsZ").hide();
191 $("#lastvaluetemp3").val('');
192 $("#innerlooptemp3").val('');
196 function modifyAdvancedPattern() {
197 $("#patternname").prop('readOnly', false).val('');
198 $("#numberingmethod").prop('readOnly', false);
200 $("#advancedpredictionpatternt input").each(function() {
201 $(this).prop('readOnly', false);
203 $("#advancedpredictionpatternt select").each(function() {
204 $(this).prop('disabled', false);
207 $("#restoreadvancedpatternbutton").show();
208 $("#saveadvancedpatternbutton").show();
209 $("#modifyadvancedpatternbutton").hide();
211 advancedpatternlocked = 0;
214 function restoreAdvancedPattern() {
215 $("#patternname").prop('readOnly', true).val(globalnumpatterndata.label);
216 $("#numberingmethod").prop('readOnly', true).val(globalnumpatterndata.numberingmethod);
218 $("#advancedpredictionpatternt input").each(function() {
219 $(this).prop('readOnly', true);
220 var id = $(this).attr('id');
221 if(id.match(/lastvalue/) || id.match(/innerloop/)) {
222 var tempid = id.replace(/(\d)/, "temp$1");
223 $(this).val($("#"+tempid).val());
225 $(this).val(globalnumpatterndata[id]);
228 $("#advancedpredictionpatternt select").each(function() {
229 $(this).prop('disabled', true);
230 var id = $(this).attr('id');
231 $(this).val(globalnumpatterndata[id]);
234 $("#restoreadvancedpatternbutton").hide();
235 $("#saveadvancedpatternbutton").hide();
236 $("#modifyadvancedpatternbutton").show();
238 advancedpatternlocked = 1;
241 function testPredictionPattern() {
242 var frequencyid = $("#frequency").val();
246 if(frequencyid == undefined || frequencyid == ""){
247 error_msg += _("- Frequency is not defined") + "\n";
250 acquidate = $("#acqui_date").val();
251 if(acquidate == undefined || acquidate == ""){
252 error_msg += _("- First publication date is not defined") + "\n";
255 [% IF (more_than_one_serial) %]
256 var nextacquidate = $("#nextacquidate").val();
257 if(nextacquidate == undefined || nextacquidate == ""){
258 error_msg += _("- Next issue publication date is not defined") + "\n";
264 alert(_("Cannot test prediction pattern for the following reason(s): %s").format(error_msg));
268 var custompattern = 0;
269 if(advancedpatternlocked == 0) {
274 'custompattern': custompattern,
275 [% IF (subscriptionid) %]
276 'subscriptionid': [% subscriptionid %],
278 [% IF (more_than_one_serial) %]
279 'nextacquidate': nextacquidate,
281 'firstacquidate': acquidate
284 'to', 'subtype', 'sublength', 'frequency', 'numberingmethod',
285 'lastvalue1', 'lastvalue2', 'lastvalue3', 'add1', 'add2', 'add3',
286 'every1', 'every2', 'every3', 'innerloop1', 'innerloop2', 'innerloop3',
287 'setto1', 'setto2', 'setto3', 'numbering1', 'numbering2', 'numbering3',
288 'whenmorethan1', 'whenmorethan2', 'whenmorethan3', 'locale'
290 for(i in ajaxParams) {
291 var param = ajaxParams[i];
292 var value = $("#"+param).val();
294 ajaxData[param] = value;
298 url:"/cgi-bin/koha/serials/showpredictionpattern.pl",
300 success: function(data) {
301 $("#displayexample").html(data);
302 patternneedtobetested = 0;
307 function saveAdvancedPattern() {
308 if ($("#patternname").val().length == 0) {
309 alert(_("Please enter a name for this pattern"));
313 // Check if patternname already exists, and modify pattern
314 // instead of creating it if so
316 $("#numberpattern option").each(function(){
317 if($(this).text() == $("#patternname").val()){
324 var msg = _("This pattern name already exists. Do you want to modify it?")
325 + "\n" + _("Warning: it will modify the pattern for all subscriptions that are using it.");
326 cnfrm = confirm(msg);
332 'patternname', 'numberingmethod', 'label1', 'label2', 'label3',
333 'add1', 'add2', 'add3', 'every1', 'every2', 'every3',
334 'setto1', 'setto2', 'setto3', 'numbering1', 'numbering2', 'numbering3',
335 'whenmorethan1', 'whenmorethan2', 'whenmorethan3', 'locale'
337 for(i in ajaxParams) {
338 var param = ajaxParams[i];
339 var value = $("#"+param).val();
341 ajaxData[param] = value;
345 "/cgi-bin/koha/serials/create-numberpattern.pl",
348 if (data.numberpatternid) {
350 $("#numberpattern").append("<option value=\""+data.numberpatternid+"\">"+$("#patternname").val()+"</option>");
352 $("#numberpattern").val(data.numberpatternid);
355 alert(_("Something went wrong. Unable to create a new numbering pattern."));
362 function show_page_1() {
365 $("#page_number").text("1/2");
368 function show_page_2() {
371 $("#page_number").text("2/2");
372 displaymoreoptions();
376 $(document).ready(function() {
377 $("#aqbooksellerid").on('keypress', function(e) {
378 if (e.keyCode == 13) {
383 $("#biblionumber").on('keypress', function(e) {
384 if (e.keyCode == 13) {
389 $("select#frequency").change(function(){
390 patternneedtobetested = 1;
391 $("input[name='enddate']").val('');
394 $("select#numberpattern").change(function(){
395 patternneedtobetested = 1;
398 $("#subtype").change(function(){
399 $("input[name='enddate']").val('');
401 $("#sublength").change(function(){
402 $("input[name='enddate']").val('');
404 $("#lastvaluetemp1").keyup(function(){
405 $("#lastvalue1").val($(this).val());
407 $("#lastvaluetemp2").keyup(function(){
408 $("#lastvalue2").val($(this).val());
410 $("#lastvaluetemp3").keyup(function(){
411 $("#lastvalue3").val($(this).val());
413 $("#lastvalue1").keyup(function(){
414 $("#lastvaluetemp1").val($(this).val());
416 $("#lastvalue2").keyup(function(){
417 $("#lastvaluetemp2").val($(this).val());
419 $("#lastvalue3").keyup(function(){
420 $("#lastvaluetemp3").val($(this).val());
423 $("#innerlooptemp1").keyup(function(){
424 $("#innerloop1").val($(this).val());
426 $("#innerlooptemp2").keyup(function(){
427 $("#innerloop2").val($(this).val());
429 $("#innerlooptemp3").keyup(function(){
430 $("#innerloop3").val($(this).val());
432 $("#innerloop1").keyup(function(){
433 $("#innerlooptemp1").val($(this).val());
435 $("#innerloop2").keyup(function(){
436 $("#innerlooptemp2").val($(this).val());
438 $("#innerloop3").keyup(function(){
439 $("#innerlooptemp3").val($(this).val());
442 if($("#frequency").val() != ""){
445 if($("#numberpattern").val() != ""){
450 [% FOREACH field IN dont_export_field_loop %]
451 node = $("[name='[% field.fieldid %]']");
452 if ( $(node).is('input') || $(node).is('textarea') ) {
454 } else if ( $(node).is('select') ) {
455 $(node).find("option:first").attr('selected','selected');
460 $("#subscription_add_form").on("submit",function(){
461 return Check_page2();
463 $("#vendor_search").on("click",function(e){
467 $("#record_search").on("click",function(e){
471 $("#biblio_add_edit").on("click",function(e){
473 if( $(this).data("biblionumber") ){
474 addbiblioPopup( $(this).data("biblionumber") );
479 $("#subscription_add_next").on("click",function(){
480 if ( Check_page1() ){
484 $("#subscription_add_previous").on("click",function(){
487 $(".toggle_advanced_pattern").on("click",function(e){
489 $("#advancedpredictionpattern").toggle();
490 $(".toggle_advanced_pattern").toggle();
492 $("#modifyadvancedpatternbutton").on("click",function(e){
494 modifyAdvancedPattern();
496 $("#restoreadvancedpatternbutton").on("click",function(e){
498 restoreAdvancedPattern();
500 $("#saveadvancedpatternbutton").on("click",function(e){
502 saveAdvancedPattern();
504 $("#testpatternbutton").on("click",function(e){
506 testPredictionPattern();
512 <body id="ser_subscription-add" class="ser">
513 [% INCLUDE 'header.inc' %]
514 [% INCLUDE 'serials-search.inc' %]
516 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]"><i>[% bibliotitle |html %]</i></a> › Modify subscription[% ELSE %]New subscription[% END %]</div>
518 <div id="doc3" class="yui-t7">
521 <h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
522 <form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated">
524 <input type="hidden" name="op" value="modsubscription" />
525 <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
527 <input type="hidden" name="op" value="addsubscription" />
529 <input type="hidden" name="user" value="[% loggedinusername %]" />
530 <input type="hidden" name="irreg_check" value="0" />
533 <div class="yui-u first">
534 <fieldset id="subscription_add_information" class="rows">
535 <legend>Subscription details</legend>
537 [% IF ( subscriptionid ) %]
538 <li><span class="label">Subscription #</span> [% subscriptionid %]</li>
541 <label for="aqbooksellerid">Vendor: </label>
542 <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" id="vendor_search"><i class="fa fa-search"></i> Search for a vendor</a>
545 <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
546 <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" />
547 (<input type="text" name="title" value="[% bibliotitle %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
548 <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
549 [% IF ( CAN_user_editcatalogue ) %]
551 | <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum %]"><i class="fa fa-pencil"></i> Edit record</a>
553 | <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a>
559 [% IF ( serialsadditems ) %]
560 <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>
561 <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>
563 <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>
564 <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>
568 <p>When there is an irregular issue:</p>
569 [% IF (skip_serialseq) %]
571 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" checked="checked" />
572 <label for="skip_serialseq_yes">Skip issue number</label>
575 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" />
576 <label for="skip_serialseq_no">Keep issue number</label>
580 <input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" />
581 <label for="skip_serialseq_yes">Skip issue number</label>
584 <input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" checked="checked" />
585 <label for="skip_serialseq_no">Keep issue number</label>
590 <label for="manualhistory">Manual history:</label>
591 [% IF (manualhistory) %]
592 <input type="checkbox" id="manualhistory" name="manualhist" checked="checked" />
594 <input type="checkbox" id="manualhistory" name="manualhist" />
598 <label for="callnumber">Call number:</label>
599 <input type="text" name="callnumber" id="callnumber" value="[% callnumber %]" size="20" />
602 <label for="branchcode">Library:</label>
603 <select name="branchcode" id="branchcode" style="width: 20em;">
604 [% UNLESS ( Independentbranches ) %]
605 <option value="">None</option>
607 [% IF CAN_user_serials_superserials %]
608 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
610 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
612 </select> (select a library)
615 <label for="notes">Public note:</label>
616 <textarea name="notes" id="notes" cols="30" rows="2">[% notes %]</textarea>
619 <label for="internalnotes">Nonpublic note:</label>
620 <textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes %]</textarea>
623 [% IF ( letterloop ) %]
624 <label for="letter">Patron notification: </label>
625 <select name="letter" id="letter">
626 <option value="">None</option>
627 [% FOREACH letterloo IN letterloop %]
628 [% IF ( letterloo.selected ) %]
629 <option value="[% letterloo.value %]" selected="selected">[% letterloo.lettername %]</option>
631 <option value="[% letterloo.value %]">[% letterloo.lettername %]</option>
635 <div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
637 <span class="label">Patron notification: </span>
638 <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>
642 <label for="location">Location:</label>
643 <select name="location" id="location">
644 <option value="">None</option>
645 [% FOREACH locations_loo IN locations_loop %]
646 [% IF locations_loo.authorised_value == location %]
647 <option value="[% locations_loo.authorised_value %]" selected="selected">[% locations_loo.lib %]</option>
649 <option value="[% locations_loo.authorised_value %]">[% locations_loo.lib %]</option>
655 <label for="itemtype">Item type:</label>
656 <select name="itemtype" id="itemtype">
657 <option value=""></option>
658 [% FOREACH type IN typeloop %]
659 [% IF ( type.selected ) %]
660 <option value="[% type.code %]" selected="selected">[% type.value %]</option>
662 <option value="[% type.code %]">[% type.value %]</option>
667 [%IF makePreviousSerialAvailable %]
669 <label for="previousitemtype">item type for older issues:</label>
670 <select name="previousitemtype" id="previousitemtype">
671 <option value=""></option>
672 [% FOREACH previous IN previoustypeloop %]
673 [% IF ( previous.selected ) %]
674 <option value="[% previous.code %]" selected="selected">[% previous.value %]</option>
676 <option value="[% previous.code %]">[% previous.value %]</option>
683 <label for="graceperiod">Grace period:</label>
684 <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod %]" size="5"/> day(s)
687 <label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label>
688 <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount %]" size="4"/>
691 <label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
692 <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount %]" size="4"/>
696 <fieldset class="action">
697 <input type="button" value="Next >>" id="subscription_add_next" style="float:right;" />
703 <div class="yui-u first">
704 <div id="subscription_form_planning">
705 <fieldset class="rows">
706 <legend>Serials planning</legend>
709 <label for="firstacquidate" class="required">First issue publication date:</label>
710 [% UNLESS (more_than_one_serial) %]
711 <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
713 [% firstacquidate | $KohaDates %]
714 <input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
717 [% IF (more_than_one_serial) %]
719 <label for="nextacquidate">Next issue publication date:</label>
720 <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
724 <label for="frequency" class="required">Frequency:</label>
725 <select name="frequency" size="1" id="frequency" class="required" required="required">
726 <option value="">-- please choose --</option>
727 [% FOREACH frequency IN frequencies %]
728 [% IF (frequency.selected) %]
729 <option value="[% frequency.id %]" selected="selected">
731 <option value="[% frequency.id %]">
733 [% frequency.label %]
739 <label for="subtype">Subscription length:</label>
740 <select name="subtype" id="subtype">
741 [% FOREACH st IN subtypes %]
743 [% CASE 'numberlength' %]
744 [% IF st == subtype %]
745 <option value="issues" selected="selected">
747 <option value="issues">
750 [% CASE 'weeklength' %]
751 [% IF st == subtype %]
752 <option value="weeks" selected="selected">
754 <option value="weeks">
757 [% CASE 'monthlength' %]
758 [% IF st == subtype %]
759 <option value="months" selected="selected">
761 <option value="months">
769 <input type="text" name="sublength" id="sublength" value="[% sublength %]" size="3" /> (enter amount in numerals)
770 <input type="hidden" name="issuelengthcount">
773 <label for="startdate" class="required"> Subscription start date:</label>
774 <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
777 <label for="enddate">Subscription end date:</label>
778 <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
781 <label for="numberpattern" class="required">Numbering pattern:</label>
782 <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
783 <option value="">-- please choose --</option>
784 [% FOREACH numberpattern IN numberpatterns %]
785 [% IF (numberpattern.selected) %]
786 <option value="[% numberpattern.id %]" selected="selected">
788 <option value="[% numberpattern.id %]">
790 [% numberpattern.label %]
796 <label for="locale">Locale:</label>
797 <select id="locale" name="locale">
798 <option value=""></option>
799 [% FOREACH l IN locales %]
800 [% IF l.language == locale %]
801 <option value="[% l.language %]" selected="selected">[% l.description %]</option>
803 <option value="[% l.language %]">[% l.description %]</option>
807 <span class="hint">If empty, English is used</span>
809 <li id="more_options">
810 <table id="moreoptionst">
814 <th id="headerX"> </th>
815 <th id="headerY"> </th>
816 <th id="headerZ"> </th>
822 [% IF (more_than_one_serial) %]
828 <td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 %]" /></td>
829 <td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 %]" /></td>
830 <td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 %]" /></td>
833 <td>Inner counter</td>
834 <td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 %]" /></td>
835 <td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 %]" /></td>
836 <td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 %]" /></td>
842 <a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
843 <a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
845 <div id="advancedpredictionpattern" style="display:none">
847 <label for="patternname" class="required">Pattern name:</label>
848 <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
851 <label for="numberingmethod">Numbering formula:</label>
852 <input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod %]" />
854 <table id="advancedpredictionpatternt">
857 <th colspan="4">Advanced prediction pattern</td>
869 <td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
870 <td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
871 <td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
875 <td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
876 <td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
877 <td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
881 <td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
882 <td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
883 <td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
887 <td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
888 <td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
889 <td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
893 <td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
894 <td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
895 <td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
898 <td>When more than</td>
899 <td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
900 <td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
901 <td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
904 <td>Inner counter</td>
905 <td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
906 <td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
907 <td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
910 [% BLOCK numbering_select %]
911 <select disabled="disabled" id="[% name %]" name="[% name %]" />
912 <option value=""></option>
913 <option value="dayname">Name of day</option>
914 <option value="dayabrv">Name of day (abbreviated)</option>
915 <option value="monthname">Name of month</option>
916 <option value="monthabrv">Name of month (abbreviated)</option>
917 <option value="season">Name of season</option>
918 <option value="seasonabrv">Name of season (abbreviated)</option>
922 <td>[% PROCESS numbering_select name="numbering1" %]</td>
923 <td>[% PROCESS numbering_select name="numbering2" %]</td>
924 <td>[% PROCESS numbering_select name="numbering3" %]</td>
928 <input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
929 <input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
930 <input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
935 [% IF additional_fields_for_subscription %]
936 <div id="subscription_additional_fields">
937 <fieldset class="rows">
938 <legend>Additional fields</legend>
940 [% FOR field IN additional_fields_for_subscription %]
942 <label for="additional_field_[% field.id %]"> [% field.name %]: </label>
943 [% IF field.authorised_value_choices %]
944 <select name="additional_field_[% field.id %]" id="additional_field_[% field.id %]">
945 [% FOREACH av IN field.authorised_value_choices %]
946 [% IF av.authorised_value == additional_fields.${field.name} %]
947 <option value="[% av.authorised_value %]" selected="selected">[% av.lib %]</option>
949 <option value="[% av.authorised_value %]">[% av.lib %]</option>
952 </select> (Authorised values for [% field.authorised_value_category %])
954 [% IF field.marcfield %]
955 <input type="text" value="[% additional_fields.${field.name} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" readonly="readonly" />
956 This value will be filled with the [% field.marcfield %] subfield of the selected biblio.
958 <input type="text" value="[% additional_fields.${field.name} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" />
968 <fieldset class="action">
969 <input type="button" id="subscription_add_previous" value="<< Previous" style="float:left;"/>
970 <input id="testpatternbutton" type="button" value="Test prediction pattern" />
971 <input type="submit" value="Save subscription" style="float:right;" accesskey="w" />
976 <li id="displayexample"></li>
984 [% INCLUDE 'intranet-bottom.inc' %]