table_attr = $this->table_attr; if ($this->edit_mode) { $this->disable = true; } // initialize result buffer $_buffer = ''; // check if form tag is included if ($this->with_form_tag) { $this->submit_target = 'submitExec'; $_buffer .= $this->startForm()."\n"; } // loop the form element $_row_num = 0; foreach ($this->elements as $row) { $_form_element = $row['element']->out(); if ($_form_element_info = trim($row['info'])) { $_form_element .= '
'.$_form_element_info.'
'; } // append row $_table->appendTableRow(array($row['label'], ':', $_form_element)); // set the column header attr $_table->setCellAttr($_row_num+1, 0, 'width="20%" valign="top"'.$this->table_header_attr); $_table->setCellAttr($_row_num+1, 1, 'width="1%" valign="top"'.$this->table_header_attr); // set the form element column attr $_table->setCellAttr($_row_num+1, 2, 'width="79%" '.$this->table_content_attr); $_row_num++; } // link and buttons $_edit_link = ''; $_delete_button = ''; $_back_button = ''; $_del_value = __('Delete Record'); $_cancel_value = __('Cancel'); // check if we are on edit form mode if ($this->edit_mode) { $_edit_link .= 'EDIT'; // delete button exists if the record_id properties exists if ($this->record_id && $this->delete_button) { // create delete button $_delete_button = ''; } // back button if ($this->back_button) { $_back_button = ''; } } $_buttons = ''; // check if form tag is included if ($this->with_form_tag) { $_buttons = '' .'' .'
submit_button_attr.' /> '.$_back_button.' '.$_delete_button.'
'."\n"; } // get the table result $_buffer .= $_buttons; $_buffer .= $_table->printTable(); $_buffer .= $_buttons; // extract all hidden elements here foreach ($this->hidden_elements as $_hidden) { $_buffer .= $_hidden->out(); } // update ID hidden elements if ($this->edit_mode AND $this->record_id) { // add hidden form element flag for detail editing purpose $_buffer .= ''; } // check if form tag is included if ($this->with_form_tag) { $_buffer .= $this->endForm()."\n"; } if ($this->edit_mode) { // hidden form for deleting records $_buffer .= '
' .'
'; } // for debugging purpose only // $_buffer .= ''; // hidden iframe for form executing $_buffer .= ''; return $_buffer; } }