<?php

/**
* @version 2.7.10
* @package Joomla 1.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,$member_confirmnum;
$mMember = $this->mMember->table;
?>
<form name="adminForm" method="post" action="index.php" enctype="multipart/form-data">
   <table>

     <?php
       
	   echo $this->form;

	 ?>
     <tr> 
       <td>
           <?php echo JText::_('DT_UNATTEND');?>: 
       </td>
       <td>  
           <?php
           	 $options=array();

			 $options[]=JHTML::_('select.option', '0', JText::_( 'DT_ATTEND' ));
  
			 $options[]=JHTML::_('select.option', '1', JText::_( 'DT_UNATTEND' ));
  
			 echo JHTML::_('select.genericlist', $options,'Member[attend]','','value','text',$mMember->attend);
            ?>
       </td>
     </tr> 
     <?php if($member_confirmnum) { ?>
     <tr> 
       <td>
           <?php echo JText::_('DT_CONFIRMATION_NUMBER');?>: 
       </td>
       <td>  
           <input type="text" name="Member[groupMemberId]" value="<?php echo $mMember->confirmnum; ?>" />
       </td>
     </tr> 
     <?php
	   $html = $mMember->barCodeImg();

	   if($html!=""){
	 ?>
	   <tr>
	      <td><?php echo JText::_( 'DT_BARCODE' ); ?>:</td>

	      <td><?php echo $html; ?></td><td>&nbsp;</td>
	   </tr>
	 <?php  
  	   }
	   ?>
     <?php } ?>
   </table>
   <input type="hidden" name="Member[groupMemberId]" value="<?php echo $mMember->groupMemberId; ?>" />
   <input type="hidden" name="Member[groupUserId]" value="<?php echo $mMember->groupUserId; ?>" />
   <input type="hidden" name="formsubmit" value="edit" />
   <input type="hidden" name="option" value="com_dtregister" />
   <input type="hidden" name="controller" value="member" />
   <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>" />
   <input type="hidden" name="task" value="edit" />
</form>
<div id="debug">
</div>
<script type="text/javascript">
 
 DTjQuery(function(){
   //DTjQuery.validator.messages.required = " ";

    DTjQuery(document.adminForm).validate({
	        success: function(label) {
				label.addClass("success");
			}

	});
	
 })
 
 function submitbutton(pressbutton){
      if(pressbutton == "cancel"){
	  submitform(pressbutton);	
	}
	if(DTjQuery(document.adminForm).valid()){
		 var disabled = DTjQuery(':disabled');
        DTjQuery.each(disabled, function(){
		     DTjQuery(this).removeAttr('disabled');  
	   	})
	  	submitform(pressbutton);
	}
	
	return false;

}

</script>