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">
9 <?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
11 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
12 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
14 <script type="text/javascript">
15 function focusit() { // focus on first input field
16 document.post.name.focus();
18 addLoadEvent(focusit);
20 <fieldset id="namediv">
21 <legend><?php _e('Name:') ?></legend>
23 <input type="text" name="newcomment_author" size="22" value="<?php echo attribute_escape($comment->comment_author); ?>" tabindex="1" id="name" />
26 <fieldset id="emaildiv">
27 <legend><?php _e('E-mail:') ?></legend>
29 <input type="text" name="newcomment_author_email" size="30" value="<?php echo attribute_escape($comment->comment_author_email); ?>" tabindex="2" id="email" />
32 <fieldset id="uridiv">
33 <legend><?php _e('URI:') ?></legend>
35 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo attribute_escape($comment->comment_author_url); ?>" tabindex="3" id="URL" />
39 <fieldset style="clear: both;">
40 <legend><?php _e('Comment') ?></legend>
41 <?php the_quicktags(); ?>
44 $rows = get_settings('default_post_edit_rows');
45 if (($rows < 3) || ($rows > 100)) {
49 <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>
52 <script type="text/javascript">
54 edCanvas = document.getElementById('content');
55 <?php if ( user_can_richedit() ) : ?>
56 // This code is meant to allow tabbing from Author URL to Post (TinyMCE).
58 document.getElementById('newcomment_author_url').onkeydown = function (e)
60 e = e ? e : window.event;
61 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
62 var i = tinyMCE.selectedInstance;
63 if(typeof i == 'undefined')
65 tinyMCE.execCommand("mceStartTyping");
67 i.contentWindow.focus();
68 e.returnValue = false;
73 document.getElementById('newcomment_author_url').onkeypress = function (e)
75 e = e ? e : window.event;
76 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
77 var i = tinyMCE.selectedInstance;
78 if(typeof i == 'undefined')
80 tinyMCE.execCommand("mceStartTyping");
82 i.contentWindow.focus();
83 e.returnValue = false;
91 <p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
92 <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
98 <h2><?php _e('Advanced'); ?></h2>
100 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
102 <th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
103 <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 />
104 <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 />
105 <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>
108 <?php if ( current_user_can('edit_posts') ) : ?>
110 <th scope="row"><?php _e('Edit time'); ?>:</th>
111 <td><?php touch_time(('editcomment' == $action), 0); ?></td>
116 <th scope="row"><?php _e('Delete'); ?>:</th>
117 <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>