Bug 15758: [QA Follow-up] Final touch?
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-add.tt
index 29ae21a..76aaabe 100644 (file)
@@ -1,4 +1,5 @@
 [% USE KohaDates %]
+[% USE Branches %]
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; [% IF ( modify ) %][% bibliotitle |html %] &rsaquo; Modify subscription[% ELSE %]New subscription[% END %]</title>
@@ -103,9 +104,9 @@ function frequencyload(){
             if ( globalfreqdata.unit && globalfreqdata.unit.length == 0 ) {
                 var option = $("#subtype option[value='issues']");
                 $(option).attr('selected', 'selected');
-                $("#subtype option[value!='issues']").attr('disabled', 'disabled')
+                $("#subtype option[value!='issues']").prop('disabled', true)
             } else {
-                $("#subtype option").attr('disabled', false)
+                $("#subtype option").prop('disabled', false)
             }
         }
     )
@@ -197,14 +198,14 @@ function toggleAdvancedPattern() {
 }
 
 function modifyAdvancedPattern() {
-    $("#patternname").attr("readonly", false).val('');
-    $("#numberingmethod").attr("readonly", false);
+    $("#patternname").prop('readOnly', false).val('');
+    $("#numberingmethod").prop('readOnly', false);
 
     $("#advancedpredictionpatternt input").each(function() {
-        $(this).attr("readonly", false);
+        $(this).prop('readOnly', false);
     });
     $("#advancedpredictionpatternt select").each(function() {
-        $(this).attr("disabled", false);
+        $(this).prop('disabled', false);
     });
 
     $("#restoreadvancedpatternbutton").show();
@@ -215,11 +216,11 @@ function modifyAdvancedPattern() {
 }
 
 function restoreAdvancedPattern() {
-    $("#patternname").attr("readonly", true).val(globalnumpatterndata.label);
-    $("#numberingmethod").attr("readonly", true).val(globalnumpatterndata.numberingmethod);
+    $("#patternname").prop('readOnly', true).val(globalnumpatterndata.label);
+    $("#numberingmethod").prop('readOnly', true).val(globalnumpatterndata.numberingmethod);
 
     $("#advancedpredictionpatternt input").each(function() {
-        $(this).attr("readonly", true);
+        $(this).prop('readOnly', true);
         var id = $(this).attr('id');
         if(id.match(/lastvalue/) || id.match(/innerloop/)) {
             var tempid = id.replace(/(\d)/, "temp$1");
@@ -229,7 +230,7 @@ function restoreAdvancedPattern() {
         }
     });
     $("#advancedpredictionpatternt select").each(function() {
-        $(this).attr("disabled", true);
+        $(this).prop('disabled', true);
         var id = $(this).attr('id');
         $(this).val(globalnumpatterndata[id]);
     });
@@ -559,12 +560,10 @@ $(document).ready(function() {
                                         [% UNLESS ( Independentbranches ) %]
                                             <option value="">None</option>
                                         [% END %]
-                                        [% FOREACH branchloo IN branchloop %]
-                                            [% IF ( branchloo.selected ) %]
-                                                <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
-                                            [% ELSE %]
-                                                <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
-                                            [% END %]
+                                        [% IF CAN_user_serials_superserials %]
+                                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
+                                        [% ELSE %]
+                                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
                                         [% END %]
                                     </select> (select a library)
                                 </li>
@@ -837,8 +836,11 @@ $(document).ready(function() {
                                                         <select disabled="disabled" id="[% name %]" name="[% name %]" />
                                                             <option value=""></option>
                                                             <option value="dayname">Name of day</option>
+                                                            <option value="dayabrv">Name of day (abbreviated)</option>
                                                             <option value="monthname">Name of month</option>
+                                                            <option value="monthabrv">Name of month (abbreviated)</option>
                                                             <option value="season">Name of season</option>
+                                                            <option value="seasonabrv">Name of season (abbreviated)</option>
                                                         </select>
                                                     [% END %]
                                                     <td>Formatting</td>