Ignore:
Timestamp:
11 Feb 2020, 09:51:47 (5 years ago)
Author:
Henrik Bettermann
Message:

Some adjustments to base package.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/etranzact/browser.py

    r15937 r15999  
    5151
    5252    def update(self):
    53         # Already now it becomes an Etranzact payment. We set the net amount
    54         # and add the gateway amount.
    5553        if not webconnect_module_activated(
    5654            self.context.__parent__.__parent__.year, self.context):
    57             return _("Etranzact payments deactivated.")
     55            self.flash(_('Forbidden'), type='danger')
     56            self.redirect(self.url(self.context, '@@index'))
     57            return
     58        # Already now it becomes an Etranzact payment. We set the net amount
     59        # and add the gateway amount.
    5860        if not self.context.r_company:
    5961            self.context.net_amt = self.context.amount_auth
     
    9395
    9496    def update(self):
    95         # Already now it becomes an Etranzact payment. We set the net amount
    96         # and add the gateway amount.
    9797        if not webconnect_module_activated(
    9898            self.context.student.current_session, self.context):
    99             return _("Etranzact payments deactivated.")
     99            self.flash(_('Forbidden'), type='danger')
     100            self.redirect(self.url(self.context, '@@index'))
     101            return
     102        # Already now it becomes an Etranzact payment. We set the net amount
     103        # and add the gateway amount.
    100104        if not self.context.r_company:
    101105            self.context.net_amt = self.context.amount_auth
     
    135139        if not payoutlet_module_activated(
    136140            self.context.student.current_session, self.context):
    137             return
    138         super(EtranzactEnterPinPageStudent, self).update()
     141            self.flash(_('Forbidden'), type='danger')
     142            self.redirect(self.url(self.context, '@@index'))
     143            return
    139144        # Already now it becomes an Etranzact payment. We set the net amount
    140145        # and add the gateway amount.
     
    159164        if not payoutlet_module_activated(
    160165            self.context.__parent__.__parent__.year, self.context):
    161             return
    162         super(EtranzactEnterPinPageApplicant, self).update()
     166            self.flash(_('Forbidden'), type='danger')
     167            self.redirect(self.url(self.context, '@@index'))
     168            return
    163169        # Already now it becomes an Etranzact payment. We set the net amount
    164170        # and add the gateway amount.
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/browser.py

    r15794 r15999  
    2020import grok
    2121from kofacustom.nigeria.interswitch.browser import (
     22    module_activated,
    2223    InterswitchPaymentRequestWebservicePageApplicant,
    2324    InterswitchPaymentRequestWebservicePageStudent,
     
    6465
    6566    def update(self):
     67        if not module_activated(
     68            self.context.student.current_session, self.context):
     69            self.flash(_('Forbidden'), type='danger')
     70            self.redirect(self.url(self.context, '@@index'))
     71            return
    6672        error = self.init_update()
    6773        if error:
     
    158164
    159165    def update(self):
     166        if not module_activated(
     167            self.context.__parent__.__parent__.year, self.context):
     168            self.flash(_('Forbidden'), type='danger')
     169            self.redirect(self.url(self.context, '@@index'))
     170            return
    160171        error = self.init_update()
    161172        if error:
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r15937 r15999  
    4545    NigeriaStudentBaseEditFormPage,
    4646    NigeriaBedTicketAddPage,
    47     NigeriaAccommodationManageFormPage
     47    NigeriaAccommodationManageFormPage,
     48    NigeriaAccommodationDisplayFormPage,
    4849    )
    4950
     
    9293    #            )
    9394    #    return ()
     95
     96class CustomAccommodationDisplayFormPage(NigeriaAccommodationDisplayFormPage):
     97    """ Page to view bed tickets.
     98    """
     99    with_hostel_selection = True
    94100
    95101class CustomAccommodationManageFormPage(NigeriaAccommodationManageFormPage):
Note: See TracChangeset for help on using the changeset viewer.