Ticket #4726: 4726.diff
File 4726.diff, 5.5 KB (added by , 17 years ago) |
---|
-
wp-admin/edit-form-comment.php
33 33 <fieldset id="uridiv"> 34 34 <legend><label for="newcomment_author_url"><?php _e('URL:') ?></label></legend> 35 35 <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" /> 37 37 </div> 38 38 </fieldset> 39 39 … … 54 54 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 55 55 <tr> 56 56 <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> 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> 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> 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> 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> 60 60 </tr> 61 61 62 62 <?php if ( current_user_can('edit_posts') ) : ?> 63 63 <tr> 64 64 <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> 66 66 </tr> 67 67 <?php endif; ?> 68 68 -
wp-admin/includes/template.php
416 416 417 417 } 418 418 419 function touch_time( $edit = 1, $for_post = 1 ) {419 function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { 420 420 global $wp_locale, $post, $comment; 421 421 422 422 if ( $for_post ) 423 423 $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\""; 424 428 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>'; 426 430 427 431 $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); 428 432 $post_date = ($for_post) ? $post->post_date : $comment->comment_date; … … 433 437 $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj ); 434 438 $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); 435 439 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"; 437 441 for ( $i = 1; $i < 13; $i = $i +1 ) { 438 442 echo "\t\t\t<option value=\"$i\""; 439 443 if ( $i == $mm ) … … 442 446 } 443 447 ?> 444 448 </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 ?> /> 449 453 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 450 454 <?php 451 455 if ( $edit ) {