- Timestamp:
- 19 Jan 2007, 18:14:23 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts/student_transfer.xml
r1319 r1327 34 34 <table> 35 35 <row> 36 <cell name="transfer_type"/>37 </row>38 <row>39 36 <cell name="pin"/> 40 37 </row> -
WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
r1321 r1327 26 26 student = getattr(students,student_id) 27 27 sbrain = context.students_catalog(id=student_id)[0] 28 28 payments = getattr(student,'payments').objectIds() 29 payed = False 30 for payment in payments: 31 if payment.startswith('transfer'): 32 payed = True 33 break 34 if payed: 35 return context.request_transfer_form(rendered = None, 36 psm = None, 37 payed = True, 38 ) 39 29 40 validate = request.has_key("cpsdocument_create_button") 30 41 res,psm,ds = lt.renderLayout(layout_id= 'student_transfer', … … 64 75 info = {} 65 76 order_id = ds.get('pin_n') 66 p_id = " p%s" % order_id77 p_id = "transfer_%s" % order_id 67 78 now = DateTime.DateTime() 68 79 info['date'] = now 69 80 info['amount'] = "n/a" 70 81 pin = info['order_id'] = ds.get('pin') 71 info['type_code'] = " %s" % pin82 info['type_code'] = "transfer_%s" % pin 72 83 info['type_description'] = 'Transfer Form SC %s' % pin 73 84 payments.invokeFactory('Payment', p_id) … … 77 88 payment.getContent().edit(mapping=info) 78 89 wftool.doActionFor(payment,'close') 79 url = "%s/payments" % (student.absolute_url()) 80 request.RESPONSE.redirect(url) 90 return context.request_transfer_form(rendered = None, 91 psm = None, 92 payed = True, 93 ) 81 94 -
WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt
r1319 r1327 1 1 <tal:block define="rendered_main options/rendered; 2 2 portal_status_message options/psm; 3 data_storage options/ds;3 payed options/payed|nothing; 4 4 edition python:1;" 5 5 > … … 13 13 </metal:block> 14 14 <metal:block fill-slot="main"> 15 <h3>Request a Transfer!</h3> 16 <br /> 17 <div tal:replace="structure rendered_main" /> 15 <span tal:condition="rendered_main"> 16 <h3>Request a Transfer!</h3> 17 <br /> 18 <div tal:replace="structure rendered_main" /> 19 </span> 20 <span tal:condition="payed"> 21 <a href="intra_transfer">Request an Intra Faculty Transfer</a> 22 <a href="inter_transfer">Request an Inter Faculty Transfer</a> 23 </span> 18 24 </metal:block> 19 25 <metal:block fill-slot="sub">
Note: See TracChangeset for help on using the changeset viewer.