Changeset 9862 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 11 Jan 2013, 09:03:19 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9857 r9862 1474 1474 self.redirect(self.url(self.context)) 1475 1475 1476 class PreviousPaymentAddFormPage( OnlinePaymentAddFormPage):1476 class PreviousPaymentAddFormPage(KofaAddFormPage): 1477 1477 """ Page to add an online payment ticket for previous sessions 1478 1478 """ … … 1486 1486 pnav = 4 1487 1487 1488 @property 1489 def selectable_categories(self): 1490 categories = getUtility( 1491 IKofaUtils).SELECTABLE_PREVIOUS_PAYMENT_CATEGORIES 1492 return sorted(categories.items()) 1493 1488 1494 def update(self): 1489 1495 if self.context.student.before_payment: … … 1492 1498 super(PreviousPaymentAddFormPage, self).update() 1493 1499 return 1500 1501 @action(_('Create ticket'), style='primary') 1502 def createTicket(self, **data): 1503 p_category = data['p_category'] 1504 previous_session = data.get('p_session', None) 1505 previous_level = data.get('p_level', None) 1506 student = self.context.__parent__ 1507 students_utils = getUtility(IStudentsUtils) 1508 error, payment = students_utils.setPaymentDetails( 1509 p_category, student, previous_session, previous_level) 1510 if error is not None: 1511 self.flash(error) 1512 return 1513 self.context[payment.p_id] = payment 1514 self.flash(_('Payment ticket created.')) 1515 self.redirect(self.url(self.context)) 1516 return 1517 1518 @action(_('Cancel'), validator=NullValidator) 1519 def cancel(self, **data): 1520 self.redirect(self.url(self.context)) 1494 1521 1495 1522 class OnlinePaymentDisplayFormPage(KofaDisplayFormPage): -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r9730 r9862 162 162 163 163 SELECTABLE_PAYMENT_CATEGORIES = PAYMENT_CATEGORIES 164 165 SELECTABLE_PREVIOUS_PAYMENT_CATEGORIES = SELECTABLE_PAYMENT_CATEGORIES 164 166 165 167 MODE_GROUPS = {
Note: See TracChangeset for help on using the changeset viewer.