mirror of https://github.com/itflow-org/itflow
UI: Show assigned contact in asset dropdown select menu in tickets
This commit is contained in:
parent
be5bf1853e
commit
998a701634
|
|
@ -212,11 +212,13 @@
|
||||||
<option value="0">- None -</option>
|
<option value="0">- None -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_assets)) {
|
while ($row = mysqli_fetch_array($sql_assets)) {
|
||||||
$asset_id_select = intval($row['asset_id']);
|
$asset_id_select = intval($row['asset_id']);
|
||||||
$asset_name_select = nullable_htmlentities($row['asset_name']); ?>
|
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
||||||
<option value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
|
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $asset_id_select; ?>"><?php echo "$asset_name_select - $asset_contact_name_select"; ?></option>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,13 @@
|
||||||
<option value="0">- None -</option>
|
<option value="0">- None -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_assets)) {
|
while ($row = mysqli_fetch_array($sql_assets)) {
|
||||||
$asset_id_select = intval($row['asset_id']);
|
$asset_id_select = intval($row['asset_id']);
|
||||||
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
||||||
|
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
|
<option <?php if ($asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo "$asset_name_select - $asset_contact_name_select"; ?></option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,12 +136,13 @@
|
||||||
<option value="0">- None -</option>
|
<option value="0">- None -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
$sql_assets = mysqli_query($mysqli, "SELECT * FROM assets LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||||
while ($row = mysqli_fetch_array($sql_assets)) {
|
while ($row = mysqli_fetch_array($sql_assets)) {
|
||||||
$asset_id_select = intval($row['asset_id']);
|
$asset_id_select = intval($row['asset_id']);
|
||||||
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
||||||
|
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||||
?>
|
?>
|
||||||
<option <?php if ($asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
|
<option <?php if ($asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo "$asset_name_select - $asset_contact_name_select"; ?></option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue