Changeset 2160 for WAeUP_SRP/trunk/skins
- Timestamp:
- 24 Aug 2007, 09:47:46 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
r2159 r2160 44 44 else: 45 45 mode = "create" 46 validate = create or edit or apply_pume or manage 46 validate = create or edit or apply_pume 47 48 if manage: 49 validate = False 47 50 48 51 lt = context.portal_layouts … … 58 61 object[field] = getattr(brains[0],field,None) 59 62 if not object['passport']: 60 object['passport'] = ''63 object['passport'] = '' 61 64 if object['status'] == "submitted": 62 65 submitted = True … … 67 70 mode = "view_slip" 68 71 logger.info('%s/%s views application slip' % (member,reg_no)) 72 69 73 res,psm,ds = lt.renderLayout(layout_id= 'application', 70 74 schema_id= 'application', … … 91 95 ds = ds, 92 96 ) 93 elif psm == '' :97 elif psm == '' and not manage: 94 98 return context.apply_pume_form(rendered = res, 95 99 psm = None, … … 97 101 mode = mode, 98 102 ) 99 elif psm == 'valid' :103 elif psm == 'valid' or (psm == '' and manage): 100 104 pass 101 105 data = {} … … 105 109 data[field] = dm.get(field) 106 110 data['reg_no'] = reg_no 111 112 113 107 114 if apply_pume: 108 115 if submitted: … … 193 200 logger.info('%s/%s entered application record' % (member,reg_no)) 194 201 195 202 203 try: 204 passport_uploaded = bool(data['passport']) 205 except: 206 passport_uploaded = False 196 207 197 208 return context.apply_pume_form(rendered = res, … … 199 210 #psm = "%s, %s" % (psm,ds), 200 211 mode = mode, 201 show_submit = bool(data['passport']),212 show_submit = passport_uploaded, 202 213 ds = ds, 203 214 ) -
WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py
r2158 r2160 1 ## Script (Python) "apply_pume "1 ## Script (Python) "apply_pume_manage" 2 2 ##bind container=container 3 3 ##bind context=context … … 39 39 lt = context.portal_layouts 40 40 41 reg_no = request.get('reg_no','') 42 new_reg_no = request.get('new_reg_no','') 41 reg_no = request.get('reg_no','').upper() 42 new_reg_no = request.get('new_reg_no','').upper() 43 43 44 44 if reset: -
WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage_form.pt
r2159 r2160 71 71 enctype="multipart/form-data" class="workflow" 72 72 tal:attributes="action string:${context/absolute_url}/apply_pume" 73 tal:condition="rendered_main" 73 74 > 74 75 <input type="hidden" name="reg_no" … … 78 79 class="standalone" 79 80 name="manage" 80 value="Assume theApplicant's Role"81 value="Assume Applicant's Role" 81 82 /> 82 83 </form>
Note: See TracChangeset for help on using the changeset viewer.