Hide Certain fields on add asset if Asset type is selected under client assets

This commit is contained in:
johnnyq
2022-01-21 15:18:27 -05:00
parent 4d14376370
commit 7327802fb6
2 changed files with 18 additions and 6 deletions

View File

@@ -109,14 +109,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<div class="col-md-4">
<div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords($_GET['tab']); ?>">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search">
<div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="btn-group">
<div class="btn-group btn-group-lg">
<a href="?<?php echo $url_query_strings_sb; ?>&type=%" class="btn <?php if($_GET['type'] == '%' OR empty($_GET['type'])){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">All Assets <span class="right badge badge-light"><?php echo $all_count; ?></span></a>
<?php
if($workstation_count > 0){ ?>
@@ -174,7 +174,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_os&o=<?php echo $disp; ?>">Operating System</a></th>
<?php } ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=asset_install_date&o=<?php echo $disp; ?>">Install Date</a></th>
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'servers' AND $_GET['type'] !== 'other'){ ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=contact_name&o=<?php echo $disp; ?>">Contact</a></th>
<?php } ?>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=location_name&o=<?php echo $disp; ?>">Location</a></th>
@@ -325,7 +325,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $asset_os_display; ?></td>
<?php } ?>
<td><?php echo $asset_install_date_display; ?></td>
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other'){ ?>
<?php if($_GET['type'] !== 'network' AND $_GET['type'] !== 'other' AND $_GET['type'] !== 'servers'){ ?>
<td><?php echo $contact_name; ?></td>
<?php } ?>
<td><?php echo $location_name; ?></td>