/** * @todo remove tyr dependency - icky. */ function get_submitted_data_html() { include_once(TYR_INC.'tyr.php'); $tyr = new Tyr(); $model =& $this->get_model(); $html = '<div class="submitted_data">'; $html .= '<h3>You submitted:</h3>'; $html .= $tyr->make_html_table($model->get_values_for_show_submitted_data(), false); $html .= '</div>'; return $html; }
function on_every_time_delete() { $tc =& $this->get_thor_core(); $id = $this->get_action_id(); { $elements = $this->get_element_names(); foreach ($elements as $element_name) { $this->remove_element($element_name); } } echo '<h3>Are you sure you want to delete row id ' . $id . '?</h3>'; $this->actions = array('delete' => 'Confirm Delete', 'cancel' => 'Cancel'); $data = $tc->get_values_for_primary_key($this->get_action_id()); unset ($data['id']); // lets not show the id in this view $data = $tc->transform_thor_values_for_display($data); if ($data) { // we are going to use Tyr to format this up though it is a little silly ... $tyr = new Tyr(); $html = $tyr->make_html_table($data, false); echo $html; } else echo '<p>No data to display for this row</p>'; }