Ignore:
Timestamp:
18 Aug 2007, 07:36:29 (17 years ago)
Author:
joachim
Message:

add passport widget

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py

    r2111 r2114  
    5050        for field in context.applicants_catalog.schema():
    5151            object[field] = getattr(brains[0],field,None)
     52        if not object['passport']:
     53            object['passport'] = ''
    5254        if object['status'] == "submitted":
    5355            submitted = True
    54         #set_trace()
    5556        if not create and pin != object['pin']:
    5657            return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    5758if slip:
    5859    mode = "view_slip"
    59 
    6060res,psm,ds = lt.renderLayout(layout_id= 'application',
    6161                             schema_id= 'application',
     
    9191    pass
    9292data = {}
     93dm = ds.getDataModel()
     94#set_trace()
    9395for field in context.applicants_catalog.schema():
    94     if ds.has_key(field) and request.has_key("widget__%s" % field):
    95         data[field] = ds.get(field)
     96    if dm.has_key("%s" % field):
     97        data[field] = dm.get(field)
    9698data['reg_no'] = reg_no
    97 
    9899if apply_pume:
    99 
    100100    if submitted:
    101101        mode = "view"
     
    143143                                )
    144144elif edit:
     145    #set_trace()
    145146    if submitted:
    146147        mode = "view"
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt

    r2109 r2114  
    1212        <h3 tal:condition="python:mode=='view'">Your PUME Application Record</h3>
    1313        <br />
     14        <img tal:condition="python:0" src="/uniben/viewimage?path=images/72921580DJ_passport.jpg" alt="" title="image/jpeg" />
    1415        <form action="" id="editForm" method="post"
    1516              enctype="multipart/form-data" class="workflow"
Note: See TracChangeset for help on using the changeset viewer.