- Timestamp:
- 10 Jan 2016, 09:13:17 (9 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r13570 r13574 4 4 1.3.4.dev0 (unreleased) 5 5 ======================= 6 7 * Configure transfer payments and let students enter their desired 8 study course. Save entered text in p_item attribute. 6 9 7 10 * Add further permissions to the local ApplicationsManager role and -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r13394 r13574 819 819 ) 820 820 821 transfer_fee = schema.Float( 822 title = _(u'Transfer Fee'), 823 default = 0.0, 824 required = False, 825 ) 826 821 827 def getSessionString(): 822 828 """Return the session string from the vocabulary. -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13570 r13574 1739 1739 self.flash(error, type="danger") 1740 1740 return 1741 if p_category == 'transfer': 1742 payment.p_item = self.request.form['new_programme'] 1741 1743 self.context[payment.p_id] = payment 1742 1744 self.flash(_('Payment ticket created.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt
r11254 r13574 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 2 enctype="multipart/form-data"> 3 <table class="form-table"> 4 <tbody> 5 <tr> 6 <td class="fieldname"> 7 <span>Payment Category</span>: 8 </td> 9 <td> 10 <select id="form.p_category" name="form.p_category" size="1" 11 class="form-control half"> 12 <option tal:repeat="item view/selectable_categories" 13 tal:attributes="value python:item[0]"> 14 <span tal:replace="python:item[1]">FEE CATEGORY</span> 15 </option> 16 </select> 17 </td> 18 </tr> 19 </tbody> 20 </table> 3 4 <label for="p_cat" i18n:translate=""> 5 Payment Category: 6 </label> 7 <select id="form.p_category" name="form.p_category" size="1" 8 class="form-control half" onclick="test()"> 9 <option tal:repeat="item view/selectable_categories" 10 tal:attributes="value python:item[0]"> 11 <span tal:replace="python:item[1]">FEE CATEGORY</span> 12 </option> 13 </select> 14 15 <span id="new_programme" style="display: none;"> 16 <br /> 17 <label for="new_programme" i18n:translate=""> 18 Desired Course of Study: 19 </label> 20 <input class="textType" id="new_programme" name="new_programme" 21 type="text"> 22 </span> 23 <br /> 21 24 <div tal:condition="view/availableActions"> 22 25 <input tal:repeat="action view/actions" … … 25 28 </div> 26 29 </form> 30 31 <script type="text/javascript"> 32 function test() { 33 if (document.getElementById('form.p_category').value == 'transfer') { 34 document.getElementById('new_programme').style.display = 'block'; 35 } else { 36 document.getElementById('new_programme').style.display = 'none'; 37 } 38 } 39 </script> -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13492 r13574 196 196 configuration.booking_fee = 123.4 197 197 configuration.maint_fee = 987.0 198 configuration.transfer_fee = 456.0 198 199 configuration.late_registration_fee = 345.0 199 200 self.app['configuration'].addSessionConfiguration(configuration) … … 1062 1063 self.assertEqual(ac.cost, 4567.0) 1063 1064 return 1065 1066 def test_add_transfer_payment(self): 1067 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1068 self.browser.open(self.payments_path) 1069 self.browser.getLink("Add current session payment ticket").click() 1070 self.browser.getControl(name="form.p_category").value = ['transfer'] 1071 self.browser.getControl(name="new_programme").value = 'my new study course' 1072 self.browser.getControl("Create ticket").click() 1073 self.assertMatches('...ticket created...', 1074 self.browser.contents) 1075 ctrl = self.browser.getControl(name='val_id') 1076 value = ctrl.options[0] 1077 self.browser.getLink(value).click() 1078 self.assertMatches('...my new study course...', 1079 self.browser.contents) 1080 self.assertEqual(self.student['payments'][value].p_item, u'my new study course') 1064 1081 1065 1082 def test_manage_payments_bypass_ac_creation(self): -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r13505 r13574 465 465 elif category == 'transcript': 466 466 amount = academic_session.transcript_fee 467 elif category == 'transfer': 468 amount = academic_session.transfer_fee 467 469 elif category == 'late_registration': 468 470 amount = academic_session.late_registration_fee
Note: See TracChangeset for help on using the changeset viewer.