<?php
/**
* @version 1.0.0
* @package RSEvents! 1.0.0
* @copyright (C) 2009 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
	function submitbutton(task)
{
	var form = document.adminForm;
	
	if(task == 'cancel')
	{
		submitform(task);
	}
	else  
	{
		ret = true;
		
		if(form.GroupName.value=='') { form.GroupName.className = 'rserror'; ret=false; } else { form.GroupName.className = '';  }
		if(form.GroupAcl.selectedIndex == -1 ) { form.GroupAcl.className = 'rserror'; ret=false; } else { form.GroupAcl.className = '';  }
		if(ret) submitform(task);
	}
	return false;
	 
}
</script>
<style>
.rserror 
{
	border:1px solid red;
}
</style>
<form action="index.php" method="post" name="adminForm" id="adminForm">

	<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">
				<table  class="adminform">
					<tr>
						<td>
							<h3><?php echo JText::_('RSE_GROUP_GENERAL'); ?></h3>
						</td>
						<td>						
						</td>
					</tr>
					<tr>
						<td>
							<label for="name">
								<?php echo JText::_( 'RSE_GROUP_NAME' ).':'; ?>
							</label>
						</td>
						<td>						
							<input id="GroupName" name="GroupName" value="<?php echo $this->Group->GroupName; ?>" size="50" /> (*)
						</td>
					</tr>
					<tr>
						<td>
							<label for="access">
								<?php echo JText::_( 'RSE_GROUP_JGROUPS' ).':'; ?>
							</label>
						</td>
						<td>						
							<?php echo $this->accessLists['access1']; ?> (*)
						</td>
					</tr>
					<tr>
						<td>
							<h3><?php echo JText::_('RSE_GROUP_EVENTS'); ?></h3>
						</td>
						<td>						
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="moderation">
								<?php echo JText::_( 'RSE_GROUP_POST' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[enablePosts]','class="inputbox"',@$this->permissions['enablePosts']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="moderation">
								<?php echo JText::_( 'RSE_GROUP_POST_MODERATION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[enableModeration]','class="inputbox"',@$this->permissions['enableModeration']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="canedit">
								<?php echo JText::_( 'RSE_GROUP_CAN_EDIT' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[canEdit]','class="inputbox"',@$this->permissions['canEdit']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="registration">
								<?php echo JText::_( 'RSE_GROUP_REGISTRATION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[allowRegistration]','class="inputbox"',@$this->permissions['allowRegistration']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="registrationCancelation">
								<?php echo JText::_( 'RSE_GROUP_CANCELATION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[allowRegistrationCancel]','class="inputbox"',@$this->permissions['allowRegistrationCancel']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="allowDownload">
								<?php echo JText::_( 'RSE_GROUP_DOWNLOADS' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[allowDownload]','class="inputbox"',@$this->permissions['allowDownload']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="allowUpload">
								<?php echo JText::_( 'RSE_GROUP_UPLOADS' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[allowUpload]','class="inputbox"',@$this->permissions['allowUpload']); ?>
						</td>
					</tr>
					<tr>
						<td>
							<h3><?php echo JText::_('RSE_GROUP_LOCATION'); ?></h3>
						</td>
						<td>						
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="allowLocations">
								<?php echo JText::_( 'RSE_GROUP_ADD_LOCATION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[allowLocations]','class="inputbox"',@$this->permissions['allowLocations']); ?>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="allowLocationsModeration">
								<?php echo JText::_( 'RSE_GROUP_LOCATION_MODERATION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php echo JHTML::_('select.booleanlist','gp[enableLocationModeration]','class="inputbox"',@$this->permissions['enableLocationModeration']); ?>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_rsevents" />
<input type="hidden" name="cid" value="<?php echo $this->Group->IdGroup; ?>" />
<input type="hidden" name="IdGroup" value="<?php echo $this->Group->IdGroup; ?>" />
<input type="hidden" name="controller" value="groups" />
<input type="hidden" name="view" value="groups" />
<input type="hidden" name="task" value="" />
</form>

<?php
//keep session alive while editing
JHTML::_('behavior.keepalive');
?>
