]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/edit-form-comment.php
Wordpress 2.0.2-scripts
[autoinstalls/wordpress.git] / wp-admin / edit-form-comment.php
1 <?php
2 $submitbutton_text = __('Edit Comment &raquo;');
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="post.php" method="post" id="post">
9 <div class="wrap">
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 ?>' />
12
13 <script type="text/javascript">
14 function focusit() { // focus on first input field
15         document.post.name.focus();
16 }
17 addLoadEvent(focusit);
18 </script>
19 <fieldset id="namediv">
20     <legend><?php _e('Name:') ?></legend>
21         <div>
22           <input type="text" name="newcomment_author" size="22" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
23     </div>
24 </fieldset>
25 <fieldset id="emaildiv">
26         <legend><?php _e('E-mail:') ?></legend>
27                 <div>
28                   <input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
29     </div>
30 </fieldset>
31 <fieldset id="uridiv">
32         <legend><?php _e('URI:') ?></legend>
33                 <div>
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" />
35     </div>
36 </fieldset>
37
38 <fieldset style="clear: both;">
39         <legend><?php _e('Comment') ?></legend>
40 <?php the_quicktags(); ?>
41
42 <?php
43  $rows = get_settings('default_post_edit_rows');
44  if (($rows < 3) || ($rows > 100)) {
45      $rows = 10;
46  }
47 ?>
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>
49 </fieldset>
50
51 <script type="text/javascript">
52 <!--
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).
56 if ( tinyMCE.isMSIE )
57         document.getElementById('newcomment_author_url').onkeydown = function (e)
58                 {
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')
63                                         return true;
64                                 tinyMCE.execCommand("mceStartTyping");
65                                 this.blur();
66                                 i.contentWindow.focus();
67                                 e.returnValue = false;
68                                 return false;
69                         }
70                 }
71 else
72         document.getElementById('newcomment_author_url').onkeypress = function (e)
73                 {
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')
78                                         return true;
79                                 tinyMCE.execCommand("mceStartTyping");
80                                 this.blur();
81                                 i.contentWindow.focus();
82                                 e.returnValue = false;
83                                 return false;
84                         }
85                 }
86 <?php endif; ?>
87 //-->
88 </script>
89
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']; ?>" />
92 </p>
93
94 </div>
95
96 <div class="wrap">
97 <h2><?php _e('Advanced'); ?></h2>
98
99 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
100         <tr>
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>
105         </tr>
106
107 <?php if ( current_user_can('edit_posts') ) : ?>
108         <tr>
109                 <th scope="row"><?php _e('Edit time'); ?>:</th>
110                 <td><?php touch_time(('editcomment' == $action), 0); ?></td>
111         </tr>
112 <?php endif; ?>
113
114         <tr>
115                 <th scope="row"><?php _e('Delete'); ?>:</th>
116                 <td><p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
117         </tr>
118 </table>
119
120 </div>
121
122 </form>