WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-comment.php

    r3283 r4267  
    66?>
    77
    8 <form name="post" action="post.php" method="post" id="post">
     8<form name="post" action="comment.php" method="post" id="post">
     9<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
    910<div class="wrap">
    1011<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
     
    1819</script>
    1920<fieldset id="namediv">
    20     <legend><?php _e('Name:') ?></legend>
     21    <legend><label for="name"><?php _e('Name:') ?></label></legend>
    2122    <div>
    22       <input type="text" name="newcomment_author" size="22" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
     23      <input type="text" name="newcomment_author" size="25" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
    2324    </div>
    2425</fieldset>
    2526<fieldset id="emaildiv">
    26         <legend><?php _e('E-mail:') ?></legend>
     27        <legend><label for="email"><?php _e('E-mail:') ?></label></legend>
    2728        <div>
    28           <input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
     29          <input type="text" name="newcomment_author_email" size="20" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
    2930    </div>
    3031</fieldset>
    3132<fieldset id="uridiv">
    32         <legend><?php _e('URI:') ?></legend>
     33        <legend><label for="URL"><?php _e('URL:') ?></label></legend>
    3334        <div>
    3435          <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" />
     
    3839<fieldset style="clear: both;">
    3940        <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>
     41    <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?>
    4942</fieldset>
    5043
    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 
    9044<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']; ?>" />
     45  <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
    9246</p>
    9347
     
    10761<?php if ( current_user_can('edit_posts') ) : ?>
    10862    <tr>
    109         <th scope="row"><?php _e('Edit time'); ?>:</th>
    110         <td><?php touch_time(('editcomment' == $action), 0); ?></td>
     63        <th scope="row" valign="top"><?php _e('Edit time'); ?>:</th>
     64        <td><?php touch_time(('editcomment' == $action), 0); ?> </td>
    11165    </tr>
    11266<?php endif; ?>
    11367
    11468    <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>
     69        <th scope="row" valign="top"><?php _e('Delete'); $delete_nonce = wp_create_nonce( 'delete-comment_' . $comment->comment_ID ); ?>:</th>
     70        <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . __("You are about to delete this comment \\n  \'Cancel\' to stop, \'OK\' to delete.") . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> />
     71        <input type="hidden" name="comment" value="<?php echo $comment->comment_ID ?>" />
     72        <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
     73        <input type="hidden" name="noredir" value="1" />
     74    </td>
    11775    </tr>
    11876</table>
Note: See TracChangeset for help on using the changeset viewer.