Changeset 2307 for WAeUP_SRP/base/skins
- Timestamp:
- 4 Oct 2007, 06:21:53 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_student
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/apply_pume.py
r2184 r2307 48 48 if manage: 49 49 validate = False 50 50 layout = "application" 51 prence = "" 52 without_reg_no = False 53 if traverse_subpath and traverse_subpath[0] == "prence": 54 layout = "application_prence" 55 prence = "prence" 56 without_reg_no = True 51 57 lt = context.portal_layouts 52 58 reg_no = request.get('widget__reg_no','').upper() … … 81 87 logger.info('%s/%s views application slip' % (member,reg_no)) 82 88 83 res,psm,ds = lt.renderLayout(layout_id= 'application',89 res,psm,ds = lt.renderLayout(layout_id= layout, 84 90 schema_id= 'application', 85 91 layout_mode = mode, … … 96 102 mode = mode, 97 103 ds = ds, 104 prence = prence, 98 105 ) 99 106 … … 104 111 mode = mode, 105 112 ds = ds, 113 prence = prence, 106 114 ) 107 115 elif psm == '' and not manage: … … 110 118 ds = ds, 111 119 mode = mode, 120 prence = prence, 112 121 ) 113 122 elif psm == 'valid' or (psm == '' and manage): 114 123 pass 124 if without_reg_no: 125 reg_no = ds.get('reg_no') 115 126 data = {} 116 127 dm = ds.getDataModel() … … 120 131 data['reg_no'] = reg_no 121 132 122 123 124 133 if apply_pume: 125 134 if submitted: … … 127 136 psm = "The form has already been submitted and you are not allowed to resubmit the data!" 128 137 logger.info('%s/%s tried to resubmit application record' % (member,reg_no)) 129 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',138 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout, 130 139 schema_id= 'application', 131 140 layout_mode = mode, … … 152 161 context.applicants_catalog.modifyRecord(**data) 153 162 154 res,psm_dummy,ds = lt.renderLayout(layout_id= 'application',163 res,psm_dummy,ds = lt.renderLayout(layout_id= layout, 155 164 schema_id= 'application', 156 165 layout_mode = mode, … … 169 178 psm = "" 170 179 #set_trace() 180 if without_reg_no: 181 object['reg_no'] = reg_no 171 182 object['pin'] = str(ds.get('pin')) 172 res,psm,ds_dummy = lt.renderLayout(layout_id= 'application',183 res,psm,ds_dummy = lt.renderLayout(layout_id= layout, 173 184 schema_id= 'application', 174 185 layout_mode = mode, … … 183 194 psm = "The form has already been submitted and you are not allowed to modify the data!" 184 195 logger.info('%s/%s tried to edit submitted application record' % (member,reg_no)) 185 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',196 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout, 186 197 schema_id= 'application', 187 198 layout_mode = mode, … … 203 214 psm = "You are now assuming the applicant's role!" 204 215 logger.info('%s/%s entered application record' % (member,reg_no)) 205 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application',216 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout, 206 217 schema_id= 'application', 207 218 layout_mode = mode, … … 223 234 224 235 return context.apply_pume_form(rendered = res, 225 psm = psm, 226 #psm = "%s, %s" % (psm,ds), 227 mode = mode, 228 show_submit = passport_uploaded, 229 ds = ds, 230 ) 231 232 236 psm = psm, 237 #psm = "%s, %s" % (psm,ds), 238 mode = mode, 239 show_submit = passport_uploaded, 240 ds = ds, 241 prence = prence, 242 ) 243 244 -
WAeUP_SRP/base/skins/waeup_student/apply_pume_form.pt
r2157 r2307 15 15 <form action="" id="editForm" method="post" 16 16 enctype="multipart/form-data" class="workflow" 17 tal:attributes="action string:${context/absolute_url}/apply_pume "17 tal:attributes="action string:${context/absolute_url}/apply_pume/${options/prence}" 18 18 > 19 19 <input type="hidden" name="reg_no"
Note: See TracChangeset for help on using the changeset viewer.