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:
@@ -237,20 +237,12 @@
|
||||
<option value="">-- Select Machine Type --</option>
|
||||
<%
|
||||
Dim rsMachineTypes
|
||||
strSQL2 = "SELECT machinetypeid, machinetype, category FROM machinetypes WHERE isactive = 1 ORDER BY category, machinetype ASC"
|
||||
strSQL2 = "SELECT machinetypeid, machinetype FROM machinetypes WHERE isactive = 1 ORDER BY machinetype ASC"
|
||||
Set rsMachineTypes = objConn.Execute(strSQL2)
|
||||
Dim lastCat
|
||||
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
|
||||
%>
|
||||
@@ -274,14 +266,6 @@
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user