Make WordPress Core

Changeset 22371


Ignore:
Timestamp:
11/05/2012 05:47:55 PM (13 years ago)
Author:
nacin
Message:

Fix ajax adding of custom fields and link categories. props SergeyBiryukov. for the 3.4 branch. see #21829.

Location:
branches/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-admin/includes/meta-boxes.php

    r21717 r22371  
    689689            <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label>
    690690            <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" />
    691             <input type="button" id="link-category-add-submit" class="add:categorychecklist:linkcategorydiv button" value="<?php esc_attr_e( 'Add' ); ?>" />
     691            <input type="button" id="link-category-add-submit" class="add:categorychecklist:link-category-add button" value="<?php esc_attr_e( 'Add' ); ?>" />
    692692            <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?>
    693693            <span id="category-ajax-response"></span>
  • branches/3.4/wp-admin/includes/template.php

    r21075 r22371  
    495495    $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false, array( 'tabindex' => '6' ) );
    496496    $r .= "\n\t\t";
    497     $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false, array( 'tabindex' => '6' ) );
     497    $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , "meta-{$entry['meta_id']}-submit", false, array( 'tabindex' => '6' ) );
    498498    $r .= "</div>";
    499499    $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
     
    556556
    557557<tr><td colspan="2" class="submit">
    558 <?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub', 'tabindex' => '9' ) ); ?>
     558<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'newmeta-submit', 'tabindex' => '9' ) ); ?>
    559559<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
    560560</td></tr>
  • branches/3.4/wp-includes/js/wp-lists.dev.js

    r21738 r22371  
    7979            return false;
    8080
    81         if ( !e.is('[id="' + s.what + '-add-submit"]') )
     81        if ( !e.is('[id="' + s.element + '-submit"]') )
    8282            return !wpList.add.call( list, e, s );
    8383
Note: See TracChangeset for help on using the changeset viewer.