dfef0a78e9adfc9b18931f499944f5b1710f5059
[autoinstalls/wordpress.git] / wp-admin / edit-form-comment.php
1 <?php
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;
6 ?>
7
8 <form name="post" action="comment.php" method="post" id="post">
9 <?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
10 <div class="wrap">
11 <h2><?php echo $toprow_title; ?></h2>
12 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
13 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
14
15 <div id="poststuff">
16
17 <div class="submitbox" id="submitcomment">
18
19 <div id="previewview">
20 <a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
21 </div>
22
23 <div class="inside">
24
25 <p><strong><?php _e('Approval Status') ?></strong></p>
26 <p>
27 <select name='comment_status'>
28 <option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
29 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option>
30 <option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
31 </select>
32 </p>
33
34 <?php
35 $stamp = __('%1$s at %2$s');
36 $date = mysql2date(get_option('date_format'), $comment->comment_date);
37 $time = mysql2date(get_option('time_format'), $comment->comment_date);
38 ?>
39 <p class="curtime"><?php printf($stamp, $date, $time); ?>
40 &nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p>
41
42 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
43
44 </div>
45
46 <p class="submit">
47 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
48 <?php
49 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
50 ?>
51 </p>
52
53 <div class="side-info">
54 <h5><?php _e('Related') ?></h5>
55
56 <ul>
57 <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
58 <li><a href="edit-comments.php?comment_status=moderated"><?php _e('Moderate Comments') ?></a></li>
59 <?php do_action('comment_relatedlinks_list'); ?>
60 </ul>
61 </div>
62 <?php do_action('submitcomment_box'); ?>
63 </div>
64
65 <div id="post-body">
66 <div id="namediv" class="stuffbox">
67 <h3><?php _e('Name') ?></h3>
68 <div class="inside">
69 <input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
70 </div>
71 </div>
72
73 <div id="emaildiv" class="stuffbox">
74 <h3><?php _e('E-mail') ?></h3>
75 <div class="inside">
76 <input type="text" name="newcomment_author_email" size="30" value="<?php echo attribute_escape( $comment->comment_author_email ); ?>" tabindex="2" id="email" />
77 </div>
78 </div>
79
80 <div id="uridiv" class="stuffbox">
81 <h3><?php _e('URL') ?></h3>
82 <div class="inside">
83 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo attribute_escape( $comment->comment_author_url ); ?>" tabindex="3" />
84 </div>
85 </div>
86
87 <div id="postdiv" class="postarea">
88 <h3><?php _e('Comment') ?></h3>
89 <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
90 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
91 </div>
92
93 <?php do_meta_boxes('comment', 'normal', $comment); ?>
94
95 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
96 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
97 <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
98 <?php wp_original_referer_field(true, 'previous'); ?>
99 <input type="hidden" name="noredir" value="1" />
100 </div>
101 </div>
102 </div>
103
104 </form>
105
106 <script type="text/javascript">
107 try{document.post.name.focus();}catch(e){}
108 </script>