From 8b015659489528346c918ae5efc6a4db4b4b4866 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 3 Nov 2020 10:08:23 +0100 Subject: [PATCH] Avoid confirm dialog while profiles are assigned to user --- pandora_console/godmode/users/configure_user.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index e60d591757..0db673acd4 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1393,12 +1393,16 @@ $(document).ready (function () { // Admin does not require profiles. $('#user_profile_form').submit(); } else { - confirmDialog({ - message: "", - onAccept: function() { - $('#user_profile_form').submit(); - } - }); + if ($('#table_profiles tbody').children().length == 1) { + confirmDialog({ + message: "", + onAccept: function() { + $('#user_profile_form').submit(); + } + }); + } else { + $('#user_profile_form').submit(); + } } }); });