CMS  Version 3.9
glossary_form.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("glossary");
3 Fakoli::usingFeature("auto_form");
4 
5 $menu_item = "Glossary";
6 
7 $glossary_id = checkNumeric($_GET["glossary_id"]);
8 
10 
11 if($glossary_id){
12  $glossary->load($glossary_id);
13 }
14 
15 $form = new AutoForm($glossary);
16 $form->required("term");
17 $form->allowDelete = true;
18 
19 if($method=="POST")
20 {
21  if($form->save())
22  {
23  redirect("glossaries");
24  }
25 }
26 
27 $script .= $form->writeScript();
28 $form->drawForm();
29 ?>
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
$method
Pull out a simple reference to the request method.
Definition: core.inc:1573
if($glossary_id) $form
$menu_item
$glossary_id
$glossary
if($method=="POST") $script