Changeset 2461 for WAeUP_SRP/base
- Timestamp:
- 28 Oct 2007, 16:47:34 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py
r2459 r2461 54 54 parttime = s_brain.mode.endswith('_pt') 55 55 fulltime = s_brain.mode.endswith('_ft') 56 online_payment = False57 sc_payment = False58 56 59 57 #if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'): … … 62 60 # sc_payment = True 63 61 64 info['online_payment'] = online_payment65 info['sc_payment'] = sc_payment66 info['prod_id'] = '61'67 62 session = s_brain.session 68 63 next_info = context.getNextInfo(s_brain) 69 64 info['next_session'] = next_info['next_session_id'] 70 65 info['next_session_str'] = next_info['next_session_str'] 66 info['payment_method'] = "done" 67 if next_info['next_transition'] is None and next_info['reasons']: 68 info['payment_method'] = "not_possible" 69 info['reasons'] = next_info['reasons'] 70 elif review_state == 'cleared_and_validated': 71 info['payment_method'] = "online_payment" 72 elif review_state == 'returning' and info['next_session'] != session: 73 info['payment_method'] = "sc_payment" 71 74 72 if review_state == 'cleared_and_validated': 73 online_payment = True 74 elif review_state == 'returning' and info['next_session'] != session: 75 sc_payment = True 75 info['prod_id'] = '61' 76 76 77 77 78 info['student_name'] = s_brain.name -
WAeUP_SRP/base/skins/waeup_epayment/payments_view.pt
r2153 r2461 57 57 <br /> 58 58 <div> 59 <form tal:condition=" info/online_payment"59 <form tal:condition="python: info.get('payment_method') == 'online_payment'" 60 60 tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group"> 61 61 <input type="submit" name="epayment" … … 64 64 /> 65 65 </form> 66 <form tal:condition=" info/sc_payment"66 <form tal:condition="python: info.get('payment_method') == 'sc_payment'" 67 67 tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group"> 68 68 <input type="hidden" name="paid_session" … … 75 75 /> 76 76 </form> 77 <div tal:condition="python: info.get('payment_method') == 'not_possible'"> 78 You are not able to pay your schoolfee because: <br /> 79 <ul> 80 <li tal:repeat="reason info/reasons" /> 81 </ul> 82 </div> 77 83 </div> 78 84 </span> … … 80 86 </metal:main> 81 87 </metal:body> 82 -
WAeUP_SRP/base/skins/waeup_student/getNextInfo.py
r2459 r2461 18 18 level_id = student_brain.level 19 19 review_state = student_brain.review_state 20 verdict= student_brain.verdict20 info['verdict'] = student_brain.verdict 21 21 info['next_transition'] = None 22 22 info['next_session_id'] = next_session_id = session_id 23 23 info['next_level_id'] = next_level_id = level_id 24 24 reasons = [] 25 verdicts_voc = context.portal_vocabularies.verdicts 25 26 if review_state == 'cleared_and_validated': 26 27 info['next_transition'] = "pay_school_fee" … … 32 33 if verdict not in ('A','B',): 33 34 info['next_level_id'] = level_id 34 35 if not verdict: 36 reasons += "There is no verdict." 37 else: 38 reasons += "Your are not a %s" % verdicts_voc.get('A') 39 reasons += "or not a %s" % verdicts_voc.get('B') 40 else: 41 info['next_transition'] = "pay_school_fee" 42 info['reasons'] = reasons 35 43 info['next_session_str'] = context.sessions_voc(next_session_id) 36 44
Note: See TracChangeset for help on using the changeset viewer.