Changeset 14835


Ignore:
Timestamp:
4 Sep 2017, 16:50:20 (7 years ago)
Author:
Henrik Bettermann
Message:

Show ExportJUPEBResultSlip only if flash notice contains 'results'.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r14834 r14835  
    296296        return """
    297297<br /><br /><br /><br /><font size='12'>
    298 Your JUPEB results are as follows:
    299 <br /><br />
    300298<strong>%s</strong>
    301299</font>
     
    309307
    310308    def update(self):
    311         if not self.context.flash_notice or self.context.faccode != 'JUPEB':
     309        if not self.context.flash_notice or self.context.faccode != 'JUPEB' \
     310            or not 'results' in self.context.flash_notice.lower():
    312311            self.flash(_('Forbidden'), type="warning")
    313312            self.redirect(self.url(self.context))
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r14834 r14835  
    122122    @property
    123123    def target_url(self):
    124         if self.context.flash_notice and self.context.faccode == 'JUPEB':
     124        if self.context.flash_notice and self.context.faccode == 'JUPEB' \
     125            and 'results' in self.context.flash_notice.lower():
    125126            return self.view.url(self.view.context, self.target)
    126127        return False
Note: See TracChangeset for help on using the changeset viewer.