mirror of
https://github.com/unraid/webgui.git
synced 2026-01-01 06:59:56 -06:00
54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
Menu="Plugins"
|
|
Title="Install Plugin"
|
|
Tag="download"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2023, Lime Technology
|
|
* Copyright 2012-2023, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<script>
|
|
const my = {};
|
|
|
|
function installPlugin(file) {
|
|
if (file == null) {
|
|
$('#plugin_file').val('');
|
|
openPlugin(my.cmd,my.title,my.plg);
|
|
return;
|
|
}
|
|
file = file.trim();
|
|
if (!file) return;
|
|
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{cmd:'alert'},function(data) {
|
|
my.cmd = 'plugin install '+file;
|
|
my.title = "_(Install Plugin)_";
|
|
my.plg = file.replace(/^.*(\\|\/|\:)/,'').replace('.plg','')+':install';
|
|
if (data==0) {
|
|
// no alert message - proceed with install
|
|
setTimeout(installPlugin);
|
|
} else {
|
|
// show alert message and ask for confirmation
|
|
openAlert("showchanges <?=$alerts?>","<?=_('Alert Message')?>",'installPlugin');
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
**_(Enter URL of remote plugin file or local plugin file)_**
|
|
|
|
<form name="plugin_install" method="POST" target="progressFrame">
|
|
<input type="text" name="file" id="plugin_file" maxlength="1024" value="" style="width:33%">
|
|
<input type="button" value="_(Install)_" onclick="installPlugin(this.form.file.value)">
|
|
</form>
|
|
|
|
:plugin_install_help:
|
|
|
|
**_(Select local plugin file)_**
|
|
<div id="plugin_tree" class="textarea"></div>
|