summaryrefslogtreecommitdiff
path: root/utils/modules/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/config.php')
-rw-r--r--utils/modules/config.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/utils/modules/config.php b/utils/modules/config.php
index a7068ef..4afb264 100644
--- a/utils/modules/config.php
+++ b/utils/modules/config.php
@@ -35,22 +35,24 @@ class Config {
{
switch($action) {
case "update":
- $this->setValue("menu", array("news" => "News",
- "shop" => "Shop",
- "downloads" => "Downloads",
- "biography" => "Biography",
- "live" => "Concerts",
- "discography" => "Discography",
- "guestbook" => "Guestbook",
- "members" => "Members",
- "gallery" => "Gallery",
- "contact" => "Contact"));
+ global $menulist;
+ $menu = ListEditor::splitValues($menulist);
+ $this->setValue("menu", $menu);
$this->write();
break;
default:
+ global $config;
+ global $pages;
+ $pagetitles = array();
+ foreach($pages->pages as $page) {
+ $pagetitles[$page->title] = $page->title;
+ }
$form = new Form("update");
- echo "Coming soon!";
+ $form->addWidget(new ListEditor("Menu items", "menulist",
+ new LineEdit("Title", "title"),
+ new ComboBox("Page", "page", "", $pagetitles),
+ $config->value("menu")));
$form->addWidget(new Button("Update"));
$form->render();
break;