Changeset 3426 for WAeUP_SRP/base/skins/waeup_student
- Timestamp:
- 7 Apr 2008, 10:42:13 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_student
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/apply_admission.py
r3416 r3426 29 29 request = REQUEST 30 30 31 manage = "manage" in request.keys()31 #manage = "manage" in request.keys() 32 32 screening_types = ('prence','pume','pce','pde','cest','sandwich') 33 if not (traverse_subpath and traverse_subpath[0] in screening_types) and not manage:33 if not (traverse_subpath and traverse_subpath[0] in screening_types): 34 34 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 35 35 configuration = [] … … 102 102 mode = request.get('mode','') 103 103 if not mode: 104 if apply_admission or edit or manage:104 if apply_admission or edit: 105 105 mode = "edit" 106 106 elif slip: … … 110 110 validate = create or edit or apply_admission 111 111 112 if manage:113 validate = False114 112 without_reg_no = False 115 113 … … 177 175 submitted = True 178 176 # cannot happen anymore but anyway 179 if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):180 logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))181 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())177 #if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()): 178 # logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin)) 179 # return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 182 180 183 181 #rerender with current object = application-record 184 182 185 183 if slip: 186 184 mode = "view_slip" 187 185 logger.info('%s/%s views application slip' % (member,reg_no)) 188 186 189 187 res,psm,ds = lt.renderLayout(layout_id= layout, 190 188 schema_id= 'import_application', … … 201 199 ds = ds, 202 200 info = info, 203 ) 204 201 ) 202 205 203 if psm == 'invalid': 206 204 return context.apply_admission_form(rendered = res, … … 224 222 data[field] = dm.get(field) 225 223 data['reg_no'] = reg_no 226 if manage: 227 if submitted: 228 mode = "view" 229 psm = "You are now assuming the applicant's role!" 230 logger.info('%s/%s entered application record' % (member,reg_no)) 231 # res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout, 232 # schema_id= 'import_application', 233 # layout_mode = mode, 234 # context=context, 235 # mapping={}, 236 # ob=object, 237 # commit = False, 238 # ) 239 else: 240 mode = "edit" 241 psm = "You are now assuming the applicant's role!" 242 logger.info('%s/%s entered application record' % (member,reg_no)) 243 elif apply_admission: 224 225 if apply_admission: 244 226 if submitted: 245 227 mode = "view" -
WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt
r3421 r3426 41 41 <div tal:replace="structure rendered_main" /> 42 42 43 <metal:block tal:condition="python: show_submit and mode == 'edit' ">43 <metal:block tal:condition="python: show_submit and mode == 'edit' and not expired"> 44 44 <br/> 45 45 <input type="checkbox" class="standalone" … … 55 55 name="edit" 56 56 value="Save" 57 tal:condition="python: mode == 'edit' and not expired" />57 tal:condition="python: mode == 'edit'" /> 58 58 <input type="submit" class="standalone" name="apply" 59 59 value="Final Submit"
Note: See TracChangeset for help on using the changeset viewer.