Ignore:
Timestamp:
2 Apr 2015, 16:06:57 (10 years ago)
Author:
Henrik Bettermann
Message:

Move signatures into footer.

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

    r12845 r12846  
    123123        'phone', 'adm_code', 'email', 'date_of_birth')
    124124
    125     def _signatures(self):
     125    def _sigsInFooter(self):
    126126        isStudent = getattr(
    127127            self.request.principal, 'user_type', None) == 'student'
    128128        if not isStudent and self.context.state in (CLEARED, RETURNING):
    129             return ([_('Student Signature')],
    130                     [_('Clearance Officer Signature')])
    131         return
     129            return (_('Date, Student Signature'),
     130                    _('Date, Clearance Officer Signature'),
     131                    )
     132        return ()
    132133
    133134    def render(self):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r12845 r12846  
    9797        self.assertMatches('...First Sitting Record...',
    9898                           self.browser.contents)
     99        # We want to see the signature fields.
     100        IWorkflowState(self.student).setState('returning')
    99101        self.browser.open(self.student_path + '/clearance_slip.pdf')
    100102        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    101103        self.assertEqual(self.browser.headers['Content-Type'],
    102104                         'application/pdf')
     105        path = os.path.join(samples_dir(), 'clearance_slip.pdf')
     106        open(path, 'wb').write(self.browser.contents)
     107        print "Sample PDF clearance_slip.pdf written to %s" % path
    103108
    104109    def test_student_access(self):
Note: See TracChangeset for help on using the changeset viewer.