Some cleanup.
authoranuko <support@anuko.com>
Thu, 16 Feb 2017 15:41:24 +0000 (15:41 +0000)
committeranuko <support@anuko.com>
Thu, 16 Feb 2017 15:41:24 +0000 (15:41 +0000)
WEB-INF/lib/form/Form.class.php
WEB-INF/templates/footer.tpl

index 0fcbd62..7edbf3c 100644 (file)
@@ -38,8 +38,6 @@ class Form {
   var $name = '';
   // TODO: refactoring ongoing down from here.
 
-    var $error;
-       var $debugFunction;
        var $mElements     = array();
        var $mRequest;
     
@@ -83,15 +81,6 @@ class Form {
         return $result;
     }
        
-       function OutputError($error,$scope="")
-       {
-               $this->error=(strcmp($scope,"") ? $scope.": ".$error : $error);
-               if(strcmp($function=$this->debugFunction,"")
-               && strcmp($this->error,""))
-                       $function($this->error);
-               return($this->error);
-       }
-       
        //// INPUT element
        // type = TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT | RESET | FILE | HIDDEN | IMAGE | BUTTON
        // name
@@ -107,18 +96,6 @@ class Form {
        // onselect -  INPUT and TEXTAREA
        // onchange
        function addInput($arguments) {
-               if(strcmp(gettype($arguments),"array"))
-                       $this->OutputError("arguments must be array","AddInput");
-                       
-               if(!isset($arguments["type"]) || !strcmp($arguments["type"],""))
-                       return($this->OutputError("Type not defined","AddInput"));
-                       
-               if(!isset($arguments["name"]) || !strcmp($arguments["name"],""))
-                       return($this->OutputError("Name of element not defined","AddInput"));
-                       
-               if (isset($this->mElements[$arguments["name"]]))
-                   return($this->OutputError("it was specified '".$arguments["name"]."' name of an already defined input","AddInput"));
-                       
                switch($arguments["type"]) {
                    
                        case "textfield":
@@ -201,9 +178,6 @@ class Form {
                            $el = new UploadFile($arguments["name"]);
                            if (isset($arguments["maxsize"])) $el->setMaxSize($arguments["maxsize"]);
                            break;
-                             
-                       default:
-                               return($this->OutputError("Type not found for input element","AddInput"));
                }
                if ($el!=null) {
                        $el->setFormName($this->name);
@@ -227,11 +201,8 @@ class Form {
        
        function addInputElement(&$el) {
                if ($el && is_object($el)) {
-                       if (!$el->getName())
-                           return($this->OutputError("no name in element","addInputElement"));
-                           
-                       if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
-               
+                        if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+
                        $el->setFormName($this->name);
                        $this->mElements[$el->getName()] = &$el;
                }
index 83e4d74..8b67bca 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3580 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3581 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>