--- nfo/php/libs/com.newsblob.phphtmllib/form/StandardFormContent.inc 2003/02/22 21:07:43 1.1 +++ nfo/php/libs/com.newsblob.phphtmllib/form/StandardFormContent.inc 2003/09/20 00:18:43 1.2 @@ -8,7 +8,7 @@ * as a Confirmation of the Form. * * - * $Id: StandardFormContent.inc,v 1.1 2003/02/22 21:07:43 jonen Exp $ + * $Id: StandardFormContent.inc,v 1.2 2003/09/20 00:18:43 jonen Exp $ * * @author Walter A. Boring IV * @package phpHtmlLib @@ -68,12 +68,12 @@ function form() { $title = $this->_form_title._HTML_SPACE; $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )"; - $this->_infotable = new InfoTable($title, $this->_form_width); + $this->_infotable = new InfoTable($title, $this->_width); $this->_infotable->set_cellpadding(0); //ok call the Child class to add the //form fields inside of form blocks - $this->form_content($data, $err); + $this->form_content(); $this->_infotable->add_row( $this->form_content_buttons() ); return $this->_infotable; @@ -84,11 +84,9 @@ * Child class MUST override this * to provide the form fields * - * @param InfoTable object that is the wrapper - * @param the form data array - * @param the form errors (if any) + * @return object */ - function form_content( &$data, &$err ) { + function form_content() { user_error("StandardFormContent::form_content() - CHILD MUST OVERRIDE "); return NULL; } @@ -105,11 +103,13 @@ * have to do is show the data, and a confirm * submit button. * + * @param string - the title for the table + * @param boolean - show the action buttons? * @return mixed - either raw html, or some * container HTMLTag object. */ - function form_confirm( ) { - $title = "Form Confirmation"._HTML_SPACE; + function form_confirm( $title = "Form Confirmation", $show_buttons=TRUE ) { + $title = $title._HTML_SPACE; $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )"; $table = new InfoTable($title, $this->_width); @@ -127,7 +127,9 @@ $td->add(_HTML_SPACE, $this->add_cancel()); } - $table->add_row( $td ); + if ($show_buttons) { + $table->add_row( $td ); + } return $table; }