Make WordPress Core

Ticket #4726: 4726.diff

File 4726.diff, 5.5 KB (added by Nazgul, 17 years ago)
  • wp-admin/edit-form-comment.php

     
    3333<fieldset id="uridiv">
    3434        <legend><label for="newcomment_author_url"><?php _e('URL:') ?></label></legend>
    3535                <div>
    36                   <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo attribute_escape( $comment->comment_author_url ); ?>" tabindex="3" />
     36                  <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo attribute_escape( $comment->comment_author_url ); ?>" tabindex="2" />
    3737    </div>
    3838</fieldset>
    3939
     
    5454<table width="100%" cellspacing="2" cellpadding="5" class="editform">
    5555        <tr>
    5656                <th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
    57                 <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> &nbsp;
    58                 <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> &nbsp;
    59                 <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>
     57                <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'); ?> tabindex="4" /> <?php _e('Approved') ?></label> &nbsp;
     58                <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'); ?> tabindex="4" /> <?php _e('Moderated') ?></label> &nbsp;
     59                <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'); ?> tabindex="4" /> <?php _e('Spam') ?></label></td>
    6060        </tr>
    6161
    6262<?php if ( current_user_can('edit_posts') ) : ?>
    6363        <tr>
    6464                <th scope="row" valign="top"><?php _e('Edit time'); ?>:</th>
    65                 <td><?php touch_time(('editcomment' == $action), 0); ?> </td>
     65                <td><?php touch_time(('editcomment' == $action), 0, 5); ?> </td>
    6666        </tr>
    6767<?php endif; ?>
    6868
  • wp-admin/includes/template.php

     
    416416
    417417}
    418418
    419 function touch_time( $edit = 1, $for_post = 1 ) {
     419function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) {
    420420        global $wp_locale, $post, $comment;
    421421
    422422        if ( $for_post )
    423423                $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true;
     424       
     425        $tab_index_attribute = '';
     426        if ( (int) $tab_index > 0 )
     427                $tab_index_attribute = " tabindex=\"$tab_index\"";
    424428
    425         echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>';
     429        echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>';
    426430
    427431        $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 );
    428432        $post_date = ($for_post) ? $post->post_date : $comment->comment_date;
     
    433437        $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj );
    434438        $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj );
    435439
    436         echo "<select name=\"mm\" onchange=\"edit_date.checked=true\">\n";
     440        echo "<select name=\"mm\" onchange=\"edit_date.checked=true\"$tab_index_attribute>\n";
    437441        for ( $i = 1; $i < 13; $i = $i +1 ) {
    438442                echo "\t\t\t<option value=\"$i\"";
    439443                if ( $i == $mm )
     
    442446        }
    443447?>
    444448</select>
    445 <input type="text" id="jj" name="jj" value="<?php echo $jj; ?>" size="2" maxlength="2" onchange="edit_date.checked=true"/>
    446 <input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true" /> @
    447 <input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> :
    448 <input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
     449<input type="text" id="jj" name="jj" value="<?php echo $jj; ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> />
     450<input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> /> @
     451<input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> /> :
     452<input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> />
    449453<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
    450454<?php
    451455        if ( $edit ) {