<?php

/**
* @version 2.7.16
* @package Joomla 1.7/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,$member_confirmnum;
$mMember = $this->mMember->table;
?>
<style>
 div.pagetitle.icon-48-dtregister {
    background-image:none;
    background-repeat: no-repeat;
    line-height: 48px;
    padding-left: 330px !important;
    text-transform: uppercase;
}
</style>
<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> 
     <tr> 
       <td>
           <?php echo JText::_('DT_CONFIRMATION_NUMBER');?>: 
       </td>
       <td>  
           <input type="text" name="Member[groupMemberId]" value="<?php echo $mMember->confirmnum; ?>" />
       </td>
     </tr>
     
      <tr>

         <td>

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

         </td>

         <td>

           <input type="text" name="Member[discount_code]" value="<?php echo $mMember->TableDiscountcode->code ?>" class="inputbox" />

         </td><td>&nbsp;</td>

      </tr>
     
   </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="tmpl" value="component" />
   <input type="hidden" name="showtoolbar" value="1" />
   <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");
			}

	});
	
 })
 
 Joomla.submitbutton = function(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>