A bit of refactoring in Form.class.php.
authoranuko <support@anuko.com>
Mon, 6 Feb 2017 17:26:59 +0000 (17:26 +0000)
committeranuko <support@anuko.com>
Mon, 6 Feb 2017 17:26:59 +0000 (17:26 +0000)
WEB-INF/lib/form/Form.class.php
WEB-INF/templates/footer.tpl

index 6b663a9..14680db 100644 (file)
 // +----------------------------------------------------------------------+
 
 class Form {
-    var $formName      = "";
-       var $mAction       = "";
+
+  var $name = '';
+  // TODO: refactoring ongoing down from here.
+
        var $mMethod       = "post";
        var $mEnctype      = "";
        var $mId           = "";
@@ -46,7 +48,7 @@ class Form {
 //     var $mFormBean;
     
     function __construct($formid) {
-        $this->formName = $formid;
+        $this->name = $formid;
     }
     
     function setRequest(&$request) {
@@ -72,21 +74,15 @@ class Form {
        // name
        // onsubmit
        // onreset
-       function setName($value) { $this->formName = $value; }
-    function getName() { return $this->formName; }
+       function setName($value) { $this->name = $value; }
+    function getName() { return $this->name; }
     
     function setId($value) { $this->mId = $value; }
     function getId() { return $this->mId; }
     
-    function setAction($value) { $this->mAction = $value; }
-    function getAction() { return $this->mAction; }
-    
     function setMethod($value) { $this->mMethod = $value; }
     function getMethod() { return $this->mMethod; }
     
-    function setEnctype($value) { $this->mEnctype = $value; }
-    function getEnctype() { return $this->mEnctype; }
-    
     function isSubmit()        {
        if (!isset($this->mRequest)) return false;
         $result = false;
@@ -225,7 +221,7 @@ class Form {
                                return($this->OutputError("Type not found for input element","AddInput"));
                }
                if ($el!=null) {
-                       $el->setFormName($this->formName);
+                       $el->setFormName($this->name);
                        if (isset($arguments["id"])) $el->setId($arguments["id"]);
                        if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
                        if (isset($arguments["render"])) $el->setRenderable($arguments["render"]);
@@ -251,21 +247,18 @@ class Form {
                            
                        if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
                
-                       $el->setFormName($this->formName);
+                       $el->setFormName($this->name);
                        $this->mElements[$el->getName()] = &$el;
                }
        }
        
        
        function toStringOpenTag() {
-        $html = "<form name=\"$this->formName\"";
+        $html = "<form name=\"$this->name\"";
         
         if ($this->mId!="") 
             $html .= " id=\"$this->mId\"";
             
-        if ($this->mAction!="") 
-            $html .= " action=\"$this->mAction\"";
-        
         if ($this->mMethod!="") 
             $html .= " method=\"$this->mMethod\"";
         
index 81a8092..ec55d53 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.9.36.3566 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.9.36.3567 | 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>