Automatically select the current asset in asset details whjen creating a recurring or regular ticket

This commit is contained in:
johnnyq 2024-12-10 20:51:16 -05:00
parent 0bff350463
commit d5e5a13fe7
2 changed files with 10 additions and 2 deletions

View File

@ -190,7 +190,12 @@
$asset_id_select = intval($row['asset_id']);
$asset_name_select = nullable_htmlentities($row['asset_name']);
?>
<option value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
<option value="<?php echo $asset_id_select; ?>"
<?php if (isset($_GET['asset_id']) && $asset_id_select == $_GET['asset_id']) { echo "selected"; }
?>
><?php echo $asset_name_select; ?>
</option>
<?php } ?>
</select>

View File

@ -294,7 +294,10 @@
$asset_name_select = nullable_htmlentities($row['asset_name']);
$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>
<option value="<?php echo $asset_id_select; ?>"
<?php if (isset($_GET['asset_id']) && $asset_id_select == $_GET['asset_id']) { echo "selected"; }
?>
><?php echo "$asset_name_select - $asset_contact_name_select"; ?></option>
<?php } ?>
</select>