diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 6519ad04bd..7f6a4c65e7 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -496,24 +496,26 @@ require_once "resources/require.php"; if (duplicate_mac == false) { var username = document.getElementById('device_username').value; var domain_uuid = document.getElementById('domain_uuid').value; - $("#duplicate_username_response").load("device_edit.php?check=duplicate&username="+username+"&domain_uuid="+domain_uuid+"&device_uuid=", function() { - var duplicate_username = false; + if (username != '') { + $("#duplicate_username_response").load("device_edit.php?check=duplicate&username="+username+"&domain_uuid="+domain_uuid+"&device_uuid=", function() { + var duplicate_username = false; - if ($("#duplicate_username_response").html() != '') { - $('#device_username').addClass('formfld_highlight_bad'); - display_message($("#duplicate_username_response").html(), 'negative'); - duplicate_username = true; - } - else { - $("#duplicate_username_response").html(''); - $('#device_username').removeClass('formfld_highlight_bad'); - duplicate_username = false; - } - - if (duplicate_username == false) { - document.getElementById('frm').submit(); - } - }); + if ($("#duplicate_username_response").html() != '') { + $('#device_username').addClass('formfld_highlight_bad'); + display_message($("#duplicate_username_response").html(), 'negative'); + duplicate_username = true; + } + else { + $("#duplicate_username_response").html(''); + $('#device_username').removeClass('formfld_highlight_bad'); + duplicate_username = false; + submit_form_2(); + } + }); + } + else { + submit_form_2(); + } } }); } @@ -584,7 +586,7 @@ require_once "resources/require.php"; } //show the content - echo "
"; + echo "\n"; + //show the footer require_once "resources/footer.php"; ?> \ No newline at end of file diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 409e58bdc5..9e14fff282 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -993,8 +993,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "}\n"; echo ""; - echo ""; + echo "\n"; + //include the footer require_once "resources/footer.php"; diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index a60a801163..b3c83c065b 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -428,7 +428,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "}\n"; echo ""; - echo ""; + echo "\n"; + //include the footer require_once "resources/footer.php"; diff --git a/core/users/signup.php b/core/users/signup.php index daef10e19e..5cc28e4bcc 100644 --- a/core/users/signup.php +++ b/core/users/signup.php @@ -279,7 +279,7 @@ if (count($_POST) > 0 && check_str($_POST["persistform"]) != "1") { echo ""; $tablewidth ='width="100%"'; - echo ""; + echo "\n"; + //show the footer require_once "resources/footer.php"; ?> \ No newline at end of file diff --git a/core/users/usersupdate.php b/core/users/usersupdate.php index 16d641a313..cc402630fb 100644 --- a/core/users/usersupdate.php +++ b/core/users/usersupdate.php @@ -368,7 +368,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { //redirect the browser $_SESSION["message"] = $text['message-update']; - if ($_REQUEST['submit'] == $text['button-add']) { + if ($_REQUEST['action'] == $text['button-add']) { header("Location: usersupdate.php?id=".$user_uuid); } else { @@ -435,13 +435,13 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " }"; echo ""; - echo ""; + echo "\n"; + //include the footer require_once "resources/footer.php";