From 1f0d62fd0072147e5cecdf3e1c7bf722399ef1e6 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 21 Jan 2022 15:53:27 -0500 Subject: [PATCH] Hide Certain fields on edit asset if Asset type matches criteria --- add_asset_modal.php | 13 +++++-------- client_assets.php | 14 +++++++------- edit_asset_modal.php | 8 ++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/add_asset_modal.php b/add_asset_modal.php index 93d2450b..534ebe39 100644 --- a/add_asset_modal.php +++ b/add_asset_modal.php @@ -2,7 +2,7 @@ - + -
diff --git a/client_assets.php b/client_assets.php index 0df0a383..95b481eb 100644 --- a/client_assets.php +++ b/client_assets.php @@ -66,9 +66,9 @@ if(isset($_GET['o'])){ } //Asset Type from GET -if(isset($_GET['type']) && ($_GET['type']) == 'workstations'){ +if(isset($_GET['type']) && ($_GET['type']) == 'workstation'){ $type_query = "asset_type = 'desktop' OR asset_type = 'laptop'"; -}elseif(isset($_GET['type']) && ($_GET['type']) == 'servers'){ +}elseif(isset($_GET['type']) && ($_GET['type']) == 'server'){ $type_query = "asset_type = 'server'"; }elseif(isset($_GET['type']) && ($_GET['type']) == 'virtual'){ $type_query = "asset_type = 'Virtual Machine'"; @@ -97,7 +97,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));

Assets

- +
@@ -109,7 +109,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
- + s">
@@ -117,15 +117,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
+
@@ -91,7 +93,9 @@
+ +
@@ -101,6 +105,7 @@
+ x
@@ -130,6 +135,7 @@
+
@@ -238,6 +244,7 @@
+
@@ -257,6 +264,7 @@
+