Xataface 2.0
Xataface Application Framework
Dataface/ValuelistEditorForm.php
Go to the documentation of this file.
00001 <?php
00002 /*-------------------------------------------------------------------------------
00003  * Xataface Web Application Framework
00004  * Copyright (C) 2005-2008 Web Lite Solutions Corp (shannah@sfu.ca)
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  *-------------------------------------------------------------------------------
00020  */
00021 import('HTML/QuickForm.php');
00022 class Dataface_ValuelistEditorForm extends HTML_QuickForm {
00023         var $table;
00024         var $valuelistName;
00025         var $values;
00026         var $widgetID;
00027         var $_built = false;
00028         
00029         function Dataface_ValuelistEditorForm($tablename, $valuelistName, $widgetID=null){
00030                 $this->table =& Dataface_Table::loadTable($tablename);
00031                 $this->valuelistName = $valuelistName;
00032                 $this->values = $this->table->getValuelist($this->valuelistName);
00033                 $this->widgetID = $widgetID;
00034         }
00035         
00036         function _build(){
00037                 if ( $this->_built ) return;
00038                 $this->_built = true;
00039                 $this->addElement('text', 'add_value', 'Add Value');
00040                 $this->addElement('submit','save','Save');
00041         }
00042         
00043         function display(){
00044                 $this->_build();
00045                 parent::display();
00046         }
00047         
00048         function save($values){
00049                 
00050         }
00051 }
 All Data Structures Namespaces Files Functions Variables Enumerations