From afc92801a1e1e50de1d72d3c2436810915a26ee6 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 18 Mar 2008 19:20:18 +0000 Subject: [PATCH] Fix over-aggressive form validation. Props mdawaffe. fixes #6209 git-svn-id: http://svn.automattic.com/wordpress/trunk@7384 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-category-form.php | 4 ++-- wp-admin/edit-link-category-form.php | 4 ++-- wp-admin/edit-link-form.php | 4 ++-- wp-admin/edit-tag-form.php | 4 ++-- wp-admin/includes/media.php | 6 +++--- wp-admin/js/common.js | 2 +- wp-admin/users.php | 2 +- wp-includes/script-loader.php | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 63a5da754c..60368c2f0a 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -2,14 +2,14 @@ if ( ! empty($cat_ID) ) { $heading = __('Edit Category'); $submit_text = __('Edit Category'); - $form = '
'; + $form = ''; $action = 'editedcat'; $nonce_action = 'update-category_' . $cat_ID; do_action('edit_category_form_pre', $category); } else { $heading = __('Add Category'); $submit_text = __('Add Category'); - $form = ''; + $form = ''; $action = 'addcat'; $nonce_action = 'add-category'; do_action('add_category_form_pre', $category); diff --git a/wp-admin/edit-link-category-form.php b/wp-admin/edit-link-category-form.php index bba8dd1635..396550a9f8 100644 --- a/wp-admin/edit-link-category-form.php +++ b/wp-admin/edit-link-category-form.php @@ -2,14 +2,14 @@ if ( ! empty($cat_ID) ) { $heading = __('Edit Category'); $submit_text = __('Edit Category'); - $form = ''; + $form = ''; $action = 'editedcat'; $nonce_action = 'update-link-category_' . $cat_ID; do_action('edit_link_category_form_pre', $category); } else { $heading = __('Add Category'); $submit_text = __('Add Category'); - $form = ''; + $form = ''; $action = 'addcat'; $nonce_action = 'add-link-category'; do_action('add_link_category_form_pre', $category); diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index a68c6da4ed..ebf6d0c414 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -2,12 +2,12 @@ if ( ! empty($link_id) ) { $heading = __('Edit Link'); $submit_text = __('Save Changes'); - $form = ''; + $form = ''; $nonce_action = 'update-bookmark_' . $link_id; } else { $heading = __('Add Link'); $submit_text = __('Add Link'); - $form = ''; + $form = ''; $nonce_action = 'add-bookmark'; } diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index c3a6665f92..b268f4da89 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -2,14 +2,14 @@ if ( ! empty($tag_ID) ) { $heading = __('Edit Tag'); $submit_text = __('Edit Tag'); - $form = ''; + $form = ''; $action = 'editedtag'; $nonce_action = 'update-tag_' . $tag_ID; do_action('edit_tag_form_pre', $tag); } else { $heading = __('Add Tag'); $submit_text = __('Add Tag'); - $form = ''; + $form = ''; $action = 'addtag'; $nonce_action = 'add-tag'; do_action('add_tag_form_pre', $tag); diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 8d8bed444b..913717bab5 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -848,7 +848,7 @@ function media_upload_type_form($type = 'file', $errors = null, $id = null) { $callback = "type_form_$type"; ?> - +

@@ -909,7 +909,7 @@ jQuery(function($){ --> - + @@ -1044,7 +1044,7 @@ foreach ($arc_result as $arc_row) {
-
+ diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 08c132a591..6559d7d2c9 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -7,7 +7,7 @@ jQuery(document).ready( function() { // Basic form validation if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) { - jQuery('form').submit( function() { return wpAjax.validateForm( jQuery(this) ); } ); + jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } ); } }); diff --git a/wp-admin/users.php b/wp-admin/users.php index 91b6baf6c2..3ecebcc993 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -398,7 +398,7 @@ foreach ( $wp_user_search->get_results() as $userid ) { else echo '

' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '

'; ?> - + diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 6d7d28fe3a..336a24fdc3 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -11,7 +11,7 @@ class WP_Scripts { } function default_scripts() { - $this->add( 'common', '/wp-admin/js/common.js', array('jquery'), '1.0' ); + $this->add( 'common', '/wp-admin/js/common.js', array('jquery'), '20080318' ); $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3958' );