WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r4267 r3283  
    66?>
    77
    8 <form name="post" action="comment.php" method="post" id="post">
    9 <?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
     8<form name="post" action="post.php" method="post" id="post">
    109<div class="wrap">
    1110<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
     
    1918</script>
    2019<fieldset id="namediv">
    21     <legend><label for="name"><?php _e('Name:') ?></label></legend>
     20    <legend><?php _e('Name:') ?></legend>
    2221    <div>
    23       <input type="text" name="newcomment_author" size="25" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
     22      <input type="text" name="newcomment_author" size="22" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
    2423    </div>
    2524</fieldset>
    2625<fieldset id="emaildiv">
    27         <legend><label for="email"><?php _e('E-mail:') ?></label></legend>
     26        <legend><?php _e('E-mail:') ?></legend>
    2827        <div>
    29           <input type="text" name="newcomment_author_email" size="20" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
     28          <input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
    3029    </div>
    3130</fieldset>
    3231<fieldset id="uridiv">
    33         <legend><label for="URL"><?php _e('URL:') ?></label></legend>
     32        <legend><?php _e('URI:') ?></legend>
    3433        <div>
    3534          <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" />
     
    3938<fieldset style="clear: both;">
    4039        <legend><?php _e('Comment') ?></legend>
    41     <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?>
     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>
    4249</fieldset>
    4350
     51<script type="text/javascript">
     52<!--
     53edCanvas = document.getElementById('content');
     54<?php if ( user_can_richedit() ) : ?>
     55// This code is meant to allow tabbing from Author URL to Post (TinyMCE).
     56if ( 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        }
     71else
     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
    4490<p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
    45   <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
     91  <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
    4692</p>
    4793
     
    61107<?php if ( current_user_can('edit_posts') ) : ?>
    62108    <tr>
    63         <th scope="row" valign="top"><?php _e('Edit time'); ?>:</th>
    64         <td><?php touch_time(('editcomment' == $action), 0); ?> </td>
     109        <th scope="row"><?php _e('Edit time'); ?>:</th>
     110        <td><?php touch_time(('editcomment' == $action), 0); ?></td>
    65111    </tr>
    66112<?php endif; ?>
    67113
    68114    <tr>
    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>
     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>
    75117    </tr>
    76118</table>
Note: See TracChangeset for help on using the changeset viewer.