diff options
Diffstat (limited to 'utils/modules/pages.php')
-rw-r--r-- | utils/modules/pages.php | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/utils/modules/pages.php b/utils/modules/pages.php index 373db1a..a3979d3 100644 --- a/utils/modules/pages.php +++ b/utils/modules/pages.php @@ -76,14 +76,15 @@ class Pages { echo "</div>\n"; echo "</div>\n"; echo "<p>Looking ok?</p>"; - beginform("add"); - hidden($vars); - button("yes"); - endform(); - beginform("retry"); - hidden($vars); - button("no"); - endform(); + $form = new Form("add"); + $form->addWidget(new Hidden($vars)); + $form->addWidget(new Button("yes")); + $form->render(); + + $form = new Form("retry"); + $form->addWidget(new Hidden($vars)); + $form->addWidget(new Button("no")); + $form->render(); break; case "edit": @@ -93,23 +94,23 @@ class Pages { echo "<p>See <a rel=\"external\" href=\"http://daringfireball.net/projects/markdown/syntax\">markdown</a> syntax.</p>"; - beginform("preview"); - hidden($vars); - textedit("Content", "content", $content); - button("Preview"); - endform(); + $form = new Form("preview"); + $form->addWidget(new Hidden($vars)); + $form->addWidget(new TextEdit("Content", "content", $content)); + $form->addWidget(new Button("Preview")); + $form->render(); break; case "select": default: $pagelist = array(); foreach($this->pages as $p) { - $pagelist[$p->title] = $p->title; + $pagelist[$p->title] = $p->title; } - beginform("edit"); - combobox("Edit this entry:", "title", "", $pagelist); - button("Edit..."); - endform(); + $form = new Form("edit"); + $form->addWidget(new ComboBox("Edit this entry:", "title", "", $pagelist)); + $form->addWidget(new Button("Edit...")); + $form->render(); break; } } |