diff --git a/html/forms/storage-update.inc.php b/html/forms/storage-update.inc.php index 3be5ea4b4..200a8f3d6 100644 --- a/html/forms/storage-update.inc.php +++ b/html/forms/storage-update.inc.php @@ -29,7 +29,7 @@ elseif (!is_numeric($data)) { $message = 'Missing value'; } else { - if (dbUpdate(array('storage_perc_warn'=>$data), 'storage', '`storage_id`=? AND `device_id`=?',array($storage_id,$device))) { + if (dbUpdate(array('storage_perc_warn'=>$data), 'storage', '`storage_id`=? AND `device_id`=?',array($storage_id,$device_id))) { $message = 'Storage information updated'; $status = 'ok'; } diff --git a/html/pages/device/edit/storage.inc.php b/html/pages/device/edit/storage.inc.php index 7ab0337db..e32dd0684 100644 --- a/html/pages/device/edit/storage.inc.php +++ b/html/pages/device/edit/storage.inc.php @@ -55,7 +55,6 @@ var device_id = $(this).data("device_id"); var storage_id = $(this).data("storage_id"); var data = $(this).val(); - alert(device_id + ' ' + storage_id + ' ' + data); var $this = $(this); $.ajax({ type: 'POST', @@ -69,14 +68,14 @@ $this.closest('.form-group').removeClass('has-success'); }, 2000); } else { - $(this).closest('.form-group').addClass('has-error'); + $this.closest('.form-group').addClass('has-error'); setTimeout(function () { $this.closest('.form-group').removeClass('has-error'); }, 2000); } }, error: function () { - $(this).closest('.form-group').addClass('has-error'); + $this.closest('.form-group').addClass('has-error'); setTimeout(function () { $this.closest('.form-group').removeClass('has-error'); }, 2000);