Ignore:
Timestamp:
03/11/09 21:28:13 (11 years ago)
Author:
astephen
Message:

more updates for submission form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/submit.py

    r5956 r5958  
    2424        del args["proc_id"] 
    2525 
    26         wps_url_base = """/wps?Request=Execute&Format=text/xml&Identifier=%s&Store=false&Status=false&DataInputs=""" 
    27         wps_request = wps_url_base % proc_id 
     26        wps_url_format = "/wps?Request=Execute&Format=text/xml&Identifier=%s&Store=false&Status=false&DataInputs=" 
     27        wps_request = wps_url_format % proc_id 
    2828 
    2929        for (key, value) in args.items(): 
     
    3434 
    3535        return redirect_to(wps_request)  
    36         return "Do I get here?" 
     36 
     37    def choose(self): 
     38        """ 
     39        Shows a drop-down list of possible procs to submit - to choose from. 
     40        """ 
     41        pc = ProcConfig() 
     42        procs = pc.getProcList() 
     43 
     44        resp = """      <form action="/submit/form"> 
     45                <p>Please select a process from the drop-down menu below and press 'GO' to generate a form to submit a job.</p> 
     46                <select name="proc_id">""" 
     47 
     48        for (proc, long_name) in procs.items(): 
     49            resp += ('                  <option name="%s" value="%s">%s</option>\n' % (proc, proc, long_name)) 
     50 
     51        resp += """             </select> 
     52                <input type="submit" value="GO" /> 
     53        </form>""" 
     54 
     55        renderer = UIPageRenderer() 
     56        resp = renderer.render("Submission Form", 
     57                               [("Choose a process to submit a job to", resp)]) 
     58 
     59        return resp 
     60 
    3761 
    3862    def form(self): 
Note: See TracChangeset for help on using the changeset viewer.