Make WordPress Core

Ticket #25461: 25461-date-input-labels.8.patch

File 25461-date-input-labels.8.patch, 3.5 KB (added by seanchayes, 12 years ago)
  • css/wp-admin.css

     
    10861086.wp-admin select {
    10871087        padding: 2px;
    10881088        line-height: 28px;
    1089         height: 28px;
     1089        height: 25px;
    10901090        color: #555;
    1091         vertical-align: top;
     1091    font-size: 12px;
     1092        vertical-align: baseline;
    10921093}
    10931094
    10941095.wp-admin .button-cancel {
     
    38933894.inline-edit-row fieldset input[name=hh],
    38943895.inline-edit-row fieldset input[name=mn] {
    38953896        font-size: 12px;
    3896         width: 2.1em;
     3897        width: 2.3em;
    38973898}
    38983899
    38993900.inline-edit-row fieldset input[name=aa] {
     
    43884389        border-style: solid;
    43894390}
    43904391
     4392.timestamp-wrap > span,
     4393.timestamp-wrap > span label {
     4394        display: inline-block;
     4395}
     4396
    43914397.notification-dialog {
    43924398        position: fixed;
    43934399        top: 30%;
  • includes/template.php

     
    652652        $cur_hh = gmdate( 'H', $time_adj );
    653653        $cur_mn = gmdate( 'i', $time_adj );
    654654
    655         $month = "<select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"mm\"$tab_index_attribute>\n";
     655        $month = '<span><label for="mm">' . __( 'Month' ) . "</label><br /><select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"mm\"$tab_index_attribute>\n";
    656656        for ( $i = 1; $i < 13; $i = $i +1 ) {
    657657                $monthnum = zeroise($i, 2);
    658658                $month .= "\t\t\t" . '<option value="' . $monthnum . '"';
     
    661661                /* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
    662662                $month .= '>' . sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
    663663        }
    664         $month .= '</select>';
     664        $month .= '</select></span>';
    665665
    666         $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    667         $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
    668         $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    669         $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     666        $day = '<span><label for="jj">' . __( 'Day' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     667        $year = '<span><label for="aa">' . __( 'Year' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     668        $hour = '<span><label for="hh"><abbr title="' . __( 'Hour' ) . '">' . __( 'HH' ) . '</abbr></label><br /><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     669        $minute = '<span><label for="mn"><abbr title="' . __( 'Minute' ) . '">' . __( 'MM' ) . '</abbr></label><br /><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
    670670
    671671        echo '<div class="timestamp-wrap">';
    672672        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */