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; |
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 |
} |
} |
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 |
|
|
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 |
} |
} |