Changeset 9178


Ignore:
Timestamp:
13 Sep 2012, 20:34:35 (12 years ago)
Author:
Henrik Bettermann
Message:

Change button title.

Let students view their application slip.

Fix pagetemplate.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
7 edited

Legend:

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

    r9141 r9178  
    10401040        return
    10411041
    1042     @action(_('Get login credentials'), style='primary')
     1042    @action(_('Send login credentials to email address'), style='primary')
    10431043    def register(self, **data):
    10441044        if not self.captcha_result.is_valid:
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r9116 r9178  
    935935        self.browser.getControl(name="form.phone.area").value = '555'
    936936        self.browser.getControl(name="form.phone.ext").value = '6666666'
    937         self.browser.getControl("Get login credentials").click()
     937        self.browser.getControl("Send login credentials").click()
    938938        self.assertEqual(self.browser.url,
    939939            self.container_path + '/registration_complete?email=xx%40yy.zz')
     
    962962        self.browser.getControl(name="form.reg_number").value = 'anynumber'
    963963        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    964         self.browser.getControl("Get login credentials").click()
     964        self.browser.getControl("Send login credentials").click()
    965965        self.assertTrue('No application record found.'
    966966            in self.browser.contents)
     
    972972        self.browser.getControl(name="form.reg_number").value = '1234'
    973973        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    974         self.browser.getControl("Get login credentials").click()
     974        self.browser.getControl("Send login credentials").click()
    975975        self.assertTrue('An error occurred.' in self.browser.contents)
    976976        # Let's set this attribute manually
     
    981981        self.browser.getControl(name="form.reg_number").value = '1234'
    982982        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    983         self.browser.getControl("Get login credentials").click()
     983        self.browser.getControl("Send login credentials").click()
    984984        # Anonymous is not informed that firstname verification failed.
    985985        # It seems that the record doesn't exist.
     
    991991        self.browser.getControl(name="form.firstname").value = 'John'
    992992        self.browser.getControl(name="form.reg_number").value = '1234'
    993         self.browser.getControl("Get login credentials").click()
     993        self.browser.getControl("Send login credentials").click()
    994994        self.assertTrue('Your password has already been set and used.'
    995995            in self.browser.contents)
     
    10051005        self.browser.getControl(name="form.reg_number").value = '1234'
    10061006        self.browser.getControl(name="form.email").value = 'new@yy.zz'
    1007         self.browser.getControl("Get login credentials").click()
     1007        self.browser.getControl("Send login credentials").click()
    10081008        # Yeah, we succeded ...
    10091009        self.assertTrue('Your registration was successful.'
     
    10211021        self.browser.getControl(name="form.identifier").value = '1234'
    10221022        self.browser.getControl(name="form.email").value = 'aa@aa.ng'
    1023         self.browser.getControl("Get login credentials").click()
     1023        self.browser.getControl("Send login credentials").click()
    10241024        self.assertTrue('No record found' in self.browser.contents)
    10251025        self.applicant.email = 'aa@aa.ng'
     
    10291029        self.browser.getControl(name="form.identifier").value = '1234'
    10301030        self.browser.getControl(name="form.email").value = 'aa@aa.ng'
    1031         self.browser.getControl("Get login credentials").click()
     1031        self.browser.getControl("Send login credentials").click()
    10321032        self.assertTrue(
    10331033            'An email with your user name and password has been sent'
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r9024 r9178  
    8181  >>> browser.getControl(name="form.identifier").value = 'forgetful'
    8282  >>> browser.getControl(name="form.email").value = 'aa@aa.ng'
    83   >>> browser.getControl("Get login credentials").click()
     83  >>> browser.getControl("Send login credentials").click()
    8484  >>> print browser.contents
    8585  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/basepage.pt

    r7811 r9178  
    1818          <tal:password replace="view/hasPassword" />
    1919      </td>
    20     <tr>
     20    </tr>
    2121    <tal:files content="structure provider:files" />
    2222  </tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9161 r9178  
    19541954        self.browser.getControl(name="form.identifier").value = '123'
    19551955        self.browser.getControl(name="form.email").value = 'aa@aa.ng'
    1956         self.browser.getControl("Get login credentials").click()
     1956        self.browser.getControl("Send login credentials").click()
    19571957        self.assertTrue('An email with' in self.browser.contents)
    19581958
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r9151 r9178  
    328328                    amount = getattr(certificate, 'school_fee_2', 0.0)
    329329        elif category == 'clearance':
    330             p_item = student['studycourse'].certificate.code
     330            try:
     331                p_item = student['studycourse'].certificate.code
     332            except (AttributeError, TypeError):
     333                return _('Study course data are incomplete.'), None
    331334            amount = academic_session.clearance_fee
    332335        elif category == 'bed_allocation':
  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r9145 r9178  
    626626        student_url = self.view.application_url() + (
    627627            '/students/%s' % self.request.principal.id)
    628         #app_slip = getUtility(IExtFileStore).getFileByContext(
    629         #    self.context.student, 'application_slip')
     628        app_slip = getUtility(IExtFileStore).getFileByContext(
     629            self.context.student, 'application_slip')
    630630        targets = []
    631         #if app_slip:
    632         #    targets = [{'url':student_url + '/application_slip', 'title':'Application Slip'},]
     631        if app_slip:
     632            targets = [{'url':student_url + '/application_slip', 'title':'Application Slip'},]
    633633        targets += [
    634634            {'url':student_url, 'title':'Base Data'},
Note: See TracChangeset for help on using the changeset viewer.