protected function createPageFormBase($name, $new) { $form = new AppForm($this, $name); if (!$new) { $form->addHidden("id"); } $form->addText("name", "Name", 40, 50); $form->addTextArea("description", "Description", 40, 3); $form->addTextArea("text", "Text", 40, 15); $form->addMultiSelect("tags", "Tags", Tag::findAll()->fetchPairs("id", "name"))->setOption("description", Html::el("a")->href($this->link("Tag:"))->setText("Edit tags")); $form->addCheckbox("allowed", "Allowed"); $form->addSubmit("s", "Save"); return $form; }