diff --git a/wp-admin/css/edit.css b/wp-admin/css/edit.css
index e186e488ad..90ff73ec85 100644
a
|
b
|
p.popular-tags a { |
1171 | 1171 | margin-top: 20px; |
1172 | 1172 | } |
1173 | 1173 | |
| 1174 | #addtag.submittingtag .spinner { |
| 1175 | visibility: visible; |
| 1176 | } |
| 1177 | |
1174 | 1178 | /* Comments */ |
1175 | 1179 | |
1176 | 1180 | .comment-php .wp-editor-area { |
diff --git a/wp-admin/js/tags.js b/wp-admin/js/tags.js
index 0f195c777e..a9798e28be 100644
a
|
b
|
jQuery(document).ready(function($) { |
87 | 87 | } |
88 | 88 | }); |
89 | 89 | |
| 90 | /** |
| 91 | * Check if we're currently adding a term, and we're not done yet with the AJAX request. |
| 92 | * |
| 93 | * @type {Boolean} |
| 94 | */ |
| 95 | var addingTerm = false; |
| 96 | |
90 | 97 | /** |
91 | 98 | * Adds an event handler to the form submit on the term overview page. |
92 | 99 | * |
… |
… |
jQuery(document).ready(function($) { |
97 | 104 | * @returns boolean Always returns false to cancel the default event handling. |
98 | 105 | */ |
99 | 106 | $('#submit').click(function(){ |
| 107 | if ( addingTerm ) { |
| 108 | // If we're adding a term, noop the button so that the term doesn't end |
| 109 | // up being added twice. |
| 110 | return false; |
| 111 | } |
| 112 | |
100 | 113 | var form = $(this).parents('form'); |
101 | 114 | |
102 | 115 | if ( ! validateForm( form ) ) |
103 | 116 | return false; |
104 | 117 | |
| 118 | addingTerm = true; |
| 119 | form.addClass( 'submittingtag' ); |
| 120 | |
105 | 121 | /** |
106 | 122 | * Does a request to the server to add a new term to the database |
107 | 123 | * |
… |
… |
jQuery(document).ready(function($) { |
112 | 128 | $.post(ajaxurl, $('#addtag').serialize(), function(r){ |
113 | 129 | var res, parent, term, indent, i; |
114 | 130 | |
| 131 | addingTerm = false; |
| 132 | form.removeClass( 'submittingtag' ); |
| 133 | |
115 | 134 | $('#ajax-response').empty(); |
116 | 135 | res = wpAjax.parseAjaxResponse( r, 'ajax-response' ); |
117 | 136 | if ( ! res || res.errors ) |