Changeset 478 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 4 Sep 2006, 13:03:08 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/application_form.pt
r477 r478 10 10 </metal:block> 11 11 12 <metal:block fill-slot="main" 13 tal:define="roles member/getRoles; 14 frontend python:'Student' in roles or isAnon; 15 folder here/getContent;" 16 > 12 <metal:block fill-slot="main"> 17 13 18 14 <tal:block tal:condition="python:context.portal_type == 'Student'" tal:omit-tag=""> 19 15 <tal:block tal:define=" 20 appl python:here.application;21 appl_proxy python:appl.getContent();"16 rendered python:context.application.getContent().renderEdit(layout_id='student_application_fe', 17 layout_mode='edit');" 22 18 > 23 19 24 <h2>Application Form for <span tal:content="appl_proxy/jamb_firstname" /> <span tal:content="appl_proxy/jamb_lastname" /></h2>25 20 26 <tal:block tal:content="structure python:appl_proxy.renderEdit(request=request, layout_id='student_application_fe', proxy=appl_proxy, layout_mode='edit')" /> 27 28 <tal:block tal:content="structure python:appl_proxy.renderEdit(layout_id='student_application_fe', layout_mode='view')" /> 29 30 <tal:block tal:content="structure python:appl_proxy.render(layout_id='student_application_fe')" /> 21 <tal:block tal:content="structure rendered" /> 31 22 32 23 </tal:block> … … 34 25 <tal:block condition="python:context.portal_type != 'Student'"> 35 26 36 This is not a student object! 27 This is not a student object 28 37 29 38 30 </tal:block> -
WAeUP_SRP/trunk/skins/waeup_student/application_pin_form.pt
r476 r478 18 18 <p>Instructions :</p> 19 19 <ul> 20 <li>Buy an Appli cation Scratch Card.</li>20 <li>Buy an Appliiication Scratch Card.</li> 21 21 <li>Enter your JAMB registration number and the Application PIN above.</li> 22 22 <li>Upload your passport picture.</li> -
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r477 r478 14 14 REQUEST.set('type_name',type_name) 15 15 16 validate = REQUEST.has_key("cpsdocument_ edit_button")16 validate = REQUEST.has_key("cpsdocument_create_button") 17 17 18 18 … … 21 21 22 22 res,psm,ds = lt.renderLayout(layout_id= 'student_check_pin', 23 schema_id= 'student_ application',23 schema_id= 'student_check_pin', 24 24 context=context, 25 25 mapping=validate and REQUEST, … … 31 31 if psm == 'invalid': 32 32 return context.application_pin_form(rendered = res, 33 psm = "Please correct your input", 33 #psm = "Please correct your input", 34 psm = "psm : #%s#" % (psm,), 35 firstlayout = True, 36 lastlayout = True, 34 37 ds = ds, 35 38 ) … … 37 40 return context.application_pin_form(rendered = res, 38 41 psm = None, 42 firstlayout = True, 43 lastlayout = True, 39 44 ds = ds, 40 45 ) 41 46 elif psm == 'valid': 42 jamb_id = ds.get('jamb_ id')47 jamb_id = ds.get('jamb_reg_no') 43 48 catalog = context.portal_catalog 44 49 search = catalog({'meta_type': 'StudentApplication', … … 54 59 application = search[0].getObject() 55 60 student = application.aq_parent 56 student.invokeFactory('StudentClearance','clearance') 57 student.invokeFactory('StudentPersonal','personal') 61 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 62 student.invokeFactory('StudentClearance','clearance') 63 student.invokeFactory('StudentPersonal','personal') 64 student.content_status_modify(workflow_action="enter_application_pin") 65 66 apdoc = application.getContent() 67 names = apdoc.jamb_lastname.split() 68 dp = {} 69 if len(names) == 3: 70 dp['firstname'] = names[0].capitalize() 71 dp['middlename'] = names[1].capitalize() 72 dp['lastname'] = names[2].capitalize() 73 elif len(names) == 2: 74 dp['firstname'] = names[0].capitalize() 75 dp['lastname'] = names[1].capitalize() 76 else: 77 dp['lastname'] = apdoc.jamb_lastname 78 dp['sex'] = apdoc.jamb_sex == 'M' 79 dp['lga'] = "%s/%s" % (apdoc.jamb_state,apdoc.jamb_lga ) 80 student.personal.getContent().edit(mapping = dp) 81 da = {} 82 da['app_ac_pin'] = ds['pin'] 83 apdoc.edit(mapping = da) 58 84 # now display the passport form with jamb-data readonly 59 85 return student.application_form()
Note: See TracChangeset for help on using the changeset viewer.