// Define rendering class for a single cell for time entry in week view table.
class TimeCellRenderer extends DefaultCellRenderer {
function render(&$table, $value, $row, $column, $selected = false) {
- $field_name = $table->getValueAtName($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column).
+ $field_name = $table->getValueAt($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column).
$field = new TextField($field_name);
$field->setFormName($table->getFormName());
$field->setSize(2);
$table->setInteractive(false);
$form->addInputElement($table);
-$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
+$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit')));
// Submit.
if ($request->isPost()) {
}
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
-$smarty->assign('title', $i18n->getKey('title.time'));
+$smarty->assign('title', $i18n->get('title.time'));
$smarty->assign('content_page_name', 'table_test.tpl');
$smarty->display('index.tpl');