mirror of https://github.com/itflow-org/itflow
Allow to set quick notes under asset details
This commit is contained in:
parent
dff4eff5cc
commit
a8ee791d64
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
|
||||
* 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>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
|
@ -495,8 +495,8 @@ if (isset($_GET['asset_id'])) {
|
|||
jQuery.post(
|
||||
"ajax.php",
|
||||
{
|
||||
contact_set_notes: 'TRUE',
|
||||
contact_id: contact_id,
|
||||
asset_set_notes: 'TRUE',
|
||||
asset_id: asset_id,
|
||||
notes: notes
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue