{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=editComments title=$locale->tr("pluginEditCommentsEdit")}
<link rel="stylesheet" type="text/css" media="all"
      href="js/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
 <script type="text/javascript"
 src="js/jscalendar/calendar_stripped.js"></script>
 <script type="text/javascript"
 src="js/jscalendar/lang/calendar-en.js"></script>
 <script type="text/javascript"
 src="js/jscalendar/calendar-setup_stripped.js"></script>

<form id="editComment" action="admin.php" method="post">
 <div id="list">
  {include file="$admintemplatepath/successmessage.template"}
  {include file="$admintemplatepath/errormessage.template"}
  <table class="info">
    <tr>
     <th>{$locale->tr("topic")}</th>
     <td><input size="50" type="text" name="commentTopic" id=commentTopic"
             value="{$editcomment->getTopic()}" /></td>
    </tr>
    <tr>
     <th style="vertical-align: top">{$locale->tr("text")}</th>
     <td><textarea name="commentText" id="commentText"
          rows="10" cols="50">{$editcomment->getText()}</textarea>
     </td>
    </tr>
    <tr>
     <th>{$locale->tr("author")}</th>
     <td><input type="text" name="authorName" id=authorName"
             value="{$editcomment->getUsername()}" /></td>
    </tr>
    <tr>
     <th>{$locale->tr("email")}</th>
     <td><input size="30" type="text" name="authorEmail" id=authorEmail"
             value="{$editcomment->getUserEmail()}" /></td>
    </tr>
    <tr>
     <th>{$locale->tr("url")}</th>
     <td><input size=60 type="text" name="authorUrl" id="authorUrl"
             value="{$editcomment->getUserUrl()}" /></td>
    </tr>
    <tr>
	 <th>{$locale->tr("date")}</th>
      <td>
	     <input name="commentDateTime" id="commentDateTime" class="dateTime"
                readonly="true" type="text" size="16" value="{$commentDateTime}"
                style="margin-bottom: 4px;" /> 
	     <img src="imgs/admin/cal.jpg" id="commentDateTimeSelector"
              alt="{$locale->tr("date")}" style="cursor: pointer; border: 0px;
                             width: 16px; height: 14px; padding: 0;" /> 
	   <script type="text/javascript">
	   var MondayFirstDay = ( {$locale->firstDayOfWeek()} == 1);
       {literal}
	       Calendar.setup({
	           inputField  : "commentDateTime",
	           ifFormat    : "%d/%m/%Y %H:%M",
	           button      : "commentDateTimeSelector",
	           showsTime   : true,
	           timeFormat  : "24",
	           electric    : false,
	           align       : "Bl",
	           firstDay    : MondayFirstDay,
	           singleClick : true
	       });
	   {/literal}
	   </script>
     </td>
    </tr>
    <tr>
     <th>{$locale->tr("status")}</th>
     <td>
       <select name="commentStatus" id="commentStatus">
         {foreach from=$commentstatus key=name item=status}
           <option value="{$status}"
             {if $editcomment->getStatus() == $status} selected{/if}>
           {$locale->tr($name)}</option>
         {/foreach}
       </select>
      </td>
    </tr>
    <tr>
     <th>IP</th>
     <td><input type="text" name="commentIp" id=commentIp"
             value="{$editcomment->getClientIp()}" /></td>
    </tr>
  </table>
 </div>

 <div id="list_action_bar">
  <input type="hidden" name="op" value="updateComment" />
  <input type="hidden" name="commentId" value="{$editcomment->getId()}" />
  <input type="hidden" name="articleId" value="{$editcomment->getArticleId()}" />
  <input type="submit" name="update" value="{$locale->tr("update")}" />
  <input type="submit" name="cancel" value="{$locale->tr("pluginEditCommentsCancel")}" />
 </div>
</form>

{include file="$admintemplatepath/footer.template"}
