Changeset 620 in tmcsimulator for branches/LCSv2/controllers/default.py.bak


Ignore:
Timestamp:
07/13/2020 12:23:49 PM (6 years ago)
Author:
jdalbey
Message:

Implement #248 to enhance LCS Request page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LCSv2/controllers/default.py.bak

    r619 r620  
    4545    if form.process(onvalidation=special_validation).accepted: 
    4646        # Put the form fields into the session variables 
    47         session.closureid = form.vars.closureid.strip() 
     47        session.closureid = form.vars.closureid.strip().upper() 
    4848        session.lognum = form.vars.lognum.strip() 
    4949        session.startdate = form.vars.startdate.strip() 
     
    177177    # Obtain all the supervisor names from the database 
    178178    for row in db().select(db.supervisors.ALL): 
    179         supervisors.append(row.name) 
     179        supervisors.append(row.radiocallnum + ' ' + row.name) 
     180    crew = ['']  # List of names for the dropdown box 
     181    # Obtain all the crew names from the database 
     182    for row in db().select(db.crew.ALL): 
     183        crew.append(row.radiocallnum + ' ' + row.name) 
    180184    # Build the list of street locations and a hidden cross street lookup table 
    181185    streets = [''] 
     
    206210                 TR(TD(SELECT(closuretypes,_name='closuretype',requires=IS_LENGTH(minsize=1,error_message='type of closure cannot be empty'))),  
    207211                    TD(SELECT(worktypes,_name='worktype', requires=IS_LENGTH(minsize=1,error_message='type of work cannot be empty'))),  
    208                     TD(INPUT(_name='estdelay',_size='4'),'minutes'),  
     212                    TD(INPUT(_name='estdelay',_size='4',requires=IS_INT_IN_RANGE(1, 1440)),'minutes'),  
    209213                    TD(INPUT(_type='checkbox',_name='cozeep'),'CoZeep MaZeep/CHP',BR(),  
    210214                       INPUT(_type='checkbox', _name='detour'),'Detour Available')),  
     
    213217            TD(LABEL('Field Rep'))),  
    214218                  TR(TD(SELECT(supervisors,_name='supervisor', requires=IS_LENGTH(minsize=1,error_message='supervisor cannot be empty'))), 
    215                      TD(SELECT(supervisors,_name='fieldrep')))), 
     219                     TD(SELECT(crew,_name='fieldrep')))), 
    216220    TABLE(TR(TD( LABEL('Meeting Place/CHP Contact')), 
    217221            TD(LABEL('Reason for Closure')), 
Note: See TracChangeset for help on using the changeset viewer.