[PHPVortex-Commit] phpvortex FT_Text.class.php,1.2,1.3 TB_Base.class.php,1.8,1.9
Brought to you by:
nop144666
From: Thiago R. <nop...@us...> - 2004-10-05 15:10:51
|
Update of /cvsroot/phpvortex/phpvortex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22090 Modified Files: FT_Text.class.php TB_Base.class.php Log Message: Fixed some bugs and improved a bit TB_Base::ShowForm() and FT_Text Index: FT_Text.class.php =================================================================== RCS file: /cvsroot/phpvortex/phpvortex/FT_Text.class.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FT_Text.class.php 4 Oct 2004 18:08:24 -0000 1.2 --- FT_Text.class.php 5 Oct 2004 15:09:29 -0000 1.3 *************** *** 73,77 **** if ($this->required) { echo <<<END ! if (frm.{$this->name_form}.value == "") errors += " * {$this->label}"; END; } --- 73,78 ---- if ($this->required) { echo <<<END ! if (frm.{$this->name_form}.value == "") errors += " * {$this->label}\\n"; ! END; } Index: TB_Base.class.php =================================================================== RCS file: /cvsroot/phpvortex/phpvortex/TB_Base.class.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TB_Base.class.php 4 Oct 2004 21:14:45 -0000 1.8 --- TB_Base.class.php 5 Oct 2004 15:09:29 -0000 1.9 *************** *** 369,376 **** * @param string $name The HTML FORM name. * @param string $action Where to submit the data to. * @param array $data Array containing the data to seek as 'field' => 'value'. * @return bool Returns TRUE on success, FALSE on error. */ ! function ShowForm($name, $action, $data = NULL) { global $vortex_msgs; --- 369,377 ---- * @param string $name The HTML FORM name. * @param string $action Where to submit the data to. + * @param string $submit HTML containing the last line in a form, leave NULL to use a normal submit button. * @param array $data Array containing the data to seek as 'field' => 'value'. * @return bool Returns TRUE on success, FALSE on error. */ ! function ShowForm($name, $action, $image = NULL, $data = NULL) { global $vortex_msgs; *************** *** 381,385 **** function Submit_{$name}(frm) { ! var error = ''; END; --- 382,387 ---- function Submit_{$name}(frm) { ! var errors = ''; ! END; *************** *** 389,394 **** echo <<<END ! if (error != '') { ! alert("{$vortex_msgs['consist_error']}\\n\\n"+error); return false; } --- 391,396 ---- echo <<<END ! if (errors != '') { ! alert("{$vortex_msgs['consist_error']}\\n\\n"+errors); return false; } *************** *** 406,409 **** --- 408,416 ---- $field->Show($this->data); } + if (empty($submit)) { + echo "<tr class='submit' id='submit_$name'><td colspan='2'><input type='submit'></td></tr>"; + } else { + echo "<tr class='submit' id='submit_$name'><td colspan='2'>$submit</td></tr>"; + } echo "</tbody>\n</form>\n</table></div>\n"; } |