mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
* Disable activate/deactive and delete buttons after a successful AJAX delete request. * Allow to load disabled plugin language files for display.
This commit is contained in:
parent
09fd6ff74b
commit
be9d65f372
@ -166,13 +166,25 @@ class PluginManager
|
||||
$pluginId = $this->getIdentifier($plugin);
|
||||
}
|
||||
|
||||
if (!$plugin || $plugin->disabled) {
|
||||
if (!$plugin) {
|
||||
return;
|
||||
}
|
||||
|
||||
$pluginPath = $this->getPluginPath($plugin);
|
||||
$pluginNamespace = strtolower($pluginId);
|
||||
|
||||
/*
|
||||
* Register language namespaces
|
||||
*/
|
||||
$langPath = $pluginPath . '/lang';
|
||||
if (File::isDirectory($langPath)) {
|
||||
Lang::addNamespace($pluginNamespace, $langPath);
|
||||
}
|
||||
|
||||
if ($plugin->disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register plugin class autoloaders
|
||||
*/
|
||||
@ -185,14 +197,6 @@ class PluginManager
|
||||
$plugin->register();
|
||||
}
|
||||
|
||||
/*
|
||||
* Register language namespaces
|
||||
*/
|
||||
$langPath = $pluginPath . '/lang';
|
||||
if (File::isDirectory($langPath)) {
|
||||
Lang::addNamespace($pluginNamespace, $langPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* Register configuration path
|
||||
*/
|
||||
|
@ -44,6 +44,7 @@
|
||||
data-trigger-action="enable"
|
||||
data-trigger=".control-list input[type=checkbox]"
|
||||
data-trigger-condition="checked"
|
||||
data-request-success="$(this).closest('.btn-group').find('button').prop('disabled', true)"
|
||||
data-stripe-load-indicator>
|
||||
<?= e(trans('system::lang.plugins.remove')) ?>
|
||||
</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user