From 681d309c5178b3f61a730902121a53d1741bddbe Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Wed, 21 Mar 2018 15:00:25 -0400 Subject: [PATCH] Fixed problem with confusion between asset and facility edit forms. Added flash to Facility on update Added click action for expansion of Facility lines to support mobile. --- models/admin/ajax/assetManagement.php | 2 +- models/admin/ajax/facilityManagement.php | 5 ++-- views/admin/assets/facilityForm.html | 4 +-- views/admin/assets/index.html | 37 +++++++++++++++--------- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/models/admin/ajax/assetManagement.php b/models/admin/ajax/assetManagement.php index ec5253e..0c8bada 100644 --- a/models/admin/ajax/assetManagement.php +++ b/models/admin/ajax/assetManagement.php @@ -181,7 +181,7 @@ trigger_error("Option = ".$_REQUEST['option'],E_USER_NOTICE); break; default: - die('No valid option provided'); + die('Invalid option provided'); break; } diff --git a/models/admin/ajax/facilityManagement.php b/models/admin/ajax/facilityManagement.php index 1952573..22ea57e 100644 --- a/models/admin/ajax/facilityManagement.php +++ b/models/admin/ajax/facilityManagement.php @@ -82,7 +82,7 @@ class GlmMembersAdmin_ajax_facilityManagement extends GlmAssetsSupport die('No option specified.'); } -trigger_error("Option = ".$_REQUEST['option'],E_USER_NOTICE); +trigger_error("Option = ".$_REQUEST['option'], E_USER_NOTICE); switch($_REQUEST['option']) { @@ -143,6 +143,7 @@ trigger_error("Option = ".$_REQUEST['option'],E_USER_NOTICE); $facility = $Facilities->editEntry($facilityId); //echo "
".print_r($facility,1)."
"; //die(); + $view = 'facilityForm'; $templateData = array( @@ -187,7 +188,7 @@ trigger_error("Option = ".$_REQUEST['option'],E_USER_NOTICE); break; default: - die('No valid option provided'); + die('Invalid option provided: '.$_REQUEST['option']); break; } diff --git a/views/admin/assets/facilityForm.html b/views/admin/assets/facilityForm.html index 2aebd0e..eb70e1e 100644 --- a/views/admin/assets/facilityForm.html +++ b/views/admin/assets/facilityForm.html @@ -22,12 +22,12 @@
- + {if $use == 'add'} {/if} {if $use == 'edit'} - + {/if} diff --git a/views/admin/assets/index.html b/views/admin/assets/index.html index 54eab88..8bf4b80 100644 --- a/views/admin/assets/index.html +++ b/views/admin/assets/index.html @@ -1,7 +1,4 @@ -
-* Having problem with submit of edit on new faclilty
-
@@ -15,6 +12,7 @@ font-weight: bold; margin-top: 10px; font-size: 1.1em; + cursor: pointer; } .assets-column-title { font-weight: bold; @@ -139,24 +137,35 @@