Changeset 766 for WAeUP_SRP/trunk/skins
- Timestamp:
- 27 Oct 2006, 16:35:27 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r753 r766 51 51 info = context.getStudentInfo() 52 52 student = info['student'] 53 if info['review_state'] == "student_created":54 student.content_status_modify(workflow_action="enter_ application_pin")53 if info['review_state'] in ("student_created","admitted"): 54 student.content_status_modify(workflow_action="enter_clearance_pin") 55 55 wftool.doActionFor(info['app'],'open',dest_container=info['app']) 56 56 da = {} 57 57 pin = request.get('pin') 58 app_doc = info['app_doc'] 58 59 da['app_ac_pin'] = pin 59 60 da['app_ac_date'] = current 60 info['app_doc'].edit(mapping = da) 61 app_doc.edit(mapping = da) 62 dc = {} 63 dc['clr_ac_pin'] = pin 64 dc['entry_date'] = current 65 dc['session'] = "%s" % current.year() 66 dc['lga'] = app_doc.jamb_lga 67 info['clear_doc'].edit(mapping = dc) 61 68 elif "Manager" in member.getRoles(): 62 69 pass -
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r750 r766 59 59 else: 60 60 info['acco'] = None 61 res = context.portal_catalog(container_path=student_path, 62 portal_type='StudentClearance') 63 if res: 64 clear = res[0].getObject() 65 info['clear'] = clear 66 info['clear_doc'] = clear.getContent() 67 info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None) 68 else: 69 info['clear'] = None 61 70 62 71 items = [] 63 72 s_edit_links = {'StudentApplication': 'student_edit', 64 73 'StudentAccommodation': '', 74 'StudentClearance': '', 65 75 'StudentPersonal': '', 66 76 } 67 77 s_view_links = {'StudentApplication': None, 68 78 'StudentAccommodation': 'accommodation_view', 79 'StudentClearance': None, 69 80 'StudentPersonal': None, 70 81 'StudentApplication': 'application_view', -
WAeUP_SRP/trunk/skins/waeup_student/passport_entry_view.pt
r711 r766 18 18 <span tal:condition="info" 19 19 tal:define="review_state info/review_state"> 20 <h3>Upload your Passport Picture!</h3>20 <h3>Upload or Change your Passport Picture!</h3> 21 21 <br /> 22 22 <span tal:omit-tag="" tal:replace="structure rendered_main"/> -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r710 r766 9 9 # $Id$ 10 10 """ 11 Called when a document form is posted.12 13 Validates data, then:14 15 - if there's no error, updates the object and redirects to it,16 17 - if there's an error, puts data in session and redirects to edit form.18 19 A form uid is propagated during the redirect to uniquely identify the20 form in the session.21 11 """ 22 12 wftool = context.portal_workflow 23 13 from urllib import urlencode 24 14 from Products.CPSDocument.utils import getFormUidUrlArg 15 import DateTime 16 current = DateTime.DateTime() 25 17 26 18 # Until ajax posts directly to its own script... … … 38 30 app = info['app'] 39 31 app_doc = info['app_doc'] 32 clear = info['clear'] 33 clear_doc = info['clear_doc'] 40 34 state = context.getStudentInfo()['review_state'] 41 35 … … 77 71 else: 78 72 args = {} 79 student.content_status_modify(workflow_action="apply_for_admission") 80 wftool.doActionFor(app,'close',dest_container= app) 81 psm = 'You applied for admission.' 82 action = "/application_view" 73 if info['review_state'] == "student_created": 74 student.content_status_modify(workflow_action="apply_for_admission") 75 wftool.doActionFor(app,'close',dest_container= app) 76 psm = 'You applied for admission.' 77 action = "/application_view" 78 elif info['review_state'] == "clearance_pin_entered": 79 student.content_status_modify(workflow_action="request_clearance") 80 #wftool.doActionFor(info['clear'],'open',dest_container=info['clear']) 81 da = {} 82 pin = REQUEST.get('pin') 83 da['app_ac_pin'] = pin 84 da['app_ac_date'] = current 85 app_doc = info['app_doc'] 86 app_doc.edit(mapping = da) 87 dc = {} 88 dc['email'] = app_doc.appl_email 89 dc['mobil'] = app_doc.appl_mobile 90 dc['passport'] = app_doc.passport 91 info['clear_doc'].edit(mapping = dc) 92 wftool.doActionFor(app,'close',dest_container= app) 93 psm = 'You requested clearance.' 94 action = "/clearance_view" 95 else: 96 psm = '' 97 action = "/clearance_view" 98 83 99 else: 84 100 is_valid, ds = app_doc.validate(request=REQUEST, proxy=context, cluster=cluster, -
WAeUP_SRP/trunk/skins/waeup_student/student_index.py
r765 r766 32 32 if state == 'admission_applied': 33 33 return redirect("%s/application_view" % student.absolute_url()) 34 elif state == 'application_pin_entered':34 elif state in ('application_pin_entered','clearance_pin_entered'): 35 35 return redirect("%s/passport_entry_view" % student.absolute_url()) 36 elif state == 'request_clearance': 37 return redirect("%s/student_view" % info['clear'].absolute_url()) 36 38 elif context.portal_type == 'StudentStudyLevel': 37 39 return context.study_level_student_view() 38 40 return redirect("%s/student_view" % student.absolute_url()) 39 40
Note: See TracChangeset for help on using the changeset viewer.