WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/04/2008 10:37:06 AM (12 years ago)
Author:
westi
Message:

Associate lables with form fields. Fixes #6859 props MarcoZ.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r7800 r7883  
    775775
    776776    $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
    777     $r .= "\n\t\t<td valign='top'><input name='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>";
    778     $r .= "\n\t\t<td><textarea name='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>";
     777    $r .= "\n\t\t<td valign='top'><label class='hidden' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>";
     778    $r .= "\n\t\t<td><label class='hidden' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>";
    779779    $r .= "\n\t\t<td style='text-align: center;'><input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$update_nonce updatemeta' /><br />";
    780780    $r .= "\n\t\t<input name='deletemeta[{$entry['meta_id']}]' type='submit' ";
     
    801801<table id="newmeta" cellspacing="3" cellpadding="3">
    802802    <tr>
    803 <th colspan="2"><?php _e( 'Key' ) ?></th>
    804 <th><?php _e( 'Value' ) ?></th>
     803<th colspan="2"><label <?php if ( $keys ) : ?> for="metakeyselect" <?php else : ?> for="metakeyinput" <?php endif; ?>><?php _e( 'Key' ) ?></label></th>
     804<th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
    805805</tr>
    806806    <tr valign="top">
     
    816816    }
    817817?>
    818 </select> <?php _e( 'or' ); ?>
     818</select> <label for="metakeyinput"><?php _e( 'or' ); ?></label>
    819819<?php endif; ?>
    820820</td>
Note: See TracChangeset for help on using the changeset viewer.