2 $submitbutton_text = __('Edit Comment »');
3 $toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID);
4 $form_action = 'editedcomment';
5 $form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment->comment_ID . "' />\n<input type='hidden' name='comment_post_ID' value='".$comment->comment_post_ID;
8 <form name="post" action="post.php" method="post" id="post">
10 <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
11 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
13 <script type="text/javascript">
14 function focusit() { // focus on first input field
15 document.post.name.focus();
17 addLoadEvent(focusit);
19 <fieldset id="namediv">
20 <legend><?php _e('Name:') ?></legend>
22 <input type="text" name="newcomment_author" size="22" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
25 <fieldset id="emaildiv">
26 <legend><?php _e('E-mail:') ?></legend>
28 <input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
31 <fieldset id="uridiv">
32 <legend><?php _e('URI:') ?></legend>
34 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" />
38 <fieldset style="clear: both;">
39 <legend><?php _e('Comment') ?></legend>
40 <?php the_quicktags(); ?>
43 $rows = get_settings('default_post_edit_rows');
44 if (($rows < 3) || ($rows > 100)) {
48 <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo user_can_richedit() ? wp_richedit_pre($comment->comment_content) : $comment->comment_content; ?></textarea></div>
51 <script type="text/javascript">
53 edCanvas = document.getElementById('content');
54 <?php if ( user_can_richedit() ) : ?>
55 // This code is meant to allow tabbing from Author URL to Post (TinyMCE).
57 document.getElementById('newcomment_author_url').onkeydown = function (e)
59 e = e ? e : window.event;
60 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
61 var i = tinyMCE.selectedInstance;
62 if(typeof i == 'undefined')
64 tinyMCE.execCommand("mceStartTyping");
66 i.contentWindow.focus();
67 e.returnValue = false;
72 document.getElementById('newcomment_author_url').onkeypress = function (e)
74 e = e ? e : window.event;
75 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
76 var i = tinyMCE.selectedInstance;
77 if(typeof i == 'undefined')
79 tinyMCE.execCommand("mceStartTyping");
81 i.contentWindow.focus();
82 e.returnValue = false;
90 <p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
91 <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
97 <h2><?php _e('Advanced'); ?></h2>
99 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
101 <th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
102 <td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label><br />
103 <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br />
104 <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
107 <?php if ( current_user_can('edit_posts') ) : ?>
109 <th scope="row"><?php _e('Edit time'); ?>:</th>
110 <td><?php touch_time(('editcomment' == $action), 0); ?></td>
115 <th scope="row"><?php _e('Delete'); ?>:</th>
116 <td><p><a class="delete" href="post.php?action=confirmdeletecomment&noredir=true&comment=<?php echo $comment->comment_ID; ?>&p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>