<?php

/**
* @version 2.8.0
* @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;
?>
<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?option=com_dtregister&Itemid=<?php echo $Itemid ?>" enctype="multipart/form-data">

     <?php
       
	   echo $this->form;
	
	 ?>
     
   <input type="hidden" name="Member[groupUserId]" value="<?php echo $this->userId; ?>" />
   <input type="hidden" name="userId" value="<?php echo $this->userId; ?>" />
   <input type="hidden" name="formsubmit" value="add" />
   <input type="hidden" name="option" value="com_dtregister" />
   <input type="hidden" name="controller" value="membermanage" />
   <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="add" />
</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>