Make WordPress Core


Ignore:
Timestamp:
03/10/2012 01:23:48 AM (13 years ago)
Author:
azaozz
Message:

Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863

File:
1 edited

Legend:

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

    r20164 r20168  
    324324        <div class="inside">
    325325        <label for="author-email"><?php _e('E-mail') ?></label>
    326         <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
     326        <input type="email" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
    327327        </div>
    328328
     
    599599    $month .= '</select>';
    600600
    601     $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    602     $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
    603     $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    604     $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     601    $day = '<input type="number" step="1" min="1" max="31" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     602    $year = '<input type="number" step="1" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
     603    $hour = '<input type="number" step="1" min="0" max="23" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     604    $minute = '<input type="number" step="1" min="0" max="59" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    605605
    606606    echo '<div class="timestamp-wrap">';
Note: See TracChangeset for help on using the changeset viewer.