Lines 7-13
Link Here
|
7 |
<style type="text/css"> |
7 |
<style type="text/css"> |
8 |
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ |
8 |
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ |
9 |
.yui-u li p label.widelabel { |
9 |
.yui-u li p label.widelabel { |
10 |
width: 300px; /* not enough for IE7 apparently */ |
10 |
width: 300px; /* not enough for IE7 apparently */ |
11 |
} |
11 |
} |
12 |
</style> |
12 |
</style> |
13 |
<script type="text/javascript"> |
13 |
<script type="text/javascript"> |
Lines 433-438
$(document).ready(function() {
Link Here
|
433 |
if($("#numberpattern").val() != ""){ |
433 |
if($("#numberpattern").val() != ""){ |
434 |
numberpatternload(); |
434 |
numberpatternload(); |
435 |
} |
435 |
} |
|
|
436 |
$("#lifespan_type").change(function(){ |
437 |
if($(this).val() > 0){ |
438 |
$("#serial_lifespan").show(); |
439 |
[% IF serial_lifespan > 0 %] |
440 |
$("#serial_lifespan").val([% serial_lifespan %]); |
441 |
[% ELSE %] |
442 |
$("#serial_lifespan").val(1); |
443 |
[% END %] |
444 |
|
445 |
} |
446 |
else{ |
447 |
$("#serial_lifespan").hide(); |
448 |
$("#serial_lifespan").val(-1); |
449 |
} |
450 |
}); |
451 |
$("#lifespan_type").change(); |
436 |
|
452 |
|
437 |
var node; |
453 |
var node; |
438 |
[% FOREACH field IN dont_export_field_loop %] |
454 |
[% FOREACH field IN dont_export_field_loop %] |
Lines 460-720
$(document).ready(function() {
Link Here
|
460 |
<div class="yui-g"> |
476 |
<div class="yui-g"> |
461 |
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1> |
477 |
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1> |
462 |
<form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated" onsubmit="return Check_page2();" > |
478 |
<form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated" onsubmit="return Check_page2();" > |
463 |
|
479 |
[% IF ( modify ) %] |
464 |
[% IF ( modify ) %] |
480 |
<input type="hidden" name="op" value="modsubscription" /> |
465 |
<input type="hidden" name="op" value="modsubscription" /> |
481 |
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" /> |
466 |
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" /> |
|
|
467 |
[% ELSE %] |
468 |
<input type="hidden" name="op" value="addsubscription" /> |
469 |
[% END %] |
470 |
<input type="hidden" name="user" value="[% loggedinusername %]" /> |
471 |
<input type="hidden" name="irreg_check" value="0" /> |
472 |
<input type="hidden" name="issuesexpected1" id="issuesexpected1" value="0" /> |
473 |
|
474 |
<div class="yui-u first"> |
475 |
<fieldset id="subscription_add_information" class="rows"> |
476 |
<legend>Subscription details</legend> |
477 |
<ol> |
478 |
[% IF ( subscriptionid ) %] |
479 |
<li><span class="label">Subscription #</span> [% subscriptionid %]</li> |
480 |
[% END %] |
481 |
<li> |
482 |
<label for="aqbooksellerid">Vendor: </label> |
483 |
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a> |
484 |
</li> |
485 |
<li> |
486 |
<label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Biblio:</label> |
487 |
|
488 |
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" /> |
489 |
(<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> |
490 |
<div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for Biblio</a> |
491 |
[% IF ( CAN_user_editcatalogue ) %] |
492 |
[% IF ( modify ) %] |
493 |
| <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit biblio</a> |
494 |
[% ELSE %] |
495 |
| <a href="#" onclick="addbiblioPopup(); return false;">Create Biblio</a> |
496 |
[% END %] |
497 |
[% END %] |
498 |
</div> |
499 |
|
500 |
</li> |
501 |
<li class="radio"> |
502 |
[% IF ( serialsadditems ) %] |
503 |
<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> |
504 |
<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> |
505 |
[% ELSE %] |
506 |
<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> |
507 |
<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> |
508 |
[% END %] |
509 |
</li> |
510 |
<li> |
511 |
<label for="serial_lifespan">Serial lifespan:</label> |
512 |
<select name="serial_lifespan" id="serial_lifespan"> |
513 |
[% IF ( serial_lifespan == -1 ) %] |
514 |
<option value="-1" selected="selected">Permanent</option> |
515 |
[% ELSE %] |
516 |
<option value="-1">Permanent</option> |
517 |
[% END %] |
518 |
[% IF ( serial_lifespan == 1 ) %] |
519 |
<option value="1" selected="selected">1 year</option> |
520 |
[% ELSE %] |
521 |
<option value="1">1 year</option> |
522 |
[% END %] |
523 |
[% IF ( serial_lifespan == 2 ) %] |
524 |
<option value="2" selected="selected">2 years</option> |
525 |
[% ELSE %] |
526 |
<option value="2">2 years</option> |
527 |
[% END %] |
528 |
[% IF ( serial_lifespan == 3 ) %] |
529 |
<option value="3" selected="selected">3 years</option> |
530 |
[% ELSE %] |
531 |
<option value="3">3 years</option> |
532 |
[% END %] |
533 |
[% IF ( serial_lifespan == 4 ) %] |
534 |
<option value="4" selected="selected">4 years</option> |
535 |
[% ELSE %] |
536 |
<option value="4">4 years</option> |
537 |
[% END %] |
538 |
[% IF ( serial_lifespan == 5 ) %] |
539 |
<option value="5" selected="selected">5 years</option> |
540 |
[% ELSE %] |
541 |
<option value="5">5 years</option> |
542 |
[% END %] |
543 |
[% IF ( serial_lifespan == 6 ) %] |
544 |
<option value="6" selected="selected">6 years</option> |
545 |
[% ELSE %] |
546 |
<option value="6">6 years</option> |
547 |
[% END %] |
548 |
[% IF ( serial_lifespan == 7 ) %] |
549 |
<option value="7" selected="selected">7 years</option> |
550 |
[% ELSE %] |
551 |
<option value="7">7 years</option> |
552 |
[% END %] |
553 |
[% IF ( serial_lifespan == 8 ) %] |
554 |
<option value="8" selected="selected">8 years</option> |
555 |
[% ELSE %] |
556 |
<option value="8">8 years</option> |
557 |
[% END %] |
558 |
[% IF ( serial_lifespan == 9 ) %] |
559 |
<option value="9" selected="selected">9 years</option> |
560 |
[% ELSE %] |
561 |
<option value="9">9 years</option> |
562 |
[% END %] |
563 |
[% IF ( serial_lifespan == 10 ) %] |
564 |
<option value="10" selected="selected">10 years</option> |
565 |
[% ELSE %] |
566 |
<option value="10">10 years</option> |
567 |
[% END %] |
568 |
</select> |
569 |
<div class="hint">Set the subscription's serial lifespan. A serial will be considered "out of date" after the chosen time period.</div> |
570 |
</li> |
571 |
<li> |
572 |
<label for="branchcode">Library:</label> |
573 |
|
574 |
<select name="branchcode" id="branchcode" style="width: 20em;"> |
575 |
[% UNLESS ( IndependentBranches ) %]<option value="">None</option>[% END %] |
576 |
[% FOREACH branchloo IN branchloop %][% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> |
577 |
[% ELSE %] |
578 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
579 |
[% END %] |
580 |
[% END %] |
581 |
</select> (select a library) |
582 |
|
583 |
</li> |
584 |
<li> |
585 |
<label for="location">Location:</label> |
586 |
<select name="location" id="location"> |
587 |
<option value="">None</option> |
588 |
[% FOREACH locations_loo IN locations_loop %][% IF ( locations_loo.selected ) %]<option value="[% locations_loo.authorised_value %]" selected="selected">[% locations_loo.lib %]</option>[% ELSE %]<option value="[% locations_loo.authorised_value %]">[% locations_loo.lib %]</option>[% END %][% END %] |
589 |
</select> |
590 |
</li> |
591 |
<li> |
592 |
<label for="callnumber">Call number:</label> |
593 |
<input type="text" name="callnumber" id="callnumber" value="[% callnumber %]" size="20" /> |
594 |
</li> |
595 |
<li> |
596 |
<label for="graceperiod">Grace period:</label> <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod %]" size="5"/> day(s) |
597 |
</li> |
598 |
<li> |
599 |
<label for="notes">OPAC note:</label> |
600 |
<textarea name="notes" id="notes" cols="30" rows="2">[% notes %]</textarea> |
601 |
</li> |
602 |
<li> |
603 |
<label for="internalnotes">Nonpublic note:</label> |
604 |
<textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes %]</textarea> |
605 |
</li> |
606 |
<li> |
607 |
|
608 |
[% IF ( letterloop ) %] |
609 |
<label for="letter">Patron notification: </label> |
610 |
<select name="letter" id="letter"> |
611 |
<option value="">None</option> |
612 |
[% FOREACH letterloo IN letterloop %] |
613 |
[% IF ( letterloo.selected ) %] |
614 |
<option value="[% letterloo.value %]" selected="selected">[% letterloo.lettername %]</option> |
615 |
[% ELSE %] |
616 |
<option value="[% letterloo.value %]">[% letterloo.lettername %]</option> |
617 |
[% END %] |
618 |
[% END %] |
619 |
</select> |
620 |
<div class="hint">Select a notice and subscribers will be notified when new issues are received.</div> |
621 |
[% ELSE %] |
622 |
<span class="label">Patron notification: </span> |
623 |
<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> |
624 |
[% END %] |
625 |
</li> |
626 |
<li> |
627 |
<label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label> |
628 |
<input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount %]" size="4"/> |
629 |
</li> |
630 |
<li> |
631 |
<label class="widelabel" for="opacdisplaycount">Number of issues to display in OPAC: </label> |
632 |
<input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount %]" size="4"/> |
633 |
</li> |
634 |
</ol> |
635 |
</fieldset> |
636 |
</div> |
637 |
|
638 |
<div class="yui-u"> |
639 |
<div id="subscription_form_history" style="display:none"><h3 style="display:inline">Subscription history</h3> <a href="#" id="cancel_manual_history">[cancel manual history]</a> |
640 |
<p>Hint: you can update the serial history manually. This can be useful for an old subscription or to clean the existing history. Modify these fields with care, as future serial receive will continue to update them automatically.</p> |
641 |
<fieldset class="rows"> |
642 |
<ol> |
643 |
<li> |
644 |
<label for="histstartdate">Subscription start date: </label> |
645 |
<input type="text" name="histstartdate" id="histstartdate" value="[% histstartdate %]" /><div class="hint"> (start date of the 1st subscription)</div> |
646 |
</li> |
647 |
<li> |
648 |
<label for="histenddate">Subscription end date: </label> |
649 |
<input type="text" name="histenddate" id="histenddate" value="[% histenddate %]" /> <div class="hint">(if empty, subscription is still active)</div> |
650 |
</li> |
651 |
<li> |
652 |
<label for="recievedlist">Received issues: </label> |
653 |
<textarea name="recievedlist" id="recievedlist" cols="60" rows="5">[% recievedlist %]</textarea> |
654 |
</li> |
655 |
<li> |
656 |
<label for="missinglist">Missing issues: </label> |
657 |
<textarea name="missinglist" id="missinglist" cols="60" rows="5">[% missinglist %]</textarea> |
658 |
</li> |
659 |
<li> |
660 |
<label for="opacnote">Note for OPAC: </label> |
661 |
<textarea name="opacnote" id="opacnote" cols="60" rows="5">[% opacnote %]</textarea> |
662 |
</li> |
663 |
<li> |
664 |
<label for="librariannote">Note for staff: </label> |
665 |
<textarea name="librariannote" id="librariannote" cols="60" rows="5">[% librariannote %]</textarea> |
666 |
</li> |
667 |
</ol> |
668 |
</fieldset> |
669 |
<fieldset class="action"><input type="submit" value="Save subscription history" /></fieldset> |
670 |
</div> |
671 |
|
672 |
<div id="subscription_form_planning"> |
673 |
<fieldset class="rows"> |
674 |
<legend>Serials planning</legend> |
675 |
<ol> |
676 |
<li> |
677 |
<label for="acqui_date"> First issue publication date:</label> |
678 |
[% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" disabled="disabled" /> |
679 |
[% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]" size="13" maxlength="10" id="acqui_date" class="datepicker" />[% END %] |
680 |
</li> |
681 |
[% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label> |
682 |
<input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" class="datepicker" /> |
683 |
</li>[% END %] |
684 |
|
685 |
<li> |
686 |
<label for="periodicity" class="required">Frequency:</label> |
687 |
<select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();"> |
688 |
<option value="" selected="selected">-- please choose --</option> |
689 |
[% IF ( periodicity16 ) %] |
690 |
<option value="16" selected="selected">Without periodicity</option> |
691 |
[% ELSE %] |
692 |
<option value="16">Without periodicity</option> |
693 |
[% END %] |
694 |
[% IF ( periodicity48 ) %] |
695 |
<option value="48" selected="selected">Unknown</option> |
696 |
[% ELSE %] |
697 |
<option value="48">Unknown</option> |
698 |
[% END %] |
699 |
[% IF ( periodicity32 ) %] |
700 |
<option value="32" selected="selected">Irregular</option> |
701 |
[% ELSE %] |
702 |
<option value="32">Irregular</option> |
703 |
[% END %] |
704 |
|
705 |
[% IF ( periodicity12 ) %] |
706 |
<option value="12" selected="selected">2/day</option> |
707 |
[% ELSE %] |
708 |
<option value="12">2/day</option> |
709 |
[% END %] |
710 |
[% IF ( periodicity1 ) %] |
711 |
<option value="1" selected="selected">daily (n/week)</option> |
712 |
[% ELSE %] |
713 |
<option value="1">daily (n/week)</option> |
714 |
[% END %] |
715 |
[% IF ( periodicity2 ) %] |
716 |
<option value="2" selected="selected">1/week</option> |
717 |
>>>>>>> Bug 8587 - Add a serial lifespan field to serial subscriptions |
718 |
[% ELSE %] |
482 |
[% ELSE %] |
719 |
<input type="hidden" name="op" value="addsubscription" /> |
483 |
<input type="hidden" name="op" value="addsubscription" /> |
720 |
[% END %] |
484 |
[% END %] |
Lines 872-877
$(document).ready(function() {
Link Here
|
872 |
<legend>Serials planning</legend> |
636 |
<legend>Serials planning</legend> |
873 |
<ol> |
637 |
<ol> |
874 |
<li> |
638 |
<li> |
|
|
639 |
<label for="serial_lifespan">Serial lifespan:</label> |
640 |
<select id="lifespan_type"> |
641 |
[% IF ( !serial_lifespan || serial_lifespan < 1 ) %] |
642 |
<option value="-1" selected="selected">Permanent</option> |
643 |
<option value="1">Years</option> |
644 |
[% ELSE %] |
645 |
<option value="-1">Permanent</option> |
646 |
<option value="1" selected="selected">Years</option> |
647 |
[% END %] |
648 |
</select> |
649 |
|
650 |
<input name="serial_lifespan" id="serial_lifespan" type="number" min="1" |
651 |
value="[% IF serial_lifespan %][% serial_lifespan %][% ELSE %]-1[% END %]"/> |
652 |
<div class="hint">Set the subscription's serial lifespan. A serial will be considered "out of date" after the chosen time period.</div> |
653 |
</li> |
654 |
<li> |
875 |
<label for="firstacquidate" class="required">First issue publication date:</label> |
655 |
<label for="firstacquidate" class="required">First issue publication date:</label> |
876 |
[% UNLESS (more_than_one_serial) %] |
656 |
[% UNLESS (more_than_one_serial) %] |
877 |
<input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" /> |
657 |
<input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" /> |