From 82962e04493cb1c8c9c23045f2bc6d24e8bd9aeb Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Tue, 29 Oct 2024 13:38:22 +0200 Subject: [PATCH] Adds config file edit page --- app/helpers/render.php | 44 ++++++++++++++++++++++++ app/pages/config.php | 10 ++++-- app/templates/config-configfile-edit.php | 23 +++++++++++++ 3 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 app/templates/config-configfile-edit.php diff --git a/app/helpers/render.php b/app/helpers/render.php index b55a8da..a14f81a 100644 --- a/app/helpers/render.php +++ b/app/helpers/render.php @@ -36,4 +36,48 @@ function renderConfig($configPart, $indent, $platform=false, $parent='') { +
+ $config_value) { ?> +
+
+ : + + * +
+ + +
+ + +
+ +
+ +
+ diff --git a/app/pages/config.php b/app/pages/config.php index a028b9e..cf93467 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -129,10 +129,14 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { include '../app/templates/config-list-interfaceconfigjs.php'; break; case 'config_file': - if ($userObject->hasRight($user_id, 'view config file')) { - include '../app/templates/config-configfile.php'; + if (isset($action) && $action === 'edit') { + include '../app/templates/config-configfile-edit.php'; } else { - include '../app/templates/error-unauthorized.php'; + if ($userObject->hasRight($user_id, 'view config file')) { + include '../app/templates/config-configfile.php'; + } else { + include '../app/templates/error-unauthorized.php'; + } } break; diff --git a/app/templates/config-configfile-edit.php b/app/templates/config-configfile-edit.php new file mode 100644 index 0000000..ee41c32 --- /dev/null +++ b/app/templates/config-configfile-edit.php @@ -0,0 +1,23 @@ + + +
+

Jilo configuration file

+
+

edit the Jilo Server configuration file:

+
+ + + +
+ Cancel + +
+ + +
+
+