Merge remote-tracking branch 'origin/new/bug_5347'
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-add.tt
index b20ced4..3312f7f 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Serials &rsaquo; [% IF ( modname ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
+<title>Koha &rsaquo; Serials &rsaquo; [% IF ( modify ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 
@@ -931,7 +931,7 @@ $(document).ready(function() {
        }
        );
    //  $(".widelabel").attr("width", "300px");  // labels stay skinny in IE7 anyway.
-[% IF ( modname ) %]
+[% IF ( modify ) %]
     set_num_pattern_from_template_vars();
     [% IF ( hemisphere ) %]
        is_hemisphere = [% hemisphere %] ;
@@ -944,23 +944,33 @@ $(document).ready(function() {
     $('#numberpattern').change( function() { 
         reset_num_pattern(); 
     });
+
+    var node;
+    [% FOREACH field IN dont_export_field_loop %]
+        node = $("#[% field.fieldid %]");
+        if ( $(node).is('input') || $(node).is('textarea') ) {
+            $(node).val("");
+        } else if ( $(node).is('select') ) {
+            $(node).find("option:first").attr('selected','selected');
+        }
+    [% END %]
 });
 //]]>
 </script>
 </head>
-<body>
+<body id="ser_subscription-add" class="ser">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'serials-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; [% IF ( modname ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]"><i>[% bibliotitle |html %]</i></a> &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]"><i>[% bibliotitle |html %]</i></a> &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</div>
 
 <div id="doc3" class="yui-t7">
    
    <div id="bd">
-<h1>[% IF ( modname ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %]</h1>
+<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %]</h1>
    <div class="yui-g">
     <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
-[% IF ( modname ) %]
+[% IF ( modify ) %]
         <input type="hidden" name="op" value="modsubscription" />
         <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
 [% ELSE %]
@@ -988,7 +998,7 @@ $(document).ready(function() {
                 (<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>
                <div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for Biblio</a>
                    [% IF ( CAN_user_editcatalogue ) %] 
-                      [% IF ( modname ) %]
+                      [% IF ( modify ) %]
                       | <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit biblio</a>
                       [% ELSE %]
                       | <a href="#" onclick="addbiblioPopup(); return false;">Create Biblio</a>
@@ -1027,14 +1037,14 @@ $(document).ready(function() {
             </select>
         </li>
          <li>
-            <label for="callnumber">Call Number:</label>
+            <label for="callnumber">Call number:</label>
             <input type="text" name="callnumber" id="callnumber" value="[% callnumber %]" size="20" />
         </li>
         <li>
             <label for="graceperiod">Grace period:</label> <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod %]" size="5"/> day(s)
         </li>
         <li>
-            <label for="notes">Public note:</label>
+            <label for="notes">OPAC note:</label>
             <textarea name="notes" id="notes" cols="30" rows="2">[% notes %]</textarea>
         </li>
         <li>
@@ -1055,7 +1065,7 @@ $(document).ready(function() {
 [% END %]
                 [% END %]
                 </select> 
-                               <div class="hint">Select a notice and patrons on the routing list will be notified when new issues are received.</div>
+                <div class="hint">Select a notice and subscribers will be notified when new issues are received.</div>
                [% ELSE %]
             <span class="label">Patron notification: </span>
                                <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>
@@ -1066,7 +1076,7 @@ $(document).ready(function() {
                         <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount %]" size="4"/>
                 </li>
                 <li>
-                       <label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
+            <label class="widelabel" for="opacdisplaycount">Number of issues to display in OPAC: </label>
                        <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount %]" size="4"/>
                </li>
        </ol>
@@ -1077,25 +1087,32 @@ $(document).ready(function() {
 <div><h3 style="display:inline">Subscription history</h3> <a href="#" id="cancel_manual_history">[cancel manual history]</a></div>
         <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>
         <fieldset class="rows">
-               <ol>
-            <li>
-            <label for="histstartdate">Subscription start date</label>
-            <input type="text" name="histstartdate" id="histstartdate" value="[% histstartdate %]" /><div class="hint"> (start date of the 1st subscription)</div>
-            </li>
-            <li>
-            <label for="histenddate">Subscription end date</label>
-            <input type="text" name="histenddate" id="histenddate" value="[% histenddate %]" /> <div class="hint">(if empty, subscription is still active)</div>
-            </li>
-            <li>
+            <ol>
+                <li>
+                <label for="histstartdate">Subscription start date</label>
+                <input type="text" name="histstartdate" id="histstartdate" value="[% histstartdate %]" /><div class="hint"> (start date of the 1st subscription)</div>
+                </li>
+                <li>
+                <label for="histenddate">Subscription end date</label>
+                <input type="text" name="histenddate" id="histenddate" value="[% histenddate %]" /> <div class="hint">(if empty, subscription is still active)</div>
+                </li>
+                <li>
                 <label for="recievedlist">Received issues</label>
-            <textarea name="recievedlist" id="recievedlist" cols="60" rows="5">[% recievedlist %]</textarea>
-            </li>
-            <li>
+                <textarea name="recievedlist" id="recievedlist" cols="60" rows="5">[% recievedlist %]</textarea>
+                </li>
+                <li>
                 <label for="missinglist">Missing issues</label>
-            <textarea name="missinglist" id="missinglist" cols="60" rows="5">[% missinglist %]</textarea>
-            </li>
-            <li>
-               </ol>
+                <textarea name="missinglist" id="missinglist" cols="60" rows="5">[% missinglist %]</textarea>
+                </li>
+                <li>
+                <label for="opacnote">Note for OPAC</label>
+                <textarea name="opacnote" id="opacnote" cols="60" rows="5">[% opacnote %]</textarea>
+                </li>
+                <li>
+                <label for="librariannote">Note for staff</label>
+                <textarea name="librariannote" id="librariannote" cols="60" rows="5">[% librariannote %]</textarea>
+                </li>
+            </ol>
         </fieldset>
     <fieldset class="action"><input type="submit" value="Save subscription history"  /></fieldset>
 </div>
@@ -1107,20 +1124,21 @@ $(document).ready(function() {
     <ol>
         <li>
            <label for="acqui_date"> First issue publication date:</label>
-                [% UNLESS ( modname ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %]
-                <input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" [% IF ( modname ) %]disabled="disabled"[% END %] style="border-width: 0px;"  />
+                [% UNLESS ( modify ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %]
+                [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" disabled="disabled" />
+                [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" />[% END %]
         </li>
-           [% IF ( modname ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
+           [% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
                 <img src="[% themelang %]/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" style="border-width: 0px;"  />
+                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" />
                 </li>[% END %]
                 
         <li><!-- both scripts for calendar must follow the input field --> 
                 <script type="text/javascript">
                     Calendar.setup({
-                        inputField      :   "[% IF ( modname ) %]next_[% END %]acqui_date",
+                        inputField      :   "[% IF ( modify ) %]next_[% END %]acqui_date",
                         ifFormat       :   "[% DHTMLcalendar_dateformat %]",
-                        button         :   "[% IF ( modname ) %]next_[% END %]acqui_button",
+                        button         :   "[% IF ( modify ) %]next_[% END %]acqui_button",
                         align          :   "Tl",
                         onUpdate        :    function(cal) { 
                                                              irregular_issues.weeks = getWeeksArray(cal.date);
@@ -1134,9 +1152,9 @@ $(document).ready(function() {
                                                         } 
                         });
                     Calendar.setup({
-                        inputField      :   "[% IF ( modname ) %]next_[% END %]acqui_date",
+                        inputField      :   "[% IF ( modify ) %]next_[% END %]acqui_date",
                         ifFormat       :   "[% DHTMLcalendar_dateformat %]",
-                        button         :   "[% IF ( modname ) %]next_[% END %]acqui_date",
+                        button         :   "[% IF ( modify ) %]next_[% END %]acqui_date",
                         align          :   "Tl",
                         onUpdate        :    function(cal) { irregular_issues.weeks = getWeeksArray(cal.date);
                                                             irregular_issues.firstissue = cal.date;
@@ -1215,6 +1233,11 @@ $(document).ready(function() {
                 [% ELSE %]
                     <option value="8">1/quarter (seasonal)</option>
                 [% END %]
+                [% IF ( periodicity13 ) %]
+                    <option value="13" selected="selected">1/4 months (3/year)</option>
+                [% ELSE %]
+                    <option value="13">1/4 months (3/year)</option>
+                [% END %]
 
                 [% IF ( periodicity9 ) %]
                     <option value="9" selected="selected">2/years</option>
@@ -1251,24 +1274,24 @@ $(document).ready(function() {
                         <option value="1">Number</option>
                     [% END %]
                     [% IF ( numberpattern2 ) %]
-                        <option value="2" selected="selected">Volume, Number, Issue</option>
+                        <option value="2" selected="selected">Volume, number, issue</option>
                     [% ELSE %]
-                        <option value="2">Volume, Number, Issue</option>
+                        <option value="2">Volume, number, issue</option>
                     [% END %]
                     [% IF ( numberpattern3 ) %]
-                        <option value="3" selected="selected">Volume, Number</option>
+                        <option value="3" selected="selected">Volume, number</option>
                     [% ELSE %]
-                        <option value="3">Volume, Number</option>
+                        <option value="3">Volume, number</option>
                     [% END %]
                     [% IF ( numberpattern4 ) %]
-                        <option value="4" selected="selected">Volume, Issue</option>
+                        <option value="4" selected="selected">Volume, issue</option>
                     [% ELSE %]
-                        <option value="4">Volume, Issue</option>
+                        <option value="4">Volume, issue</option>
                     [% END %]
                     [% IF ( numberpattern5 ) %]
-                        <option value="5" selected="selected">Number, Issue</option>
+                        <option value="5" selected="selected">Number, issue</option>
                     [% ELSE %]
-                        <option value="5">Number, Issue</option>
+                        <option value="5">Number, issue</option>
                     [% END %]
                     [% IF ( numberpattern6 ) %]
                         <option value="6" selected="selected">Seasonal only</option>
@@ -1293,8 +1316,8 @@ $(document).ready(function() {
         <li>
            <label for="beginning_date" class="required"> Subscription start date:</label>
             
-                <img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" style="border-width: 0px;" />
+                <img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show calendar" title="Show calendar" />
+                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" />
                 <!-- both scripts for calendar must follow the input field --> 
                 <script type="text/javascript">
                     Calendar.setup({
@@ -1316,18 +1339,18 @@ $(document).ready(function() {
             <label for="subtype" class="required">Subscription length:</label>
             
                 <select name="subtype" id="subtype">
-                                       [% IF ( subtype_monthlength ) %]<option value="monthlength" selected="selected">[% ELSE %]<option value="monthlength">[% END %] Number of months</option>                                       
-                                       [% IF ( subtype_numberlength ) %]<option value="numberlength" selected="selected">[% ELSE %]<option value="numberlength">[% END %] Number of issues</option>                                    
-                                       [% IF ( subtype_weeklength ) %]<option value="weeklength" selected="selected">[% ELSE %]<option value="weeklength">[% END %] Number of weeks</option>                                   
+                    [% IF ( subtype_monthlength ) %]<option value="monthlength" selected="selected">[% ELSE %]<option value="monthlength">[% END %] Number of months</option>
+                    [% IF ( subtype_numberlength ) %]<option value="numberlength" selected="selected">[% ELSE %]<option value="numberlength">[% END %] Number of issues</option>
+                    [% IF ( subtype_weeklength ) %]<option value="weeklength" selected="selected">[% ELSE %]<option value="weeklength">[% END %] Number of weeks</option>
                 </select>
-                <input type="text" name="sublength" value="[% sublength %]" size="3" onkeypress="return check_input(event)" /> (enter amount in numerals)
+                <input type="text" id="numberlength" name="sublength" value="[% sublength %]" size="3" onkeypress="return check_input(event)" /> (enter amount in numerals)
             <span class="required">Required</span>
         </li>
         <li>
            <label for="ending_date"> Subscription end date:</label>
             
                 <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonend1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" style="border-width: 0px;" />
+                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" />
                 <!-- both scripts for calendar must follow the input field --> 
                 <script type="text/javascript">
                     Calendar.setup({
@@ -1350,16 +1373,16 @@ $(document).ready(function() {
        </fieldset>
 </div>
        <fieldset class="action">
-       <input type="button" class="action_test" value="Test Prediction Pattern" onclick="javascript:irregularity_check()" />
-       <input type="button" class="action_reset" value="Reset Pattern" onclick="javascript:reset_pattern()" />
+    <input type="button" class="action_test" value="Test prediction pattern" onclick="javascript:irregularity_check()" />
+    <input type="button" class="action_reset" value="Reset pattern" onclick="javascript:reset_pattern()" />
     <input type="button" class="action_save"  value="Save subscription" onclick="Check(this.form)" accesskey="w" />
        </fieldset>
     <fieldset class="action">
-    <input type="button" class="action_advanced" value="Show/Hide Advanced Pattern" onclick="javascript:display_table()" />
+    <input type="button" class="action_advanced" value="Show/Hide advanced pattern" onclick="javascript:display_table()" />
     </fieldset>
            <div id="basetable"  style="display: none;">
             <table class="small">
-                <tr><th colspan="4">Advanced Prediction Pattern</th></tr>
+                <tr><th colspan="4">Advanced prediction pattern</th></tr>
                                <tr>
                     <th>&nbsp;</th>
                     <th>X</th>
@@ -1404,7 +1427,7 @@ $(document).ready(function() {
                 </tr>
                 <tr>
                     <td>
-                        [% IF ( modname ) %]
+                        [% IF ( modify ) %]
                             Last value
                         [% ELSE %]
                             Begins with