Bug 16237: Allow entering of EDI accounts with plugins disabled
Test plan:
1. Disable <enable_plugins> in koha-conf.xml (restart memcached if needed).
2. Open the EDI accounts admin page.
3. Notice incredible breakage.
4. Apply patch.
5. Reload page, should now display (and the "Plugin:" dropdown should
be hidden).
6. Re-enable <enable_plugins> (and the UseKohaPlugins syspref as
well).
7. Ensure that the "Plugin:" dropdown is once again displayed.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
This commit is contained in:
parent
6efa491d1b
commit
22633b5a61
|
|
@ -53,8 +53,13 @@ if ( $op eq 'acct_form' ) {
|
|||
);
|
||||
$template->param( vendors => \@vendors );
|
||||
|
||||
my @plugins = Koha::Plugins->new()->GetPlugins('edifact');
|
||||
$template->param( plugins => \@plugins );
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
[% IF plugins_enabled %]
|
||||
<li>
|
||||
<label for="plugin">Plugin: </label>
|
||||
<select name="plugin" id="plugin">
|
||||
|
|
@ -89,6 +90,9 @@
|
|||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
[% ELSE %]
|
||||
<input type="hidden" name="plugin" value="" />
|
||||
[% END %]
|
||||
<li>
|
||||
<label for="description">Description: </label>
|
||||
<input type="text" name="description" id="description" size="20" maxlength="90" value="[% account.description %]" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue