/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/StandardFormContent.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/form/StandardFormContent.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jonen, Sat Feb 22 21:07:43 2003 UTC revision 1.2 by jonen, Sat Sep 20 00:18:43 2003 UTC
# Line 68  class StandardFormContent extends FormCo Line 68  class StandardFormContent extends FormCo
68      function form() {      function form() {
69          $title = $this->_form_title._HTML_SPACE;          $title = $this->_form_title._HTML_SPACE;
70          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";
71          $this->_infotable = new InfoTable($title, $this->_form_width);          $this->_infotable = new InfoTable($title, $this->_width);
72          $this->_infotable->set_cellpadding(0);          $this->_infotable->set_cellpadding(0);
73    
74          //ok call the Child class to add the          //ok call the Child class to add the
75          //form fields inside of form blocks          //form fields inside of form blocks
76          $this->form_content($data, $err);          $this->form_content();
77    
78          $this->_infotable->add_row( $this->form_content_buttons() );          $this->_infotable->add_row( $this->form_content_buttons() );
79          return $this->_infotable;          return $this->_infotable;
# Line 84  class StandardFormContent extends FormCo Line 84  class StandardFormContent extends FormCo
84       * Child class MUST override this       * Child class MUST override this
85       * to provide the form fields       * to provide the form fields
86       *       *
87       * @param InfoTable object that is the wrapper       * @return object
      * @param the form data array  
      * @param the form errors (if any)  
88       */       */
89      function form_content( &$data, &$err ) {      function form_content() {
90          user_error("StandardFormContent::form_content() - CHILD MUST OVERRIDE ");          user_error("StandardFormContent::form_content() - CHILD MUST OVERRIDE ");
91          return NULL;          return NULL;
92      }      }
# Line 105  class StandardFormContent extends FormCo Line 103  class StandardFormContent extends FormCo
103           * have to do is show the data, and a confirm           * have to do is show the data, and a confirm
104           * submit button.           * submit button.
105           *           *
106         * @param string - the title for the table
107         * @param boolean - show the action buttons?
108           * @return mixed - either raw html, or some           * @return mixed - either raw html, or some
109           *                 container HTMLTag object.           *                 container HTMLTag object.
110           */           */
111          function form_confirm( ) {          function form_confirm( $title = "Form Confirmation", $show_buttons=TRUE ) {
112          $title = "Form Confirmation"._HTML_SPACE;          $title = $title._HTML_SPACE;
113          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";
114          $table = new InfoTable($title, $this->_width);          $table = new InfoTable($title, $this->_width);
115    
# Line 127  class StandardFormContent extends FormCo Line 127  class StandardFormContent extends FormCo
127              $td->add(_HTML_SPACE, $this->add_cancel());              $td->add(_HTML_SPACE, $this->add_cancel());
128          }          }
129    
130          $table->add_row( $td );          if ($show_buttons) {
131                $table->add_row( $td );
132            }
133    
134          return $table;          return $table;
135          }          }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed