<? content() ?>
<h1>Modificar Post</h1>

<!-- tinyMCE -->
<?= javascript_include_tag('tiny_mce/tiny_mce') ?>
<script language="javascript" type="text/javascript">
	tinyMCE.init({
		theme : "advanced",
		mode : "exact",
		elements : "body",		
		content_css : "htmleditor.css",
		extended_valid_elements : "a[href|target|name]",
		plugins : "table",
		theme_advanced_buttons3_add_before : "fontselect,tablecontrols,separator",		
		theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes		
		theme_advanced_fonts : "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Verdana=verdana",
		debug : false,
		theme_advanced_toolbar_location : "top"
	});
</script>
<!-- /tinyMCE -->

<? form_tag('posts/modificar', 'enctype: multipart/form-data') ?>
<table>

	<tr>
		<td align='right'>
			<b>Titulo:</b>
		</td>	
		<td>
			 <?= text_field_tag('title', 'value: '.$post->title, 'size: 50') ?>
		</td>	
	</tr>
	<tr>
		<td align='right'>
			<b>Texto:</b> 
		</td>	
		<td>
			 <?= textarea_tag('body', 'value: '.$post->body, 'cols: 60') ?>
		</td>		
	</tr>
	<tr>
		<td align='right'>
			<b>Tags:</b>
		</td>	
		<td>
			 <?= text_field_tag('tags', 'size: 40', "value: {$post->tags}") ?>
		</td>	
	</tr>
	<tr>
		<td align='right'></td>	
		<td>
			 <?= submit_tag('Modificar') ?>
			 <?= link_to('posts/index', 'Volver') ?>
		</td>		
	</tr>

</table>
<? end_form_tag() ?>