<?php
/** View Template: edit blog comment template
 *
 * @package koubel homepage
 * @author Miroslav Kubelik (koubel@volny.cz)
 * @copyright Copyright (c) 2007-2009 Miroslav Kubelik
 * @license http://opensource.org/licenses/gpl-license.php GNU GPL
 */
?>
<h2>Edit blog Comment</h2>

<?php if(isset($this->messages)):foreach($this->messages as $message):?>
<div style="color:blue"><?php echo $message?></div>
<?php endforeach;endif?>

<ul>
 <li>is for the article <?php echo $this->anchor($this->articleUrl,$this->escape($this->article->getTitle()))?></li>
</ul>

<div>Id: <?php echo $this->escape($this->formData["id"])?></div>

<form id="blogCommentForm" method="post" action="<?php echo $this->url(
    array(
        "controller" => "comment",
        "action" => "update-db",
        "itemId" => $this->formData["id"]
    ),"blogAdminItemAction")?>">
 
<fieldset style="margin:0;padding:0;border:none">

<div>name</div>
<input style="width:200px" id="name" name="name" value="<?php echo isset($this->formData["name"]) ? $this->formData["name"] : ""?>" />

<div>email</div>
<input style="width:200px" id="email" name="email" value="<?php echo isset($this->formData["email"]) ? $this->formData["email"] : ""?>" />

<div>www</div>
<input style="width:200px" id="www" name="www" value="<?php echo isset($this->formData["www"]) ? $this->formData["www"] : ""?>" />

<div>posted</div>
<input style="width:200px" id="posted" name="posted" value="<?php echo isset($this->formData["posted"]) ? $this->formData["posted"] : ""?>" />
<a href="javascript:postedCal.popup();"><img style="border:none" src="<?php echo AppBaseUrl::getBaseUrl()?>/images/calendarimg/cal.gif" alt="Click Here to Pick up the datetime" /></a>
 

<div>Comment text</div>
<textarea style="width:470px" name="message" id="message" rows="5" cols="35"><?php echo isset($this->formData["message"]) ? $this->formData["message"] : ""?></textarea>

<!-- button must be in div -->
<div style="margin-top:0.5em">
 <input type="submit" />
 <input type="reset" value="Reset" />
</div>

</fieldset>

<input type="hidden" name="commentId" value="<?php echo $this->formData["id"]?>" />

</form>

<script type="text/javascript">
<!--
// create calendar object(s) just after form tag closed
var postedCal = new calendar1(document.getElementById('posted'),baseurl);
//-->
</script> 
