From 4ff4e1f7807d650b009384758487527ffc8c7ec5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 7 Jul 2021 09:47:55 -0400 Subject: [PATCH] add Manufacturer and Model dropdown/text inputs to monitor edit view --- web/skins/classic/views/monitor.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 5e30db969..e6645dec5 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -492,18 +492,25 @@ switch ( $name ) { ManufacturerId(), array('class'=>'chosen')); +$manufacturers = array_merge( + array(''=>translate('unknown')), + ZM\Manufacturer::find()); +echo htmlSelect('newMonitor[ManufacturerId]', $manufacturers, $monitor->ManufacturerId(), array('class'=>'chosen','data-on-change-this'=>'ManufacturerId_onchange')); ?> + $monitor->ManufacturerId())); -echo htmlSelect('newMonitor[ModelId]', $models, $monitor->ModelId(), array('class'=>'chosen')); +$models = array_merge( + array(''=>translate('unknown')), + ZM\Model::find(array('ManufacturerId'=>$monitor->ManufacturerId())) +); +echo htmlSelect('newMonitor[ModelId]', $models, $monitor->ModelId(), array('class'=>'chosen', 'data-on-change-this'=>'ModelId_onchange')); ?> +