Remove category grouping from machine type dropdowns

Simplified machine type dropdowns to flat list without category
grouping. This removes dependency on the 'category' column in
machinetypes table which may not exist on all environments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-01-22 16:24:07 -05:00
parent 12a35ed7e0
commit 1b7946900c
7 changed files with 12 additions and 99 deletions

View File

@@ -240,20 +240,13 @@
<select class="form-control" id="newmodelmachinetypeid" name="newmodelmachinetypeid">
<option value="">-- Select Machine Type --</option>
<%
Dim rsMachineTypes, lastCat
strSQL3 = "SELECT machinetypeid, machinetype, category FROM machinetypes WHERE isactive = 1 ORDER BY category, machinetype ASC"
Dim rsMachineTypes
strSQL3 = "SELECT machinetypeid, machinetype FROM machinetypes WHERE isactive = 1 ORDER BY machinetype ASC"
Set rsMachineTypes = objConn.Execute(strSQL3)
lastCat = ""
While Not rsMachineTypes.EOF
If rsMachineTypes("category") <> lastCat Then
If lastCat <> "" Then Response.Write("</optgroup>")
Response.Write("<optgroup label='" & Server.HTMLEncode(rsMachineTypes("category")) & "'>")
lastCat = rsMachineTypes("category")
End If
Response.Write("<option value='" & rsMachineTypes("machinetypeid") & "'>" & Server.HTMLEncode(rsMachineTypes("machinetype")) & "</option>")
rsMachineTypes.MoveNext
Wend
If lastCat <> "" Then Response.Write("</optgroup>")
rsMachineTypes.Close
Set rsMachineTypes = Nothing
%>
@@ -275,13 +268,6 @@
<input type="text" class="form-control" id="newmachinetypename" name="newmachinetypename"
maxlength="50" placeholder="e.g., Firewall, Router, UPS">
</div>
<div class="form-group">
<label for="newmachinetypecategory">Category</label>
<select class="form-control" id="newmachinetypecategory" name="newmachinetypecategory">
<option value="Equipment">Equipment</option>
<option value="Network" selected>Network Device</option>
</select>
</div>
<button type="button" class="btn btn-sm btn-secondary" id="cancelNewMachineType">
<i class="zmdi zmdi-close"></i> Cancel
</button>