Merge remote-tracking branch 'origin/new/bug_8520'
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / modules / opac-user.tt
index 0b8930f..f794900 100644 (file)
@@ -3,7 +3,6 @@
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home
 [% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/JavaScript">
@@ -46,6 +45,7 @@ $.tablesorter.addParser({
             $("#renewall").submit();
         });
         $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
+        $( "#suspend_until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
             });
 //]]>
 </script>
@@ -83,7 +83,7 @@ $.tablesorter.addParser({
                
         [% IF ( BORROWER_INF.warndeparture ) %]
         <div class="dialog alert" id="warndeparture">
-                <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture %]</span>. Please contact the library for more information.</span>
+                <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
                 [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
         </div>
         [% END %]
@@ -101,9 +101,9 @@ $.tablesorter.addParser({
                 <span id="lost"><li><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li></span>
             [% END %]
             [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
-                <span id="renewal_blocked_fines"><li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span></a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li></span>
+                <span id="renewal_blocked_fines"><li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li></span>
             [% ELSIF ( renewal_blocked_fines ) %]
-        <span id="renewal_blocked_fines"><li><strong>Please note: </strong> You have <a href="/cgi-bin/koha/opac-account.pl">more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span></a> in fines. </li></span>
+                <span id="renewal_blocked_fines"><li><strong>Please note: </strong> You currently owe <a href="/cgi-bin/koha/opac-account.pl"><span id="renewal_blocked_fines_amount">[% renewal_blocked_fines_amountoutstanding %] in fines. Please pay your fines if you wish to renew your books.</span></a></li></span>
             [% END %]
         </ul></div>
         [% END %]
@@ -428,40 +428,7 @@ $.tablesorter.addParser({
 
              [% IF AutoResumeSuspendedHolds %]
              <label for="suspend_until"> until </label>
-              <input name="suspend_until" id="suspend_until" readonly="readonly" size="10">
-              <script language="JavaScript" type="text/javascript">
-              //<![CDATA[
-
-              var cal_img = document.createElement('img');
-              cal_img.src = "[% themelang %]/lib/calendar/cal.gif";
-              cal_img.alt = "Show Calendar";
-              cal_img.border = "0";
-              cal_img.id = "CalendarSuspendUntil";
-              cal_img.style.cursor = "pointer";
-              document.getElementById("suspend_until").parentNode.appendChild( cal_img );
-
-              function validate(date) {
-                  var today = new Date();
-                        if ( (date > today) ||
-                                ( date.getDate() == today.getDate() &&
-                                  date.getMonth() == today.getMonth() &&
-                                  date.getFullYear() == today.getFullYear() ) ) {
-                            return false;
-                        } else {
-                            return true;
-                        }
-              };
-              Calendar.setup(
-              {
-                inputField : "suspend_until",
-                ifFormat : "[% DHTMLcalendar_dateformat %]",
-                button : "CalendarSuspendUntil",
-                disableFunc : validate,
-                dateStatusFunc : validate
-              }
-              );
-              //]]>
-              </script>
+              <input name="suspend_until" id="suspend_until" readonly="readonly" size="10" />
               <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a></p>
               [% END %]
             </form>