Bug 4819: Add ids to OPAC detail page
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-reserve.tt
index 5c38ed4..7597a4a 100644 (file)
@@ -1,4 +1,4 @@
-[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha Online" %] Catalog ›  Placing hold [% title |html %] for [% FOREACH USER_INF IN USER_INFO %][% USER_INF.firstname %] [% USER_INF.surname %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha Online" %] Catalog ›  Placing a hold
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 <script type="text/javascript">
@@ -15,6 +15,8 @@
  }
 
  $(document).ready(function() {
+    $('#hold-request-form').preventDoubleFormSubmit();
+
     var copiesRowId = null;
     var wasSpecific = false;
     var lastCopiesRowId = null;
              </div>
              [% END %]
 
-            <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
+            <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
             <input type="hidden" name="place_reserve" value="1"/>
 
             <!-- These values are set dynamically by js -->
                 ifFormat : "[% DHTMLcalendar_dateformat %]",
                 button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
                 disableFunc : validate[% bibitemloo.biblionumber %],
-                dateStatusFunc : validate[% bibitemloo.biblionumber %]
+                dateStatusFunc : validate[% bibitemloo.biblionumber %],
+                firstDay : [% CalendarFirstDayOfWeek %]
               }
               );
               //]]>
           ifFormat : "[% DHTMLcalendar_dateformat %]",
           button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
           disableFunc : validate1,
-          dateStatusFunc : validate1
+          dateStatusFunc : validate1,
+          firstDay : [% CalendarFirstDayOfWeek %]
         }
       );
       //]]>
                         [% IF ( bibitemloo.holdable ) %]
                            [% IF ( choose_branch ) %]
                                           <td>
-                                              <select name="branch" id="branch_[% bibitemloo.biblionumber %]"
-                                                [% UNLESS ( bibitemloo.holdable ) %]disabled="disabled"[% END %] >
-                                                [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
-                                                  [% IF ( branchChoicesLoo.selected ) %]
-                                                    <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
-                                                  [% ELSE %]
-                                                    <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
-                                                  [% END %]
-                                                [% END %]
-                                              </select>
-                                           </td>
+                         [% UNLESS ( bibitemloo.holdable ) %]
+                            <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
+                              [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
+                                [% IF ( branchChoicesLoo.selected ) %]
+                                  <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
+                                [% ELSE %]
+                                  <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
+                                [% END %]
+                              [% END %]
+                          </select>
+                          [% ELSE %]
+                            <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
+                              [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
+                                [% IF ( branchChoicesLoo.selected ) %]
+                                  <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
+                                [% ELSE %]
+                                  <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
+                                [% END %]
+                              [% END %]
+                            </select>
+                          [% END %]
+                       </td>
                            [% END %]
                        [% END %]
                     [% END %]
                                 <td>[% itemLoo.enumchron %]</td>
                               [% END %]
                               <td>
-                                [% IF ( itemLoo.date_due ) %]
-                                  <span class="checkedout">Due [% itemLoo.date_due %]</span>
+                                [% IF ( itemLoo.dateDue ) %]
+                                  <span class="checkedout">Due [% itemLoo.dateDue %]</span>
                                 [% ELSIF ( itemLoo.transfertwhen ) %]
                                   <span class="intransit">In transit from [% itemLoo.transfertfrom %],
                                     to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>