Ignore:
Timestamp:
10 Jan 2016, 17:21:58 (9 years ago)
Author:
Henrik Bettermann
Message:

Applicants and students must be treated differently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py

    r13578 r13579  
    7676    grok.require('waeup.payApplicant')
    7777
     78    @property
     79    def target_url(self):
     80        if self.context.p_state == 'paid' \
     81            and not checkPermission('waeup.manageApplication', self.context):
     82            return ''
     83        return self.view.url(self.view.context, self.target)
     84
    7885class InterswitchPaymentRequestWebservicePageStudent(UtilityView, grok.View):
    7986    """ Request webservice view for the CollegePAY gateway
     
    9097
    9198    def update(self):
    92 
    9399        if self.context.p_state == 'waived':
    94100            self.flash(_('This ticket cannot be requeried.'), type='warning')
     
    96102        if self.context.p_state == 'paid' \
    97103            and not checkPermission('waeup.manageStudent', self.context):
    98             self.flash(_('This ticket has already been paid.'), type='warning')
     104            self.flash(_('This ticket has already been paid.'), type='danger')
    99105            return
    100106        student = self.context.student
     
    132138
    133139    def update(self):
    134         if self.context.p_state == 'paid':
     140        if self.context.p_state == 'paid' \
     141            and not checkPermission('waeup.manageApplication', self.context):
    135142            self.flash(_('This ticket has already been paid.'), type='danger')
    136143            return
Note: See TracChangeset for help on using the changeset viewer.