Changeset 10896


Ignore:
Timestamp:
12 Jan 2014, 21:08:08 (11 years ago)
Author:
Henrik Bettermann
Message:

Merge with trunk.

Location:
main/waeup.kofa/branches/0.2/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/0.2/src/waeup/kofa/applicants/browser.py

    r10845 r10896  
    550550            IWorkflowState(self.context).getState() == INITIALIZED:
    551551            IWorkflowInfo(self.context).fireTransition('start')
     552        if usertype == 'applicant' and self.context.state == 'created':
     553            msg = _(
     554                '\n <strong>Congratulations!</strong>' +
     555                ' You have been provisionally admitted' +
     556                ' and your student record has been created for you.' +
     557                ' Logout again and proceed to the login page of the portal.' +
     558                ' Then enter your new student credentials:' +
     559                ' user name= ${a}, password = ${b}.' +
     560                ' Change your password when you have logged in.',
     561                mapping = {
     562                    'a':self.context.student_id,
     563                    'b':self.context.application_number}
     564                )
     565            self.flash(msg)
    552566        return
    553567
  • main/waeup.kofa/branches/0.2/src/waeup/kofa/applicants/tests/test_browser.py

    r10874 r10896  
    566566        return
    567567
     568    def test_message_for_created(self):
     569        IWorkflowState(self.applicant).setState('created')
     570        self.applicant.student_id = u'my id'
     571        self.browser.open(self.login_path)
     572        self.login()
     573        self.assertTrue(
     574            'You logged in.' in self.browser.contents)
     575        self.assertTrue(
     576            '<strong>Congratulations!</strong> You have been provisionally'
     577            ' admitted and your student record has been created for you.'
     578            in self.browser.contents)
     579        self.assertTrue(
     580            'Then enter your new student credentials: user name= my id,'
     581            ' password = %s.' % self.applicant.application_number
     582            in self.browser.contents)
     583        return
     584
    568585    def image_url(self, filename):
    569586        return self.edit_path.replace('edit', filename)
Note: See TracChangeset for help on using the changeset viewer.