mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 05:44:52 +00:00
Allow to set quick notes under asset details
This commit is contained in:
12
ajax.php
12
ajax.php
@@ -181,6 +181,18 @@ if (isset($_POST['contact_set_notes'])) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($_POST['asset_set_notes'])) {
|
||||||
|
$asset_id = intval($_POST['asset_id']);
|
||||||
|
$notes = sanitizeInput($_POST['notes']);
|
||||||
|
|
||||||
|
// Update notes
|
||||||
|
mysqli_query($mysqli, "UPDATE assets SET asset_notes = '$notes' WHERE asset_id = $asset_id");
|
||||||
|
|
||||||
|
// Logging
|
||||||
|
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Assets', log_action = 'Modify', log_description = '$session_name modified asset notes', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Collision Detection/Avoidance
|
* Collision Detection/Avoidance
|
||||||
* Called upon loading a ticket, and every 2 mins thereafter
|
* Called upon loading a ticket, and every 2 mins thereafter
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ if (isset($_GET['asset_id'])) {
|
|||||||
<h5 class="card-title"><i class="fa fa-fw fa-edit mr-2"></i>Notes</h5>
|
<h5 class="card-title"><i class="fa fa-fw fa-edit mr-2"></i>Notes</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-1">
|
<div class="card-body p-1">
|
||||||
<textarea class="form-control" rows=6 id="contactNotes" placeholder="Enter quick notes here" onblur="updateAssetNotes(<?php echo $asset_id ?>)"><?php echo $asset_notes ?></textarea>
|
<textarea class="form-control" rows=6 id="assetNotes" placeholder="Enter quick notes here" onblur="updateAssetNotes(<?php echo $asset_id ?>)"><?php echo $asset_notes ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -495,8 +495,8 @@ if (isset($_GET['asset_id'])) {
|
|||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
contact_set_notes: 'TRUE',
|
asset_set_notes: 'TRUE',
|
||||||
contact_id: contact_id,
|
asset_id: asset_id,
|
||||||
notes: notes
|
notes: notes
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user