Пример #1
0
 /**
  * Generic editing form for users
  * @param  request             The request object
  */
 public static function editUsers($request)
 {
     // Use the Edit functionality to generate a CRUD workflow
     $crud = new Zmax_Db_Edit("Zmax_Model_User");
     // The comp_name field comes from the Company link
     $crud->setFormField("user_admin", Zmax_Db_Edit::BOOLEAN_FIELD);
     // Shows how to create a boolean field
     $crud->setFormField("user_super_admin", Zmax_Db_Edit::BOOLEAN_FIELD);
     return $crud->edit($request);
 }
Пример #2
0
 /**
  * 
  */
 function regquestionsAction()
 {
     // Use the generic editor
     $crud = new Zmax_Db_Edit("RegQuestion");
     $crud->setSlaveTable("RegChoice", array("id_question" => "id"), 10);
     $crud->setAutoIncrementedKey("id_choice");
     $this->view->content = $crud->edit($this->getRequest());
     // Show the view
     echo $this->view->render("layout");
 }
Пример #3
0
 function criteriaAction()
 {
     require_once "Criteria.php";
     $crud = new Zmax_Db_Edit("Criteria");
     $this->view->content = $crud->edit($this->getRequest());
     // Show the view
     echo $this->view->render("layout");
 }