Index: html/pages/device/edit/device.inc.php =================================================================== --- html/pages/device/edit/device.inc.php (revision 7166) +++ html/pages/device/edit/device.inc.php (working copy) @@ -53,7 +53,7 @@ # FIXME needs more sanity checking! and better feedback # FIXME -- update location too? Need to trigger geolocation! - $param = array('purpose' => $vars['descr'], 'type' => $vars['type'], 'ignore' => $vars['ignore'], 'disabled' => $vars['disabled']); + $param = array('purpose' => $vars['descr'], 'type' => $vars['type'], 'os' => $vars['os'], 'ignore' => $vars['ignore'], 'disabled' => $vars['disabled']); $rows_updated = dbUpdate($param, 'devices', '`device_id` = ?', array($device['device_id'])); @@ -104,6 +104,12 @@ $types[$device['type']] = array('name' => 'Other', 'icon' => 'oicon-question'); } +$os = array(); +foreach ($config['os'] as $key => $name) +{ + $os[$key] = array('name' => $name['text'], 'icon' => $types[$name['type']]['icon']); +} + $form = array('type' => 'horizontal', 'id' => 'edit', 'space' => '20px', @@ -127,11 +133,19 @@ $form['row'][2]['type'] = array( 'type' => 'select', //'fieldset' => 'edit', - 'name' => 'Type', + 'name' => 'Type/OS', 'width' => '250px', 'readonly' => $readonly, 'values' => $types, 'value' => $device['type']); + $form['row'][2]['os'] = array( + 'type' => 'select', + //'fieldset' => 'edit', + 'name' => 'OS', + 'width' => '250px', + 'readonly' => $readonly, + 'values' => $os, + 'value' => $device['os']); $form['row'][3]['sysLocation'] = array( 'type' => 'text', //'fieldset' => 'edit',