<?php

/**
* @version 2.7.18
* @package Joomla 2.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

$reminder = $this->reminder;

$files = $reminder->files;
$files_html = "";
foreach($files as $value){
$value = (object)$value;
$files_html .='<tr>

					<td>'.basename($value->path).'</td>

					<td><a class="remove_file" href="index.php?option=com_dtregister&format=raw&task=remove_file&controller=reminder&id='.$reminder->id.'&file='.$value->id.'" >'.JText::_( 'DT_REMOVE' ).'</a></td>

			</tr>';

}
echo $files_html;
	 ?>
	 <script type="text/javascript">
	   DTjQuery(function(){
	       DTjQuery(".remove_file").click(function(event){

					      event.preventDefault();

						    element = this;

						    DTjQuery.get(DTjQuery(this).attr('href'), function(data){

								DTjQuery(element).parent().parent().remove();

						});

						return false;

					});

	   });
	 </script>
