Stable
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use GlpiPlugin\Urbackup\Config;
|
||||
use Html;
|
||||
|
||||
global $CFG_GLPI;
|
||||
|
||||
// Check user has right to manage plugin configuration
|
||||
if (!Session::haveRight('config', UPDATE)) {
|
||||
Html::displayRightError();
|
||||
}
|
||||
|
||||
// Handle form submission
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update'])) {
|
||||
Config::saveConfiguration($_POST);
|
||||
Html::redirect($_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
// Display GLPI header
|
||||
Html::header(
|
||||
__('UrBackup configuration', 'urbackup'),
|
||||
'',
|
||||
'Config',
|
||||
'PluginUrbackupConfig'
|
||||
);
|
||||
|
||||
// Show configuration form
|
||||
$config = new Config();
|
||||
$config->showForm(1);
|
||||
|
||||
// Display GLPI footer
|
||||
Html::footer();
|
||||
Reference in New Issue
Block a user