Make WordPress Core

Changeset 16569


Ignore:
Timestamp:
11/24/2010 04:43:24 PM (14 years ago)
Author:
markjaquith
Message:

Fix duplicate HTML IDs for wp-admin/user-new.php on MS installs. props duck_. fixes #15562

File:
1 edited

Legend:

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

    r16527 r16569  
    3333
    3434if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
    35     check_admin_referer('add-user');
     35    check_admin_referer( 'add-user', '_wpnonce_add-user' );
    3636
    3737    $user_details = null;
     
    7777    die();
    7878} elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) {
    79     check_admin_referer('create-user');
     79    check_admin_referer( 'create-user', '_wpnonce_create-user' );
    8080
    8181    if ( ! current_user_can('create_users') )
     
    224224?>
    225225<form action="" method="post" name="adduser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
    226 <input name="action" type="hidden" id="action" value="adduser" />
    227 <?php wp_nonce_field('add-user') ?>
     226<input name="action" type="hidden" value="adduser" />
     227<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
    228228
    229229<table class="form-table">
    230230    <tr class="form-field form-required">
    231         <th scope="row"><label for="email"><?php echo $label; ?></label></th>
    232         <td><input name="email" type="text" id="email" value="" /></td>
    233     </tr>
    234     <tr class="form-field">
    235         <th scope="row"><label for="role"><?php _e('Role'); ?></label></th>
    236         <td><select name="role" id="role">
     231        <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th>
     232        <td><input name="email" type="text" id="adduser-email" value="" /></td>
     233    </tr>
     234    <tr class="form-field">
     235        <th scope="row"><label for="adduser-role"><?php _e('Role'); ?></label></th>
     236        <td><select name="role" id="adduser-role">
    237237            <?php wp_dropdown_roles( get_option('default_role') ); ?>
    238238            </select>
     
    241241<?php if ( is_super_admin() ) { ?>
    242242    <tr>
    243         <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
    244         <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
     243        <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
     244        <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
    245245    </tr>
    246246<?php } ?>
     
    256256?>
    257257<p><?php _e('Create a brand new user and add it to this site.'); ?></p>
    258 <form action="" method="post" name="createuser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
    259 <input name="action" type="hidden" id="action" value="createuser" />
    260 <?php wp_nonce_field('create-user') ?>
     258<form action="" method="post" name="createuser" id="createuser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
     259<input name="action" type="hidden" value="createuser" />
     260<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?>
    261261<?php
    262262// Load up the passed data, else set to a default.
Note: See TracChangeset for help on using the changeset viewer.