]> wagnertech.de Git - timetracker.git/blobdiff - user_edit.php
Finished refactoring of the FormElement class.
[timetracker.git] / user_edit.php
index ac1143f3aaa3ed779800f5c4b53148b513aeaba3..5fd3b7ec3868e20ebe2a36a898d60624703f9fe4 100644 (file)
@@ -128,7 +128,7 @@ $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','for
 class NameCellRenderer extends DefaultCellRenderer {
   function render(&$table, $value, $row, $column, $selected = false) {
     $this->setOptions(array('width'=>200,'valign'=>'top'));
-    $this->setValue('<label for = "'.$table->getName().'_'.$row.'">'.htmlspecialchars($value).'</label>');
+    $this->setValue('<label for = "'.$table->name.'_'.$row.'">'.htmlspecialchars($value).'</label>');
     return $this->toString();
   }
 }
@@ -137,13 +137,13 @@ class RateCellRenderer extends DefaultCellRenderer {
     global $assigned_projects;
     $field = new FloatField('rate_'.$table->getValueAtName($row,'id'));
     $field->setFormName($table->getFormName());
-    $field->setLocalization($GLOBALS['I18N']);
+    $field->localize($GLOBALS['I18N']);
     $field->setSize(5);
     $field->setFormat('.2');
     foreach ($assigned_projects as $p) {
       if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']);
     }
-    $this->setValue($field->toStringControl());
+    $this->setValue($field->getHtml());
     return $this->toString();
   }
 }