<?php $this->declareVars(array('errors' => array())); ?>
<?php echo $this->render('common/header.phtml'); ?>	
<h1>Editace článku</h1>
<?php if(sizeof($this->errors) > 0) { ?>
<ul class="notices">
<?php foreach($this->errors as $_errors) { ?>
	<?php foreach($_errors as $_error) { ?>
	<li><?php echo $_error; ?></li>	
	<?php } ?>
<?php } ?>
</ul>
<?php } ?>
	<form id="frmEditPrescription" action="<?php echo $this->url; ?>" method="post">
	<table border="1">
		<tr><th>Id</th><td><?php echo $this->article->id; ?></td></tr>
		<tr><th>Kategorie</th><td><?php echo $this->formSelect('category_id', $this->article->category_id, null, $this->categories) ?></td></tr>
		<tr><th>Rewrite string</th><td><?php echo $this->formText('rewrite_string', $this->article->rewrite_string, array('size' => 60)); ?></td></tr>
		<tr><th>Název</th><td><?php echo $this->formText('name', $this->article->name, array('size' => 60)); ?></td></tr>
		<tr><th>Popis</th><td><?php echo $this->formTextarea('description', $this->article->description, array('cols' => 60, 'rows' => 5)) ?></td></tr>
		<tr><th>Text článku</th><td><?php echo $this->formTextarea('content', $this->article->content, array('cols' => 60, 'rows' => 10)) ?></td></tr>
		<tr><th>Datum</th><td><?php echo $this->formText('date', $this->article->date, array('size' => 10)); ?>
		<?php //echo $this->date('date', $this->article->date); ?>
		</td></tr>
	</table>
	<p>
	<?php echo $this->formSubmit('submit', $this->new ? 'Vytvořit':'Uložit změny'); ?>
	<?php if(!$this->new) { echo $this->formSubmit('delete', 'Smazat článek'); } ?>
	</p>
</form>
<?php echo $this->render('common/footer.phtml'); ?>