WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/08/2014 05:51:58 PM (7 years ago)
Author:
johnbillion
Message:

Implement email and url input types where appropriate. Props Kau-Boy. Fixes #22183.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-new.php

    r29009 r29030  
    275275        echo '<p>' . __( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
    276276        $label = __('E-mail');
     277        $type  = 'email';
    277278    } else {
    278279        echo '<p>' . __( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
    279280        $label = __('E-mail or Username');
     281        $type  = 'text';
    280282    }
    281283?>
     
    287289 */
    288290?>
    289 <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action( 'user_new_form_tag' );?>>
     291<form action="" method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php do_action( 'user_new_form_tag' );?>>
    290292<input name="action" type="hidden" value="adduser" />
    291293<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
     
    294296    <tr class="form-field form-required">
    295297        <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th>
    296         <td><input name="email" type="text" id="adduser-email" class="wp-suggest-user" value="" /></td>
     298        <td><input name="email" type="<?php echo $type; ?>" id="adduser-email" class="wp-suggest-user" value="" /></td>
    297299    </tr>
    298300    <tr class="form-field">
     
    335337<p><?php _e('Create a brand new user and add them to this site.'); ?></p>
    336338<?php /** This action is documented in wp-admin/user-new.php */ ?>
    337 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action( 'user_new_form_tag' );?>>
     339<form action="" method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php do_action( 'user_new_form_tag' );?>>
    338340<input name="action" type="hidden" value="createuser" />
    339341<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?>
     
    359361    <tr class="form-field form-required">
    360362        <th scope="row"><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
    361         <td><input name="email" type="text" id="email" value="<?php echo esc_attr($new_user_email); ?>" /></td>
     363        <td><input name="email" type="email" id="email" value="<?php echo esc_attr( $new_user_email ); ?>" /></td>
    362364    </tr>
    363365<?php if ( !is_multisite() ) { ?>
     
    372374    <tr class="form-field">
    373375        <th scope="row"><label for="url"><?php _e('Website') ?></label></th>
    374         <td><input name="url" type="text" id="url" class="code" value="<?php echo esc_attr($new_user_uri); ?>" /></td>
     376        <td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td>
    375377    </tr>
    376378<?php
Note: See TracChangeset for help on using the changeset viewer.