diff --git a/assets/js/admin/api-keys.js b/assets/js/admin/api-keys.js index 437cd52a63b..760e883be27 100644 --- a/assets/js/admin/api-keys.js +++ b/assets/js/admin/api-keys.js @@ -142,7 +142,7 @@ $( '#key_permissions', self.el ).val( data.permissions ); } } else { - $( 'h3', self.el ).first().append( '

' + response.data.message + '

' ); + $( 'h2, h3', self.el ).first().append( '

' + response.data.message + '

' ); } self.unblock(); diff --git a/assets/js/admin/api-keys.min.js b/assets/js/admin/api-keys.min.js index 361c86f871f..20cf5e06878 100644 --- a/assets/js/admin/api-keys.min.js +++ b/assets/js/admin/api-keys.min.js @@ -1 +1 @@ -!function(a){new(Backbone.View.extend({el:a("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){a(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){a(this.el).unblock()},initTipTip:function(i){a(document.body).on("click",i,function(e){e.preventDefault(),document.queryCommandSupported("copy")?(a("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(a.trim(a(this).prev("input").val()),a(i))):(a(i).parent().find("input").focus().select(),a("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){a("#copy-error").text(""),a(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus()}).on("aftercopyerror",i,function(){a(i).parent().find("input").focus().select(),a("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(e,i){a("#keys-qrcode").qrcode({text:e+"|"+i,width:120,height:120})},saveKey:function(e){e.preventDefault();var t=this;t.block(),Backbone.ajax({method:"POST",dataType:"json",url:woocommerce_admin_api_keys.ajax_url,data:{action:"woocommerce_update_api_key",security:woocommerce_admin_api_keys.update_api_nonce,key_id:a("#key_id",t.el).val(),description:a("#key_description",t.el).val(),user:a("#key_user",t.el).val(),permissions:a("#key_permissions",t.el).val()},success:function(e){if(a(".wc-api-message",t.el).remove(),e.success){var i=e.data;if(a("h2, h3",t.el).first().append('

'+i.message+"

"),0

'+e.data.message+"

");t.unblock()}})}}))}(jQuery); \ No newline at end of file +!function(e){new(Backbone.View.extend({el:e("#key-fields"),events:{"click input#update_api_key":"saveKey"},initialize:function(){_.bindAll(this,"saveKey")},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},initTipTip:function(i){e(document.body).on("click",i,function(o){o.preventDefault(),document.queryCommandSupported("copy")?(e("#copy-error").text(""),wcClearClipboard(),wcSetClipboard(e.trim(e(this).prev("input").val()),e(i))):(e(i).parent().find("input").focus().select(),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed))}).on("aftercopy",i,function(){e("#copy-error").text(""),e(i).tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus()}).on("aftercopyerror",i,function(){e(i).parent().find("input").focus().select(),e("#copy-error").text(woocommerce_admin_api_keys.clipboard_failed)})},createQRCode:function(i,o){e("#keys-qrcode").qrcode({text:i+"|"+o,width:120,height:120})},saveKey:function(i){i.preventDefault();var o=this;o.block(),Backbone.ajax({method:"POST",dataType:"json",url:woocommerce_admin_api_keys.ajax_url,data:{action:"woocommerce_update_api_key",security:woocommerce_admin_api_keys.update_api_nonce,key_id:e("#key_id",o.el).val(),description:e("#key_description",o.el).val(),user:e("#key_user",o.el).val(),permissions:e("#key_permissions",o.el).val()},success:function(i){if(e(".wc-api-message",o.el).remove(),i.success){var t=i.data;if(e("h2, h3",o.el).first().append('

'+t.message+"

"),0

'+i.data.message+"

");o.unblock()}})}}))}(jQuery);