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:
@@ -167,20 +167,13 @@
|
||||
<select class="form-control" id="newmodelmachinetypeid" name="newmodelmachinetypeid">
|
||||
<option value="">-- Select Machine Type --</option>
|
||||
<%
|
||||
Dim rsMachineTypes, lastCat
|
||||
strSQL = "SELECT machinetypeid, machinetype, category FROM machinetypes WHERE isactive = 1 ORDER BY category, machinetype ASC"
|
||||
Dim rsMachineTypes
|
||||
strSQL = "SELECT machinetypeid, machinetype FROM machinetypes WHERE isactive = 1 ORDER BY machinetype ASC"
|
||||
Set rsMachineTypes = objconn.Execute(strSQL)
|
||||
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
|
||||
%>
|
||||
|
||||
Reference in New Issue
Block a user