Changeset 2146


Ignore:
Timestamp:
22 Aug 2007, 13:05:07 (17 years ago)
Author:
joachim
Message:

show submitbutton only if passport is uploaded (in custom)

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

Legend:

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

    r2141 r2146  
    6363    mode = "view_slip"
    6464    logger.info('%s views application slip' % (reg_no))
    65 
    6665res,psm,ds = lt.renderLayout(layout_id= 'application',
    6766                             schema_id= 'application',
     
    9897data = {}
    9998dm = ds.getDataModel()
    100 #set_trace()
    10199for field in context.applicants_catalog.schema():
    102100    if dm.has_key("%s" % field):
    103101        data[field] = dm.get(field)
    104102data['reg_no'] = reg_no
    105 #set_trace()
    106103if apply_pume:
    107104    if submitted:
     
    159156                                )
    160157elif edit:
    161     #set_trace()
    162158    if submitted:
    163159        mode = "view"
     
    180176
    181177
    182 
    183178return context.apply_pume_form(rendered = res,
    184179                            psm = psm,
    185180                            #psm = "%s, %s" % (psm,ds),
    186181                            mode = mode,
     182                            show_submit =  bool(data['passport']),
    187183                            ds = ds,
    188184                            )
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt

    r2129 r2146  
    44           jamb options/jamb/getContent|nothing;
    55           mode options/mode;
     6           show_submit options/show_submit|nothing;
    67           "
    78           >
     
    4142          <input type="submit" class="standalone" name="apply"
    4243                 value="Final Submit"
    43                  tal:condition="python: mode == 'edit'"
     44                 tal:condition="python: show_submit and mode == 'edit'"
    4445                 />
    4546          <input type="submit"
Note: See TracChangeset for help on using the changeset viewer.