update for missing subscriptions.lastbranch col in serials
[koha_fer] / admin / systempreferences.pl
index 37e988e..7337ee3 100755 (executable)
@@ -46,6 +46,7 @@ use C4::Auth;
 use C4::Context;
 use C4::Koha;
 use C4::Languages;
+use C4::ClassSource;
 use C4::Output;
 use C4::Context;
 
@@ -68,10 +69,13 @@ my %tabsysprefs;
     $tabsysprefs{Intranet_includes}="Admin";
     $tabsysprefs{AutoLocation}="Admin";
     $tabsysprefs{DebugLevel}="Admin";
+    $tabsysprefs{SessionStorage}="Admin";
 
 # Authorities
     $tabsysprefs{authoritysep}="Authorities";
     $tabsysprefs{AuthDisplayHierarchy}="Authorities";
+       $tabsysprefs{dontmerge}="Authorities";
+       $tabsysprefs{BiblioAddsAuthorities}="Authorities";
 # Catalogue
     $tabsysprefs{advancedMARCEditor}="Catalogue";
     $tabsysprefs{autoBarcode}="Catalogue";
@@ -94,6 +98,8 @@ my %tabsysprefs;
     $tabsysprefs{NoZebra}="Catalogue";
     $tabsysprefs{NoZebraIndexes}="Catalogue";
     $tabsysprefs{ReceiveBackIssues}="Catalogue";
+    $tabsysprefs{DefaultClassificationSource}="Catalogue";
+    $tabsysprefs{RoutingSerials}="Catalogue";
     
 # Circulation
     $tabsysprefs{maxoutstanding}="Circulation";
@@ -109,6 +115,7 @@ my %tabsysprefs;
     $tabsysprefs{TransfersMaxDaysWarning}="Circulation";
     $tabsysprefs{useDaysMode}="Circulation";
     $tabsysprefs{ReservesNeedReturns}="Circulation";
+    $tabsysprefs{CircAutocompl}="Circulation";
 
 # Intranet
     $tabsysprefs{TemplateEncoding}="Intranet";
@@ -130,6 +137,9 @@ my %tabsysprefs;
     $tabsysprefs{patronimages}="Members";
     $tabsysprefs{MinPasswordLength}="Members";
     $tabsysprefs{uppercasesurnames}="Members";
+    $tabsysprefs{NoReturnSetLost}="Members";
+    $tabsysprefs{MaxFine}="Members";
+    $tabsysprefs{NotifyBorrowerDeparture}="Members";
 
 # OPAC
     $tabsysprefs{AmazonAssocTag}="OPAC";
@@ -151,6 +161,7 @@ my %tabsysprefs;
     $tabsysprefs{opacheader}="OPAC";
     
 # OPACFeatures
+       $tabsysprefs{SearchMyLibraryFirst}="OPACFeatures";
     $tabsysprefs{Disable_Dictionary}="OPACFeatures";
     $tabsysprefs{hidelostitems}="OPACFeatures";
     $tabsysprefs{opacbookbag}="OPACFeatures";
@@ -355,6 +366,20 @@ if ($op eq 'add_form') {
             push @options, { option => $theme, counter => $counter };
             $counter++;
         }
+    } elsif ($data->{'type'} eq 'ClassSource') {
+        $template->param('type-choice' => 1);
+        my $type='';
+        @options=();
+        my $sources = GetClassSources();
+        my $counter=0;
+        foreach my $cn_source (sort keys %$sources) {
+            if ($cn_source eq $data->{'value'}) {
+                push @options, { option => $cn_source, counter => $counter, selected => 1 };
+            } else {
+                push @options, { option => $cn_source, counter => $counter };
+            }
+            $counter++; 
+        }
     } elsif ($data->{'type'} eq 'Languages') {
         $template->param('type-choice' => 1);
         my $type='';
@@ -447,6 +472,8 @@ if ($op eq 'add_form') {
         my %row_data;  # get a fresh hash for the row data
         $row_data{variable} = $results->[$i]{'variable'};
         $row_data{value} = $results->[$i]{'value'};
+               $row_data{yes} = 1 if ($results->[$i]{'value'} == 1);
+               $row_data{yesno} = 1 if ($results->[$i]{'type'} eq 'YesNo');
         $row_data{explanation} = $results->[$i]{'explanation'};
         $row_data{toggle} = $toggle;
         $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'variable'};