Changeset 2739
- Timestamp:
- 22 Nov 2007, 10:30:31 (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
r2670 r2739 29 29 request = REQUEST 30 30 31 manage = "manage" in request.keys() 32 screening_types = ('prence','pume','pce','pde','cest','pt') 33 if not (traverse_subpath and traverse_subpath[0] in screening_types) and not manage: 34 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 35 configuration = [] 36 headings = {} 37 headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! ' 38 headings['pde'] = 'Apply for Post UDE Screening Test (2007/2008)! ' 39 headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! ' 40 headings['pce'] = 'Apply for PCE Screening (2007/2008)! ' 41 headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! ' 42 headings['pt'] = 'Apply for Part Time ' 43 44 configuration += ('heading',headings), 45 headings_slip = {} 46 headings_slip['pume'] = 'Post UME Screening (2007/2008) Aknowledgement Slip!' 47 headings_slip['pde'] = 'Post UDE Screening (2007/2008) Aknowledgement Slip' 48 headings_slip['prence'] = 'Pre-NCE Application (2007/2008) Aknowledgement Slip' 49 headings_slip['pce'] = 'PCE Screening (2007/2008) Aknowledgement Slip' 50 headings_slip['cest'] = 'Common Entrance Screening (2007/2008) Aknowledgement Slip' 51 headings_slip['pt'] = 'Part Time (2007/2008) Aknowledgement Slip' 52 configuration += ('heading_slip',headings_slip), 53 54 deaddates = {} 55 deaddates['pume'] = DateTime.DateTime('2007/08/12 23:59') 56 deaddates['pde'] = DateTime.DateTime('2007/11/04 23:59') 57 deaddates['prence'] = DateTime.DateTime('2007/8/12 23:59') 58 deaddates['pce'] = DateTime.DateTime('2007/8/12 23:59') 59 deaddates['cest'] = DateTime.DateTime('2007/8/12 23:59') 60 deaddates['pt'] = DateTime.DateTime('2007/12/24 23:59') 61 configuration += ('deaddate',deaddates), 62 63 deadline = {} 64 #deadline['pume'] = '[Date of PUME Deadline]' 65 for sct in screening_types: 66 deadline[sct] = deaddates[sct].strftime('%A, %d. %B %Y') 67 # deadline['pde'] = 'Sunday, 4th November 2007' 68 # deadline['prence'] = '[Date of PRENCE Deadline]' 69 # deadline['pce'] = '[Date of PCE Deadline]' 70 # deadline['cest'] = '[Date of CEST Deadline]' 71 # deadline['pt'] = '[Date of PT Deadline]' 72 configuration += ('deadline',deadline), 73 74 confirm = {} 75 confirm['pume'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me." 76 confirm['pde'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me." 77 confirm['prence'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me." 78 confirm['pce'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me." 79 confirm['cest'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me." 80 confirm['pt'] = """I hereby acknowledge by ticking this check box that if it is discovered 81 at any time, that I do not possess any of the qualifications, which I have obtained, I will be 82 expelled from the University and shall not be readmitted for the same or any other programme, 83 even if I have upgraded my previous qualification or posses additional qualifications.""" 84 configuration += ('confirm',confirm), 85 31 86 #type_name = 'StudentApplication' 32 87 #ti = context.portal_types[type_name] … … 34 89 create = "create" in request.keys() 35 90 apply_admission = "apply" in request.keys() 36 edit = "edit" in request.keys() 91 edit = "edit" in request.keys() or "cpsdocument_edit_button" in request.form.keys() 37 92 slip = "slip" in request.keys() 38 manage = "manage" in request.keys()39 93 submitted = False 40 94 mode = request.get('mode','') … … 83 137 84 138 85 screening_types = ('prence','pume','pce','pde','cest')86 headings = {}87 headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! '88 headings['pde'] = 'Apply for Post UDE Screening Test (2007/2008)! '89 headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! '90 headings['pce'] = 'Apply for PCE Screening (2007/2008)! '91 headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! '92 headings_slip = {}93 headings_slip['pume'] = 'Post UME Screening (2007/2008) Aknowledgement Slip!'94 headings_slip['pde'] = 'Post UDE Screening (2007/2008) Aknowledgement Slip'95 headings_slip['prence'] = 'Pre-NCE Application (2007/2008) Aknowledgement Slip'96 headings_slip['pce'] = 'PCE Screening (2007/2008) Aknowledgement Slip'97 headings_slip['cest'] = 'Common Entrance Screening (2007/2008) Aknowledgement Slip'98 99 deadline = {}100 deadline['pume'] = '[Date of PUME Deadline]'101 deadline['pde'] = 'Sunday, 4th November 2007'102 deadline['prence'] = '[Date of PRENCE Deadline]'103 deadline['pce'] = '[Date of PCE Deadline]'104 deadline['cest'] = '[Date of CEST Deadline]'105 139 106 140 info = {} 107 141 108 142 info['status'] = object.get('status','') 109 110 143 if traverse_subpath and traverse_subpath[0] in screening_types: 111 144 screening_type = info['screening_type'] = traverse_subpath[0] 112 info['heading'] = headings[screening_type]113 info['heading_slip'] = headings_slip[screening_type]114 info['deadline'] = deadline[screening_type]115 layout = "application_%s" % screening_type116 without_reg_no = screening_type in ('prence',)117 145 elif manage: 118 146 if object['screening_type']: … … 121 149 st = 'pume' 122 150 screening_type = info['screening_type'] = st 123 info['heading'] = headings[screening_type] 124 info['heading_slip'] = headings_slip[screening_type] 125 info['deadline'] = deadline[screening_type] 126 layout = "application_%s" % screening_type 127 without_reg_no = screening_type in ('prence',) 128 else: 129 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 151 152 for co_name,co_dict in configuration: 153 info[co_name] = co_dict[screening_type] 154 layout = "application_%s" % screening_type 155 without_reg_no = screening_type in ('prence','pt') 156 info['expired'] = current.greaterThan(deaddates[screening_type]) 130 157 131 158 … … 173 200 data[field] = dm.get(field) 174 201 data['reg_no'] = reg_no 175 176 202 if apply_admission: 177 203 if submitted: … … 232 258 ) 233 259 elif edit: 260 #set_trace() 234 261 if submitted: 235 262 mode = "view" -
WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt
r2670 r2739 5 5 show_submit options/show_submit|nothing; 6 6 info options/info; 7 expired python:not info['screening_type'] in ('pce','prence');7 expired info/expired; 8 8 venue_display python:info['screening_type']=='pde'; 9 9 deadline info/deadline … … 44 44 value="" 45 45 /> 46 I confirm that the Passport Photograph uploaded on this form is a true picture of me.46 <span tal:replace="info/confirm" /> 47 47 <br/><br/> 48 48 </metal:block> … … 77 77 <br /> <br /> 78 78 </metal:block> 79 80 79 <metal:block tal:condition="python: mode in ('create','edit') and not expired"> 81 80 <p>Instructions :</p>
Note: See TracChangeset for help on using the changeset viewer.