]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/form/FormElement.class.php
Refactoring - renaming things.
[timetracker.git] / WEB-INF / lib / form / FormElement.class.php
index 3cab655a5e64c8f2e38aa857a31ffab537ef9621..f2d0c9207e80168982387724409d85b704ce2429 100644 (file)
 
 // FromElement is the base class for controls on forms.
 class FormElement {
-  var $id = '';
-  var $name;
-  var $form_name = '';
-  var $value = '';
-  var $size = '';
-  var $max_length = '';
+  var $id = '';         // Control id.
+  var $name;            // Control name.
+  var $form_name = '';  // Form name the control is in.
+  var $value = '';      // Value of the control.
+  var $size = '';       // Control size.
+  var $max_length = ''; // Max lenght of text in control.
+  var $on_change = '';  // What happens when value of control changes.
+  var $on_click = '';   // What happens when the control is clicked.
+
   // TODO: refactoring ongoing down from here.
-       var $mTabindex          = "";
-       var $mAccesskey     = "";
-       var $mOnSelect          = "";
-       var $mOnChange          = "";
-       var $mOnClick           = "";
-       var $mOnKeyPress        = "";
+       var $mOnKeyPress        = ""; // This is only used in TextArea, consider moving out of the base class.
        var $mOnFocus           = "";
        var $mLabel         = "";
        var $mStyle         = "";
@@ -77,12 +75,6 @@ class FormElement {
        
        function setMaxLength($value) { $this->max_length = $value; }
        function getMaxLength() { return $this->max_length; }
-       
-       function setTabindex($value) { $this->mTabindex = $value; }
-       function getTabindex() { return $this->mTabindex; }
-       
-       function setAccesskey($value) { $this->mAccesskey = $value; }
-       function getAccesskey() { return $this->mAccesskey; }
 
        function setStyle($value)       { $this->mStyle = $value; }
        function getStyle() { return $this->mStyle; }
@@ -93,9 +85,8 @@ class FormElement {
        function setEnable($flag)       { $this->mEnabled = $flag;      }
        function isEnable()     { return $this->mEnabled; }
        
-       function setOnChange($str)      { $this->mOnChange = $str; }
-       function setOnClick($str)       { $this->mOnClick = $str; }
-       function setOnSelect($str)      { $this->mOnSelect = $str; }
+       function setOnChange($str) { $this->on_change = $str; }
+       function setOnClick($str) { $this->on_click = $str; }
 
        function setLocalization($i18n) {
                $this->mI18n = $i18n;