A bit more refactoring of textarea element.
authoranuko <support@anuko.com>
Mon, 8 Jan 2018 19:47:12 +0000 (19:47 +0000)
committeranuko <support@anuko.com>
Mon, 8 Jan 2018 19:47:12 +0000 (19:47 +0000)
WEB-INF/lib/form/Form.class.php
WEB-INF/lib/form/TextArea.class.php
WEB-INF/templates/footer.tpl
client_add.php
client_edit.php

index a67c0c3..cf7890c 100644 (file)
@@ -77,8 +77,6 @@ class Form {
       case 'textarea':
         import('form.TextArea');
         $el = new TextArea($params['name']);
-        if (isset($params['cols'])) $el->setColumns($params['cols']);
-        if (isset($params['rows'])) $el->setRows($params['rows']);
         if (isset($params['maxlength'])) $el->setMaxLength($params['maxlength']);
         break;
 
index c6e8d1f..be884f0 100644 (file)
@@ -29,8 +29,6 @@
 import('form.FormElement');
        
 class TextArea extends FormElement {
-    var $mColumns      = "";
-    var $mRows         = "";
     var $mOnKeyPress   = "";
 
   function __construct($name)
@@ -39,9 +37,6 @@ class TextArea extends FormElement {
     $this->name = $name;
   }
 
-       function setColumns($value)     { $this->mColumns = $value;     }
-       function setRows($value)        { $this->mRows = $value;        }
-       
        function getHtml() {
     
            if (empty($this->id))
@@ -49,13 +44,7 @@ class TextArea extends FormElement {
            
                $html = "\n\t<textarea";
                $html .= " name=\"$this->name\" id=\"$this->id\"";
-               
-               if ($this->mColumns!="")
-                 $html .= " cols=\"$this->mColumns\"";
-                 
-               if ($this->mRows!="")
-                  $html .= " rows=\"$this->mRows\"";
-                  
+
                if ($this->max_length!="") {
                        if ($this->mOnKeyPress) $this->mOnKeyPress .= ";";
                        $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);";
index 8db99ce..3946f41 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.13.11.3734 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.13.11.3735 | 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>
index cc8bd8a..d3ca5aa 100644 (file)
@@ -52,7 +52,7 @@ if ($request->isPost()) {
 
 $form = new Form('clientForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 350px;','value'=>$cl_name));
-$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address));
+$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address));
 $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax));
 if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
   $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects));
index 87116cd..cf4d154 100644 (file)
@@ -62,7 +62,7 @@ if ($request->isPost()) {
 $form = new Form('clientForm');
 $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
 $form->addInput(array('type'=>'text','name'=>'name','maxlength'=>'100','style'=>'width: 350px;','value'=>$cl_name));
-$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address));
+$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address));
 $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax));
 $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status,
   'data'=>array(ACTIVE=>$i18n->getKey('dropdown.status_active'),INACTIVE=>$i18n->getKey('dropdown.status_inactive'))));