Bug 13041 - Can't add user as manager of basket if name includes a single quote
[koha.git] / admin / edi_accounts.pl
index 83cc113..5f963bd 100755 (executable)
@@ -23,6 +23,7 @@ use CGI;
 use C4::Auth;
 use C4::Output;
 use Koha::Database;
+use Koha::Plugins;
 
 my $input = CGI->new();
 
@@ -51,27 +52,14 @@ if ( $op eq 'acct_form' ) {
         }
     );
     $template->param( vendors => \@vendors );
-    $template->param(
-        code_qualifiers => [
-            {
-                code        => '14',
-                description => 'EAN International',
-            },
-            {
-                code        => '31B',
-                description => 'US SAN Agency',
-            },
-            {
-                code        => '91',
-                description => 'Assigned by supplier',
-            },
-            {
-                code        => '92',
-                description => 'Assigned by buyer',
-            },
-        ]
-    );
 
+    my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins");
+    $template->param( plugins_enabled => $plugins_enabled );
+
+    if ( $plugins_enabled ) {
+        my @plugins = Koha::Plugins->new()->GetPlugins('edifact');
+        $template->param( plugins => \@plugins );
+    }
 }
 elsif ( $op eq 'delete_confirm' ) {
     show_account();
@@ -98,6 +86,7 @@ else {
             responses_enabled  => defined $input->param('responses_enabled'),
             auto_orders        => defined $input->param('auto_orders'),
             id_code_qualifier  => $input->param('id_code_qualifier'),
+            plugin             => $input->param('plugin'),
         };
 
         if ($id) {
@@ -129,6 +118,27 @@ else {
     $template->param( ediaccounts => \@ediaccounts );
 }
 
+$template->param(
+    code_qualifiers => [
+        {
+            code        => '14',
+            description => 'EAN International',
+        },
+        {
+            code        => '31B',
+            description => 'US SAN Agency',
+        },
+        {
+            code        => '91',
+            description => 'Assigned by supplier',
+        },
+        {
+            code        => '92',
+            description => 'Assigned by buyer',
+        },
+    ]
+);
+
 output_html_with_http_headers( $input, $cookie, $template->output );
 
 sub get_account {