<?php
/** View Template: edit blog trackback 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 trackBack</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="trackBackForm" method="post" action="<?php echo $this->url(
    array("controller" => "trackback",
        "action" => "update-db",
        "itemId" => $this->formData["id"]),
    "blogAdminItemAction")?>">
 
<fieldset style="margin:0;padding:0;border:none">

<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>Title</div>
<input style="width:200px" id="title" name="title" value="<?php echo isset($this->formData["title"]) ? $this->formData["title"] : ""?>" />

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

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

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

<div>Is trackback spam? 
  <input type="checkbox" id="isSpam" name="isSpam" <?php echo
  (isset($this->formData["isSpam"]) && $this->formData["isSpam"]) ? "checked=\"checked\"": ""?> />
</div>

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

<!-- 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="trackbackId" 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> 
