From 335e74c26b2831a8edeafa605e26e7c482b7be2e Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 22 Oct 2020 09:53:59 +0200 Subject: [PATCH] Fixed warning message in metaconsole --- pandora_console/godmode/users/configure_user.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index b98d35e003..3e9a38dede 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1313,6 +1313,7 @@ $(document).ready (function () { var img_delete = ''; var id_user = ''; + var is_metaconsole = ''; var data = []; $('input:image[name="add"]').click(function (e) { @@ -1357,7 +1358,7 @@ $(document).ready (function () { $('input:image[name="del"]').click(function (e) { e.preventDefault(); var rows = $("#table_profiles tr").length; - if (rows <= 3) { + if ((is_metaconsole === '1' && rows <= 4) || (is_metaconsole === '' && rows <= 3)) { if (!confirm('' + '. ' + '')) { return; } @@ -1379,7 +1380,7 @@ $(document).ready (function () { success: function (data) { row.remove(); var rows = $("#table_profiles tr").length; - if (rows <= 2) { + if ((is_metaconsole === '1' && rows <= 3) || (is_metaconsole === '' && rows <= 2)) { window.location.replace(""); } } @@ -1389,7 +1390,7 @@ $(document).ready (function () { $('#submit-crtbutton').click(function (e) { e.preventDefault(); var rows = $("#table_profiles tr").length; - if (rows <= 2) { + if ((is_metaconsole === '1' && rows <= 3) || (is_metaconsole === '' && rows <= 2)) { alert(''); } else { this.form.submit();