Ticket #22183: 22183b.diff

File 22183b.diff, 6.6 KB (added by lessbloat, 7 months ago)

novalidate option using email instead of text (needs testing)

  • wp-login.php

     
    544544        login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); 
    545545?> 
    546546 
    547 <form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post"> 
     547<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post" novalidate> 
    548548        <p> 
    549549                <label for="user_login"><?php _e('Username') ?><br /> 
    550550                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" /></label> 
  • wp-admin/includes/template.php

     
    321321        } 
    322322 
    323323?> 
    324 <form method="get" action=""> 
     324<form method="get" action="" novalidate> 
    325325<?php if ( $table_row ) : ?> 
    326326<table style="display:none;"><tbody id="com-reply"><tr id="replyrow" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange"> 
    327327<?php else : ?> 
     
    337337 
    338338                <div class="inside"> 
    339339                <label for="author-email"><?php _e('E-mail') ?></label> 
    340                 <input type="text" name="newcomment_author_email" size="50" value="" id="author-email" /> 
     340                <input type="email" name="newcomment_author_email" size="50" value="" id="author-email" /> 
    341341                </div> 
    342342 
    343343                <div class="inside"> 
  • wp-admin/options-general.php

     
    8787<?php screen_icon(); ?> 
    8888<h2><?php echo esc_html( $title ); ?></h2> 
    8989 
    90 <form method="post" action="options.php"> 
     90<form method="post" action="options.php" novalidate> 
    9191<?php settings_fields('general'); ?> 
    9292 
    9393<table class="form-table"> 
     
    112112</tr> 
    113113<tr valign="top"> 
    114114<th scope="row"><label for="admin_email"><?php _e('E-mail Address') ?> </label></th> 
    115 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" /> 
     115<td><input name="admin_email" type="email" id="admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" /> 
    116116<p class="description"><?php _e('This address is used for admin purposes, like new user notification.') ?></p></td> 
    117117</tr> 
    118118<tr valign="top"> 
     
    131131<?php } else { ?> 
    132132<tr valign="top"> 
    133133<th scope="row"><label for="new_admin_email"><?php _e('E-mail Address') ?> </label></th> 
    134 <td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" /> 
     134<td><input name="new_admin_email" type="email" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" /> 
    135135<p class="description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p> 
    136136<?php 
    137137$new_admin_email = get_option( 'new_admin_email' ); 
  • wp-admin/edit-form-comment.php

     
    1010if ( !defined('ABSPATH') ) 
    1111        die('-1'); 
    1212?> 
    13 <form name="post" action="comment.php" method="post" id="post"> 
     13<form name="post" action="comment.php" method="post" id="post" novalidate> 
    1414<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?> 
    1515<div class="wrap"> 
    1616<?php screen_icon(); ?> 
     
    4242                        _e( 'E-mail:' ); 
    4343                } 
    4444?></td> 
    45         <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" /></td> 
     45        <td><input type="email" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" /></td> 
    4646</tr> 
    4747<tr valign="top"> 
    4848        <td class="first"> 
  • wp-admin/network/site-users.php

     
    276276 
    277277<?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?> 
    278278<h3 id="add-new-user"><?php _e( 'Add New User' ); ?></h3> 
    279 <form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post"> 
     279<form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post" novalidate> 
    280280        <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> 
    281281        <table class="form-table"> 
    282282                <tr> 
     
    285285                </tr> 
    286286                <tr> 
    287287                        <th scope="row"><?php _e( 'Email' ) ?></th> 
    288                         <td><input type="text" class="regular-text" name="user[email]" /></td> 
     288                        <td><input type="email" class="regular-text" name="user[email]" /></td> 
    289289                </tr> 
    290290                <tr> 
    291291                        <th scope="row"><?php _e( 'Role' ); ?></th> 
  • wp-admin/user-edit.php

     
    189189} ?> 
    190190</h2> 
    191191 
    192 <form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>> 
     192<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?> novalidate> 
    193193<?php wp_nonce_field('update-user_' . $user_id) ?> 
    194194<?php if ( $wp_http_referer ) : ?> 
    195195        <input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" /> 
     
    334334<table class="form-table"> 
    335335<tr> 
    336336        <th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th> 
    337         <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" /> 
     337        <td><input type="email" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" /> 
    338338        <?php 
    339339        $new_email = get_option( $current_user->ID . '_new_email' ); 
    340340        if ( $new_email && $new_email != $current_user->user_email ) : ?>