Index: branches/LCSv2/controllers/default.py
===================================================================
--- branches/LCSv2/controllers/default.py	(revision 621)
+++ branches/LCSv2/controllers/default.py	(revision 622)
@@ -92,5 +92,5 @@
     count = len(hwy)
     # Show the results in table format.  Get the radio call number from supervisor name lookup
-    header = THEAD(TR(TH(''), TH('DTM',BR(),'Area'), TH('Closure ID/',BR(),'Log No.'),TH('Route & Dir/',BR(),'Type of Closure'),TH('Start Date/',BR(),'End Date/',BR(),'Est. Delay'),TH('Facility'),TH('Limits'),TH('Work'), TH('TMP:',BR(),'Cozeep/',BR(),'Detour'),TH('Requestor/',BR(),'Radio Call No.')))
+    header = THEAD(TR(TH(''), TH('DTM',BR(),'Area'), TH('Closure ID/',BR(),'Log No.'),TH('Route & Dir/',BR(),'Type of Closure'),TH('Start Date/',BR(),'End Date/',BR(),'Est. Delay'),TH('Facility/Lanes'),TH('Limits'),TH('Work'), TH('TMP:',BR(),'Cozeep/',BR(),'Detour'),TH('Requestor/',BR(),'Radio Call No.')))
     multiform = []
     # Iterates over all search results
@@ -103,5 +103,6 @@
                           INPUT(_type='submit',_name='btn2',_value='Show Status Form',_class="submit-button" ),
                           INPUT(_type='hidden',_name='row',_value=row.closureid))),
-                          TD(row.closureid[0]),TD(row.closureid,HR(),row.lognum), TD(row.route,' ',row.direction,HR(),row.closuretype), TD(row.startdate,' ',formatTime(row.starttime),HR(),row.enddate,' ',formatTime(row.endtime),HR(),row.estdelay), TD(row.facility),TD(row.startlocation,HR(),row.endlocation), TD(row.worktype), TD(row.tmpcozeep,BR(),row.tmpdetour), TD(row.supervisor,HR(),db(db.supervisors.name == row.supervisor).select().first().radiocallnum) )) 
+                          TD(row.closureid[0]),TD(row.closureid,HR(),row.lognum), TD(row.route,' ',row.direction,HR(),row.closuretype), TD(row.startdate,' ',formatTime(row.starttime),HR(),row.enddate,' ',formatTime(row.endtime),HR(),row.estdelay), TD(row.facility,HR(),row.closedlanes),
+TD(row.startlocation,HR(),row.endlocation), TD(row.worktype), TD(row.tmpcozeep,BR(),row.tmpdetour), TD(row.supervisor,HR(),db(db.supervisors.name == row.supervisor).select().first().radiocallnum) )) 
 
     session.chosenid = request.vars.row #Pass the hidden field containing the closure ID
@@ -227,5 +228,5 @@
                 LABEL('*Route',_for='route'), SELECT(hwys,_name='route', _id='routecombo', _onchange='routechanged()', requires=IS_LENGTH(minsize=1,error_message='route cannot be empty')), XML('&nbsp;&nbsp;&nbsp;'), 
            LABEL('*Direction',_for='direction'), SELECT(hwyDirections,_name='direction', requires=IS_LENGTH(minsize=1,error_message='direction cannot be empty')), XML('&nbsp;&nbsp;&nbsp;'), 
-           LABEL('*Facility',_for='facility'), SELECT(facilities,_name='facility', requires=IS_LENGTH(minsize=1,error_message='facility cannot be empty')), BR(),BR(), 
+           LABEL('*Facility',_for='facility'), SELECT(facilities,_name='facility', _id='facilitycombo', requires=IS_LENGTH(minsize=1,error_message='facility cannot be empty')), BR(),BR(), 
            TABLE(TR(TD(),TD(LABEL('*County')),TD(LABEL('*Location'))),
                 TR(TD(LABEL('BEGIN=')),TD(SELECT('ORA',_name='startcounty')),
@@ -243,9 +244,13 @@
                     TD(LABEL('Estimated Delay')),
                     TD(LABEL('TMP Details'))), 
-                 TR(TD(SELECT(closuretypes,_name='closuretype',requires=IS_LENGTH(minsize=1,error_message='type of closure cannot be empty'))), 
+                 TR(TD(SELECT(closuretypes,_name='closuretype',_id='closuretype', _onchange='closuretypechanged()',requires=IS_LENGTH(minsize=1,error_message='type of closure cannot be empty'))), 
                     TD(SELECT(worktypes,_name='worktype', requires=IS_LENGTH(minsize=1,error_message='type of work cannot be empty'))), 
                     TD(INPUT(_name='estdelay',_size='4'),'minutes'),  
                     TD(INPUT(_type='checkbox',_name='cozeep'),'CoZeep MaZeep/CHP',BR(), 
-                       INPUT(_type='checkbox', _name='detour'),'Detour Available')), 
+                       INPUT(_type='checkbox', _name='detour'),'Detour Available')),
+                 TR(TD(DIV(LABEL("Lanes closed"),DIV(INPUT(_type='checkbox', _name='lanes', _id='lanes', _value=' '), _id='boxes'),_id='lanechooser',_style='display:none')),
+                    TD(INPUT(_type='hidden', _name='lanecount', _id='lanecount', _value='4')),
+                    TD(),
+                    TD()),
                  _width='100%' ),
     TABLE(TR(TD(LABEL('*Supervisor')),
@@ -278,7 +283,8 @@
         supervisor_name = form.vars.supervisor[3:]
         fieldrep_name = form.vars.fieldrep[5:]
+        selectedlanes = buildLanesClosedString(form.vars.lanes,form.vars.lanecount)
         # Insert the record into the database
-        newrec = db.closures.insert(closureid=newID, lognum=newLognum, route=form.vars.route, direction=form.vars.direction, facility=form.vars.facility, startcounty=form.vars.startcounty, endcounty=form.vars.endcounty, startlocation=form.vars.startlocation, endlocation=form.vars.endlocation, startdate=form.vars.startdate, enddate=form.vars.enddate, starttime=form.vars.starttime+form.vars.starttimemin, endtime=form.vars.endtime+form.vars.endtimemin, closuretype=form.vars.closuretype, worktype=form.vars.worktype, estdelay=form.vars.estdelay, tmpcozeep=getCheckbox(form.vars.cozeep), tmpdetour=getCheckbox(form.vars.detour), supervisor=supervisor_name, fieldrep=fieldrep_name, s1097date='', s1098date='', s1022date='' )
-        session.flash = 'New lane closure added: ' + newID + ' ' + newLognum
+        newrec = db.closures.insert(closureid=newID, lognum=newLognum, route=form.vars.route, direction=form.vars.direction, facility=form.vars.facility, startcounty=form.vars.startcounty, endcounty=form.vars.endcounty, startlocation=form.vars.startlocation, endlocation=form.vars.endlocation, startdate=form.vars.startdate, enddate=form.vars.enddate, starttime=form.vars.starttime+form.vars.starttimemin, endtime=form.vars.endtime+form.vars.endtimemin, closuretype=form.vars.closuretype, closedlanes=selectedlanes, worktype=form.vars.worktype, estdelay=form.vars.estdelay, tmpcozeep=getCheckbox(form.vars.cozeep), tmpdetour=getCheckbox(form.vars.detour), supervisor=supervisor_name, fieldrep=fieldrep_name, s1097date='', s1098date='', s1022date='' )
+        session.flash = 'New lane closure added: ' + newID + ' ' + newLognum + ': ' + selectedlanes
         redirect(URL('search.html'))
     return dict(form=form)
@@ -320,2 +326,14 @@
     else:
         return "NO"
+
+# Convert the lanes closed checkboxes into a human readable string
+# E.g.  #1 #3 of 4
+# Note: ckBoxGroup parameter contains only checked items
+def buildLanesClosedString(ckBoxGroup,lanecount):
+    result = ""
+    if ckBoxGroup is not None:
+        # Append each checked value to a string
+        for item in ckBoxGroup:
+            result = result + "#"+item + " "
+        result = result + "of " + lanecount
+    return result 
