Changeset 2111 for WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
- Timestamp:
- 17 Aug 2007, 05:34:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
r2108 r2111 57 57 if slip: 58 58 mode = "view_slip" 59 59 60 60 res,psm,ds = lt.renderLayout(layout_id= 'application', 61 61 schema_id= 'application', … … 97 97 98 98 if apply_pume: 99 if not request.has_key('confirm'): 99 100 if submitted: 101 mode = "view" 102 psm = "The form has already been submitted and you are not allowed to resubmit the data!" 103 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application', 104 schema_id= 'application', 105 layout_mode = mode, 106 context=context, 107 mapping={}, 108 ob=object, 109 commit = False, 110 ) 111 elif not request.has_key('confirm'): 100 112 mode = "edit" 101 psm = "Please confirm Passport Photograph "113 psm = "Please confirm Passport Photograph!" 102 114 else: 103 115 mode = "view" 104 psm = "You successfully applied for PUME "116 psm = "You successfully applied for PUME!" 105 117 data['application_date'] = current 106 118 data['status'] = "submitted" 107 context.applicants_catalog.modifyRecord(**data) 119 context.applicants_catalog.modifyRecord(**data) 108 120 res,psm_dummy,ds = lt.renderLayout(layout_id= 'application', 109 121 schema_id= 'application', … … 113 125 ob=object, 114 126 commit = False, 115 ) 127 ) 116 128 elif create: 117 129 if submitted: … … 122 134 #set_trace() 123 135 object['pin'] = str(ds.get('pin')) 124 res,psm,d ummy = lt.renderLayout(layout_id= 'application',136 res,psm,ds_dummy = lt.renderLayout(layout_id= 'application', 125 137 schema_id= 'application', 126 138 layout_mode = mode, … … 131 143 ) 132 144 elif edit: 133 mode = "edit" 134 psm = "Content changed" 145 if submitted: 146 mode = "view" 147 psm = "The form has already been submitted and you are not allowed to modify the data!" 148 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application', 149 schema_id= 'application', 150 layout_mode = mode, 151 context=context, 152 mapping={}, 153 ob=object, 154 commit = False, 155 ) 156 else: 157 mode = "edit" 158 psm = "Content changed" 159 data['status'] = "edited" 160 context.applicants_catalog.modifyRecord(**data) 135 161 136 162 137 163 138 164 return context.apply_pume_form(rendered = res, 139 165 psm = psm,
Note: See TracChangeset for help on using the changeset viewer.