X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FForm.class.php;h=be2c901fc5f878201e0586f95eb5d6bc28345dfe;hb=0fa80122e692abac96010f4da8ed55c3aa52b81b;hp=5f825451ef280e040d61bbb459cba5413f9b27bb;hpb=e1703495130c8ed88fe210f50a2a6b453b3c566b;p=timetracker.git diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index 5f825451..be2c901f 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -26,15 +26,10 @@ // | https://www.anuko.com/time_tracker/credits.htm // +----------------------------------------------------------------------+ -// +----------------------------------------------------------------------+ -// | -// | Class generates elements of specification HTML 4.01 -// | http://www.w3.org/TR/1999/REC-html401-19991224 -// | -// +----------------------------------------------------------------------+ - +// Form class is a container for HTML forms we use in the application. +// It contains an array of $elements - which are individual input controls +// belonging to a form. class Form { - var $name = ''; // Form name. var $elements = array(); // An array of input controls in form. @@ -90,8 +85,9 @@ class Form { case 'checkbox': import('form.Checkbox'); $el = new Checkbox($params['name']); + if (isset($params['checked'])) $el->setChecked(true); + // TODO: refactoring ongoing down from here. - if (@$params["checked"]) $el->setChecked(true); $el->setData(@$params["data"]); break;