<?php
/**
* @version 1.0.0
* @package RSFiles! 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 language="javascript" type="text/javascript">

function submitbutton(task)
{
	var form = document.adminForm;
	
	if(task == 'cancel')
	{
		submitform(task);
	}
	else  
	{
		ret = true;
		if(form.LicenseName.value=='') { form.LicenseName.className = 'jdError'; ret=false; } else { form.LicenseName.className = '';  }	
		if(ret) submitform(task);
	}
	return false;
	 
}
</script>
<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>
							<label for="published">
								<?php echo JText::_( 'RSFL_PUBLISHED' ).':'; ?>
							</label>
						</td>
						<td>						
							<?php echo JHTML::_('select.booleanlist','published','class="inputbox"',$this->data->published); ?>
						</td>
					</tr>
					<tr>
						<td>
							<label for="title">
								<?php echo JText::_( 'RSFL_LIC_NAME' ).':'; ?>
							</label>
						</td>
						<td>						
							<input name="LicenseName" value="<?php echo $this->data->LicenseName; ?>" size="50" /> (*)
						</td>
					</tr>
					<tr>
						<td>
							<label for="description">
								<?php echo JText::_( 'RSFL_LIC_DESCRIPTION' ).':'; ?>
							</label>
						</td>
						<td>
							<?php $editor=& JFactory::getEditor();
							echo $editor->display('LicenseText',$this->data->LicenseText,550,400,70,10); ?>						
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_rsfiles" />
<input type="hidden" name="cid" value="<?php echo $this->data->IdLicense; ?>" />
<input type="hidden" name="IdLicense" value="<?php echo $this->data->IdLicense; ?>" />
<input type="hidden" name="controller" value="licenses" />
<input type="hidden" name="view" value="licenses" />
<input type="hidden" name="task" value="" />
</form>

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