Changeset 2323 for WAeUP_SRP/base
- Timestamp:
- 6 Oct 2007, 16:50:28 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Widgets.py
r2307 r2323 1396 1396 break 1397 1397 if ok >= 1: 1398 application_type = self.REQUEST.form.get('application_type','unknown') 1398 1399 if self.isStudent(): 1399 1400 err = "This is only for Pume application." … … 1407 1408 d['reg_no'] = applicant.reg_no 1408 1409 d['pin'] = pin_str 1410 d['application_type'] = application_type 1409 1411 d['status'] = 'entered' 1410 1412 getattr(self,self.catalog).modifyRecord(**d) … … 1422 1424 d['pin'] = pin_str 1423 1425 d['status'] = 'entered' 1426 d['application_type'] = application_type 1424 1427 self.applicants_catalog.addRecord(**d) 1425 1428 else: -
WAeUP_SRP/base/skins/waeup_student/apply_admission.py
r2322 r2323 51 51 #application_type = "" 52 52 without_reg_no = False 53 if traverse_subpath and traverse_subpath[0] == "prence": 54 layout = "application_prence" 55 application_type = "prence" 56 without_reg_no = True 57 elif traverse_subpath and traverse_subpath[0] == "pume": 58 layout = "application_pume" 59 application_type = "pume" 60 elif traverse_subpath and traverse_subpath[0] == "pce": 61 layout = "application_pce" 62 application_type = "pce" 63 elif traverse_subpath and traverse_subpath[0] == "pde": 64 layout = "application_pde" 65 application_type = "pde" 66 elif traverse_subpath and traverse_subpath[0] == "cest": 67 layout = "application_cest" 68 application_type = "cest" 53 54 # if traverse_subpath and traverse_subpath[0] == "prence": 55 # layout = "application_prence" 56 # application_type = "prence" 57 # without_reg_no = True 58 # elif traverse_subpath and traverse_subpath[0] == "pume": 59 # layout = "application_pume" 60 # application_type = "pume" 61 # elif traverse_subpath and traverse_subpath[0] == "pce": 62 # layout = "application_pce" 63 # application_type = "pce" 64 # elif traverse_subpath and traverse_subpath[0] == "pde": 65 # layout = "application_pde" 66 # application_type = "pde" 67 # elif traverse_subpath and traverse_subpath[0] == "cest": 68 # layout = "application_cest" 69 # application_type = "cest" 70 # else: 71 # return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 72 application_types = ('prence','pume','pce','pde','cest') 73 headings = {} 74 headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! ' 75 headings['pde'] = 'Apply for Post DE Screening Test(2007/2008)! ' 76 headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! ' 77 headings['pce'] = 'Apply for PCE Screening (2007/2008)! ' 78 headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! ' 79 info = {} 80 if traverse_subpath and traverse_subpath[0] in application_types: 81 application_type = info['application_type'] = traverse_subpath[0] 82 info['heading'] = headings[application_type] 83 layout = "application_%s" % application_type 84 without_reg_no = application_type in ('prence',) 85 69 86 else: 70 87 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 71 72 73 88 lt = context.portal_layouts 74 89 75 90 pin = request.form.get('pin','') 76 77 78 91 reg_no = request.get('widget__reg_no','').upper() 79 92 if not reg_no: … … 97 110 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 98 111 99 100 112 # For the next application session it should be reverted to 101 113 # (see comment 09/06/07 16:40:52 in ticket #328): … … 117 129 commit = False, 118 130 ) 119 120 121 122 131 if slip: 123 132 return context.apply_admission_slip(rendered = res, 124 psm = "", 125 #psm = "%s, %s" % (psm,ds), 126 mode = mode, 127 ds = ds, 128 application_type = application_type, 129 ) 130 133 psm = "", 134 mode = mode, 135 ds = ds, 136 info = info, 137 ) 131 138 if psm == 'invalid': 132 139 return context.apply_admission_form(rendered = res, 133 psm = "Please correct your input!", 134 #psm = "%s, %s" % (psm,ds), 135 mode = mode, 136 ds = ds, 137 application_type = application_type, 138 ) 140 psm = "Please correct your input!", 141 mode = mode, 142 ds = ds, 143 info = info, 144 ) 139 145 elif psm == '' and not manage: 140 146 return context.apply_admission_form(rendered = res, 141 psm = psm,142 ds = ds,143 mode = mode,144 application_type = application_type,145 )146 elif psm == 'valid' or (psm == '' and manage):147 pass147 psm = psm, 148 ds = ds, 149 mode = mode, 150 info = info, 151 ) 152 # elif psm == 'valid' or (psm == '' and manage): 153 # pass 148 154 if without_reg_no: 149 155 reg_no = ds.get('reg_no') 150 151 152 156 data = {} 153 157 dm = ds.getDataModel() … … 157 161 data['reg_no'] = reg_no 158 162 data['screening_type'] = application_type 159 160 161 162 163 if apply_admission: 163 164 if submitted: … … 263 264 264 265 return context.apply_admission_form(rendered = res, 265 psm = psm, 266 #psm = "%s, %s" % (psm,ds), 267 mode = mode, 268 show_submit = passport_uploaded, 269 ds = ds, 270 application_type = application_type, 266 psm = psm, 267 mode = mode, 268 show_submit = passport_uploaded, 269 ds = ds, 270 info = info, 271 271 ) 272 273 -
WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt
r2322 r2323 2 2 portal_status_message options/psm; 3 3 ds options/ds; 4 application_type options/application_type;5 4 mode options/mode; 6 5 expired python:False; 7 6 show_submit options/show_submit|nothing; 7 info options/info; 8 8 " 9 9 > … … 12 12 <metal:block fill-slot="main"> 13 13 <span tal:condition="python:not mode=='view' and not expired"> 14 <h3 tal:condition="python:application_type=='pume'">Apply for Post UME Screening Test (2007/2008)! </h3> 15 <h3 tal:condition="python:application_type=='pde'">Apply for Post DE Screening Test(2007/2008)! </h3> 16 <h3 tal:condition="python:application_type=='prence'">Apply for Pre-NCE Programme (2007/2008)! </h3> 17 <h3 tal:condition="python:application_type=='pce'">Apply for PCE Screening (2007/2008)! </h3> 18 <h3 tal:condition="python:application_type=='cest'">Apply for Common Entrance Screening Test (2007/2008)! </h3> 14 <h3 tal:content="info/heading" /> 19 15 </span> 20 16 <span tal:condition="expired"> … … 26 22 <form action="" id="editForm" method="post" 27 23 enctype="multipart/form-data" class="workflow" 28 tal:attributes="action string:${context/absolute_url}/apply_admission/${ application_type}"24 tal:attributes="action string:${context/absolute_url}/apply_admission/${info/application_type}" 29 25 > 26 <input type="hidden" name="application_type" 27 tal:attributes="value info/application_type|nothing" 28 tal:condition="info/application_type|nothing"/> 30 29 <input type="hidden" name="reg_no" 31 30 tal:attributes="value ds/reg_no|nothing" … … 66 65 <p>Instructions :</p> 67 66 <ul> 68 <li>Enter your <span tal:condition="python:not application_type=='prence'">JAMB Registration Number and the</span> Application PIN.</li>67 <li>Enter your <span tal:condition="python:not info['application_type']=='prence'">JAMB Registration Number and the</span> Application PIN.</li> 69 68 <li>Fill the form and upload your Passport Photograph with red background in jpg format.</li> 70 69 <li>Save and preview picture.
Note: See TracChangeset for help on using the changeset viewer.