Changeset 479 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 5 Sep 2006, 13:20:18 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/application_form.pt
r478 r479 11 11 12 12 <metal:block fill-slot="main"> 13 14 <tal:block tal:condition="python:context.portal_type == 'Student'" tal:omit-tag=""> 15 <tal:block tal:define=" 16 rendered python:context.application.getContent().renderEdit(layout_id='student_application_fe', 17 layout_mode='edit');" 18 > 19 20 13 <tal:block 14 tal:define="rendered python:context.getContent().renderEdit( 15 layout_id='student_application_fe', 16 layout_mode='edit', 17 );"> 21 18 <tal:block tal:content="structure rendered" /> 22 23 19 </tal:block> 24 </tal:block>25 <tal:block condition="python:context.portal_type != 'Student'">26 27 This is not a student object28 29 30 </tal:block>31 32 20 </metal:block> 33 34 35 36 21 <metal:block fill-slot="sub"> 37 22 </metal:block> -
WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
r478 r479 5 5 return html renderer + psm 6 6 """ 7 import DateTime8 current = DateTime.DateTime()9 10 7 type_name = 'StudentApplication' 11 12 8 ti = context.portal_types[type_name] 13 14 9 REQUEST.set('type_name',type_name) 15 10 16 11 validate = REQUEST.has_key("cpsdocument_create_button") 17 12 18 19 13 lt = context.portal_layouts 20 14 pr = context.portal_registration 21 15 22 res,psm,ds = lt.renderLayout(layout_id= 'student_check_pin', 23 schema_id= 'student_check_pin', 16 prefix = 'APP' 17 res,psm,ds = lt.renderLayout(layout_id= 'student_application_fe', 18 schema_id= 'student_application', 24 19 context=context, 25 20 mapping=validate and REQUEST, 26 ob={ },21 ob={'app_ac_prefix': prefix}, 27 22 layout_mode='create', 28 23 formaction = "apply_admission", … … 60 55 student = application.aq_parent 61 56 if context.portal_workflow.getInfoFor(student,'review_state',None) == "created": 62 student.invokeFactory('StudentClearance','clearance')57 #student.invokeFactory('StudentClearance','clearance') 63 58 student.invokeFactory('StudentPersonal','personal') 64 59 student.content_status_modify(workflow_action="enter_application_pin") 60 65 61 66 62 apdoc = application.getContent() … … 80 76 student.personal.getContent().edit(mapping = dp) 81 77 da = {} 82 da['app_ac_pin'] = ds['pin'] 78 da['app_ac_prefix'] = prefix 79 da['app_ac_batch_no'] = ds.get('app_ac_batch_no') 80 da['app_ac_pin'] = ds.get('app_ac_pin') 83 81 apdoc.edit(mapping = da) 84 82 # now display the passport form with jamb-data readonly 83 return context.REQUEST.RESPONSE.redirect("%s/application_form" % (student.application.absolute_url())) 85 84 return student.application_form() 86 85 -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r478 r479 35 35 # (We don't call getEditableContent here, validate does it when needed.) 36 36 doc = context.getContent() 37 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,38 use_session=True)39 37 40 if action is None: 41 ti = doc.getTypeInfo() 42 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 43 action = '/' + action 44 45 if is_valid: 46 comments = REQUEST.get('comments') 47 context.cpsdocument_notify_modification(comments=comments) 48 if cpsdocument_edit_and_view_button is not None: 49 action = '' 50 psm = 'psm_content_changed' 51 args = {} 38 if context.portal_type == "StudentApplication": 39 student = context.aq_parent 40 if context.portal_workflow.getInfoFor(student,'review_state',None) == "application_pin_entered": 41 student.content_status_modify(workflow_action="apply_for_admission") 42 is_valid, ds = doc.validate(request=REQUEST, 43 proxy=context, 44 layout_id = "student_application_fe", 45 layout_mode = 'edit', 46 use_session=True) 47 48 action = '/application_form' 49 50 if is_valid: 51 comments = REQUEST.get('comments') 52 context.cpsdocument_notify_modification(comments=comments) 53 if cpsdocument_edit_and_view_button is not None: 54 action = '' 55 psm = 'psm_content_changed' 56 args = {} 57 else: 58 psm = 'psm_content_error' 59 args = getFormUidUrlArg(REQUEST) 60 else: 61 psm = "Application applied waiting for results" 62 action = "/view" 52 63 else: 53 psm = 'psm_content_error' 54 args = getFormUidUrlArg(REQUEST) 55 64 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster, 65 use_session=True) 66 67 if action is None: 68 ti = doc.getTypeInfo() 69 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 70 action = '/' + action 71 72 if is_valid: 73 comments = REQUEST.get('comments') 74 context.cpsdocument_notify_modification(comments=comments) 75 if cpsdocument_edit_and_view_button is not None: 76 action = '' 77 psm = 'psm_content_changed' 78 args = {} 79 else: 80 psm = 'psm_content_error' 81 args = getFormUidUrlArg(REQUEST) 82 56 83 args['portal_status_message'] = psm 57 84 url = context.absolute_url() + action + '?' + urlencode(args)
Note: See TracChangeset for help on using the changeset viewer.