<?php

/**
* @version 2.8.12
* @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
*/

global $Itemid;
$exModel = $this->getModel('export');
$eventOptions = $exModel->prepareEventoptions($this->events);
?>
<form action="index.php?option=com_dtregister&Itemid=<?php echo $Itemid; ?>" method="post" name="adminForm">

    <div style="clear:both">

            <?php echo JText::_('DT_EXPORT_INSTRUCTIONS_PT1'); ?>

    </div>

    <table>

 		   <tr>

        	<td>

            	 <input type="checkbox" id="checkall" /> <?php echo JText::_('DT_CHECKALL'); ?> <br />

        	</td>

        </tr>

<?php
echo DtHtml::checkboxListrows('export_events',$eventOptions,2,$this->expevents);
?>

</table>
<input name="option" type="hidden" value="com_dtregister" />
<input name="controller" type="hidden" value="export" />
<input name="formsubmit" type="hidden" value="1" />
<input name="task" type="hidden" value="" />
<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>">
</form>

 <script type="text/javascript">

	  DTjQuery(function(){

    	 DTjQuery("#checkall").click(function(){

		   if(this.checked){

		   		DTjQuery("form input[type=checkbox]").attr("checked", 'checked');

		   }else{

		   		DTjQuery("form input[type=checkbox]").attr("checked", false);

		   }

		 });

	  });

    </script>
