Fix over-aggressive form validation. Props mdawaffe. fixes #6209
git-svn-id: http://svn.automattic.com/wordpress/trunk@7384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
19e2cf5f61
commit
afc92801a1
|
@ -2,14 +2,14 @@
|
|||
if ( ! empty($cat_ID) ) {
|
||||
$heading = __('Edit Category');
|
||||
$submit_text = __('Edit Category');
|
||||
$form = '<form name="editcat" id="editcat" method="post" action="categories.php">';
|
||||
$form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">';
|
||||
$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 name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list:">';
|
||||
$form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list: validate">';
|
||||
$action = 'addcat';
|
||||
$nonce_action = 'add-category';
|
||||
do_action('add_category_form_pre', $category);
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
if ( ! empty($cat_ID) ) {
|
||||
$heading = __('Edit Category');
|
||||
$submit_text = __('Edit Category');
|
||||
$form = '<form name="editcat" id="editcat" method="post" action="link-category.php">';
|
||||
$form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">';
|
||||
$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 name="addcat" id="addcat" class="add:the-list:" method="post" action="link-category.php">';
|
||||
$form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">';
|
||||
$action = 'addcat';
|
||||
$nonce_action = 'add-link-category';
|
||||
do_action('add_link_category_form_pre', $category);
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
if ( ! empty($link_id) ) {
|
||||
$heading = __('Edit Link');
|
||||
$submit_text = __('Save Changes');
|
||||
$form = '<form name="editlink" id="editlink" method="post" action="link.php">';
|
||||
$form = '<form name="editlink" id="editlink" method="post" action="link.php" class="validate">';
|
||||
$nonce_action = 'update-bookmark_' . $link_id;
|
||||
} else {
|
||||
$heading = __('Add Link');
|
||||
$submit_text = __('Add Link');
|
||||
$form = '<form name="addlink" id="addlink" method="post" action="link.php">';
|
||||
$form = '<form name="addlink" id="addlink" method="post" action="link.php" class="validate">';
|
||||
$nonce_action = 'add-bookmark';
|
||||
}
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
if ( ! empty($tag_ID) ) {
|
||||
$heading = __('Edit Tag');
|
||||
$submit_text = __('Edit Tag');
|
||||
$form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php">';
|
||||
$form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
|
||||
$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 name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list:">';
|
||||
$form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">';
|
||||
$action = 'addtag';
|
||||
$nonce_action = 'add-tag';
|
||||
do_action('add_tag_form_pre', $tag);
|
||||
|
|
|
@ -848,7 +848,7 @@ function media_upload_type_form($type = 'file', $errors = null, $id = null) {
|
|||
$callback = "type_form_$type";
|
||||
?>
|
||||
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form" id="<?php echo $type; ?>-form">
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form">
|
||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" />
|
||||
<?php wp_nonce_field('media-form'); ?>
|
||||
<h3><?php _e('From Computer'); ?></h3>
|
||||
|
@ -909,7 +909,7 @@ jQuery(function($){
|
|||
-->
|
||||
</script>
|
||||
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form" id="gallery-form">
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">
|
||||
<?php wp_nonce_field('media-form'); ?>
|
||||
<?php //media_upload_form( $errors ); ?>
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ foreach ($arc_result as $arc_row) {
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form" id="library-form">
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="library-form">
|
||||
|
||||
<?php wp_nonce_field('media-form'); ?>
|
||||
<?php //media_upload_form( $errors ); ?>
|
||||
|
|
|
@ -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) ); } );
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ foreach ( $wp_user_search->get_results() as $userid ) {
|
|||
else
|
||||
echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>';
|
||||
?>
|
||||
<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:users:">
|
||||
<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:users: validate">
|
||||
<?php wp_nonce_field('add-user') ?>
|
||||
<table class="form-table">
|
||||
<tr class="form-field form-required">
|
||||
|
|
|
@ -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' );
|
||||
|
|
Loading…
Reference in New Issue