Merge branch 'bug_9719' into 3.14-master
[koha.git] / admin / branches.pl
index 12c49e2..026d983 100755 (executable)
@@ -63,7 +63,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { parameters => 1},
+        flagsrequired   => { parameters => 'parameters_remaining_permissions'},
         debug           => 1,
     }
 );
@@ -168,6 +168,8 @@ elsif ( $op eq 'addcategory_validate' ) {
     $template->param( else => 1 );
     # confirm settings change...
     my $params = $input->Vars;
+    $params->{'show_in_pulldown'} = ( $params->{'show_in_pulldown'} eq 'on' ) ? 1 : 0;
+
     unless ( $params->{'categorycode'} && $params->{'categoryname'} ) {
         default("MESSAGE4",$template);
     }
@@ -294,6 +296,7 @@ sub editcatform {
             categorycode    => $data->{'categorycode'},
             categoryname    => $data->{'categoryname'},
             codedescription => $data->{'codedescription'},
+            show_in_pulldown => $data->{'show_in_pulldown'},
                );
     }
        for my $ctype (GetCategoryTypes()) {
@@ -328,6 +331,7 @@ sub branchinfotable {
         # - branchfax       |
         # - branchemail    /
         # - branchurl      /
+        # - opac_info (can contain HTML)
         # - address-empty-p (1 if no address information, 0 otherwise)
         # - categories      (containing a static error message)
         # - category_list   (loop containing "categoryname")
@@ -343,7 +347,7 @@ sub branchinfotable {
             'branchaddress3', 'branchzip',
             'branchcity', 'branchstate', 'branchcountry',
             'branchphone', 'branchfax',
-            'branchemail', 'branchurl',
+            'branchemail', 'branchurl', 'opac_info',
             'branchip',       'branchprinter', 'branchnotes'
           )
         {
@@ -406,6 +410,7 @@ sub _branch_to_template {
          branchfax      => $data->{'branchfax'},
          branchemail    => $data->{'branchemail'},
          branchurl      => $data->{'branchurl'},
+         opac_info      => $data->{'opac_info'},
          branchip       => $data->{'branchip'},
          branchnotes    => $data->{'branchnotes'}, 
     );