- code formatting;

- small changes for #790;
This commit is contained in:
nikitasinelnikov
2021-04-05 19:06:44 +03:00
parent 8f1c2f0ce5
commit b2bb2c13eb
4 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -4,11 +4,11 @@ jQuery(document).ready(function() {
jQuery(document.body).on('click', '.um-admin-btns a span.remove', function(e){
e.preventDefault();
if ( confirm( 'This will permanently delete this custom field from a database and from all forms on your site. Are you sure?' ) ) {
if ( confirm( wp.i18n.__( 'This will permanently delete this custom field from a database and from all forms on your site. Are you sure?', 'ultimate-member' ) ) ) {
jQuery(this).parents('a').remove();
arg1 = jQuery(this).parents('a').data('arg1');
var arg1 = jQuery(this).parents('a').data('arg1');
jQuery.ajax({
url: wp.ajax.settings.url,
@@ -20,10 +20,10 @@ jQuery(document).ready(function() {
nonce: um_admin_scripts.nonce
},
success: function(data){
success: function(data) {
jQuery('#um-admin-form-builder .' + arg1).remove();
},
error: function(data){
error: function(data) {
}
});
+1 -1
View File
@@ -279,7 +279,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Field Processing
*/
function load_field() {
wp_register_script( 'um_admin_field', $this->js_url . 'um-admin-field.js', array('jquery', 'wp-util'), ultimatemember_version, true );
wp_register_script( 'um_admin_field', $this->js_url . 'um-admin-field.js', array('jquery', 'wp-util', 'wp-i18n'), ultimatemember_version, true );
wp_enqueue_script( 'um_admin_field' );
}