<script type="text/javascript" src="/public/editor/fckeditor.js"></script>

<h1><?=$this->lang->line('downloads_h1_edit')?></h1>


<?=form_open('admin/downloadsedit/'.$record->download_id)?>
<?=form_hidden('download_id',$record->download_id)?>
<?=form_hidden('do','update')?>
<?=form_hidden('download_date',$record->download_date)?>

	<dl class="news_edit">
		<dt><?=$this->lang->line('downloads_title')?></dt>
			<dd>
				<input type="text" value="<?=$record->download_title?>" size="80" maxlength="128" name="download_title" id="content_title" />
			</dd>
		<dt> </dt>
			<dd>
				<?=form_dropdown('download_category',$this->mdownloads->generate_category_dropdown(),$record->download_category,'')?> <?=form_dropdown('download_type',$this->mdownloads->generate_type_dropdown(),$record->download_type,'')?>
			</dd>
		<dt><?=$this->lang->line('downloads_file')?></dt>
			<dd>
				<?=$this->lang->line('downloads_local')?><blockquote><?=form_dropdown('download_file',$dropdown,$record->download_file,"onchange='clear_remote()'")?></blockquote>
				
				<?=$this->lang->line('downloads_remote')?><blockquote><?=form_input('download_file_remote',$remote,'id="download_file_remote"')?></blockquote>
			</dd>
		
			<dt><?=$this->lang->line('downloads_description')?></dt>
			<dd>
				<textarea cols="64" rows="5" wrap="OFF" name="download_short" id="download_short"><?=$record->download_short?></textarea>
			</dd>
		
		
				<dt>issuu</dt>
				<dd>
					<input type="text" value="<?=$record->download_issuu?>" size="80" maxlength="256" name="download_issuu" id="download_issuu" />
				</dd>
		
		
			<dt></dt>
			<dd>
				<?=form_submit('ok',$this->lang->line('downloads_button_save'))?>
			</dd>
	</dl>
	<div class="clear"></div>
	
	
</form>
<script>
window.onload = function()
{
	var oFCKeditor = new FCKeditor( 'download_short' ) ;
	oFCKeditor.BasePath = "/public/editor/" ;
	oFCKeditor.Height="200";
	oFCKeditor.ToolbarSet="downloads_edit";
	oFCKeditor.ReplaceTextarea() ;
}

function clear_remote()
{
	document.getElementsByName('download_file_remote')[0].value='';
}
</script>