diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 2b99a5bf31..47a3a6f418 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -248,7 +248,6 @@ require_once "resources/require.php"; if ($action == "add") { //save the message to a session variable $_SESSION['message'] = $text['message-add']; - $_SESSION['message_mood'] = 'positive'; //redirect the browser header("Location: device_edit.php?id=$device_uuid"); exit; @@ -256,7 +255,6 @@ require_once "resources/require.php"; if ($action == "update") { //save the message to a session variable $_SESSION['message'] = $text['message-update']; - $_SESSION['message_mood'] = 'positive'; } } } @@ -383,33 +381,24 @@ require_once "resources/require.php"; obj[0].parentNode.removeChild(obj[2]); } - function check_mac_duplicate(mac_addr, device_uuid_to_ignore) { if (mac_addr != '') { - var response; check_url = "device_edit.php?mac="+mac_addr+"&id="+device_uuid_to_ignore; $("#duplicate_mac_response").load(check_url, function() { - var duplicate_mac_response = $("#duplicate_mac_response").html(); - if (duplicate_mac_response != '') { + if ($("#duplicate_mac_response").html() != '') { $('#device_mac_address').addClass('formfld_highlight_bad'); - display_message(duplicate_mac_response, 'negative'); - $('#duplicate_mac_found').val(true); + display_message($("#duplicate_mac_response").html(), 'negative'); } else { $('#device_mac_address').removeClass('formfld_highlight_bad'); - $('#duplicate_mac_found').val(false); + $('#frm').submit(); } }); - return ($('#duplicate_mac_found').val() == "true") ? false : true; } else { - return true; + $('#frm').submit(); } } - - - - \n"; echo "