]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/form/Form.class.php
Further refactoring of the FormElement class.
[timetracker.git] / WEB-INF / lib / form / Form.class.php
index f832b632b611a7966af23342c549bfcad4ca81b7..cd506aede47182085e4b45c834a615a7cdfd33e7 100644 (file)
@@ -141,8 +141,8 @@ class Form {
                if ($el!=null) {
                        $el->setFormName($this->name);
                        if (isset($arguments["id"])) $el->setId($arguments["id"]);
-                       if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
-                       if (isset($arguments["enable"])) $el->setEnable($arguments["enable"]);
+                       if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
+                       if (isset($arguments["enable"])) $el->setEnabled($arguments["enable"]);
                        
                        if (isset($arguments["style"])) $el->setStyle($arguments["style"]);
                        if (isset($arguments["size"])) $el->setSize($arguments["size"]);
@@ -159,10 +159,10 @@ class Form {
        
        function addInputElement(&$el) {
                if ($el && is_object($el)) {
-                       if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+                       if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
                
                        $el->setFormName($this->name);
-                       $this->elements[$el->getName()] = &$el;
+                       $this->elements[$el->name] = &$el;
                }
        }