From cfa081ce929d6899b7db259dea3cc51119a3752c Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Tue, 11 Apr 2017 10:55:40 +0300 Subject: [PATCH 1/2] User friendly disable predefined fields --- admin/assets/js/um-admin-ajax.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/assets/js/um-admin-ajax.js b/admin/assets/js/um-admin-ajax.js index e990f420..41f72cfb 100644 --- a/admin/assets/js/um-admin-ajax.js +++ b/admin/assets/js/um-admin-ajax.js @@ -5,7 +5,10 @@ jQuery(document).ready(function() { }); jQuery(document).on('click', 'a[data-silent_action^="um_"]',function(){ - + + if ( typeof jQuery(this).attr('disabled') !== 'undefined' ) + return false; + in_row = ''; in_sub_row = ''; in_column = ''; @@ -50,4 +53,4 @@ jQuery(document).ready(function() { }); -}); \ No newline at end of file +}); From 5c0890cdbc2ca06cf5b9d67d357e915ac95b3120 Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Tue, 11 Apr 2017 10:57:34 +0300 Subject: [PATCH 2/2] Disable predefined fields --- admin/core/um-admin-actions-modal.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/core/um-admin-actions-modal.php b/admin/core/um-admin-actions-modal.php index bff953d8..8ac00dcc 100644 --- a/admin/core/um-admin-actions-modal.php +++ b/admin/core/um-admin-actions-modal.php @@ -138,7 +138,7 @@ case 'um_admin_show_fields': ob_start(); - + $form_fields = $ultimatemember->query->get_attr( 'custom_fields', $arg2 ); ?>

@@ -167,7 +167,7 @@ if ( !isset( $array['account_only'] ) && !isset( $array['private_use'] ) ) { ?> - + data-silent_action="um_admin_add_field_from_predefined" data-arg1="" data-arg2=""> ' . __('None','ultimatemember') . '

'; } ?> @@ -366,4 +366,4 @@ if(is_array($output)){ print_r($output); }else{ echo $output; } die; - } \ No newline at end of file + }