Changeset 8039 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 4 Apr 2012, 11:25:41 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r7997 r8039 1851 1851 """ 1852 1852 grok.context(IUniversity) 1853 grok.name(' changepw')1853 grok.name('sendpw') 1854 1854 grok.require('waeup.Anonymous') 1855 grok.template(' changepw')1856 label = _(' Change mypassword')1855 grok.template('sendpassword') 1856 label = _('Send me a new password') 1857 1857 form_fields = grok.AutoFields(IStudentChangePassword) 1858 1858 … … 1870 1870 # No need to flash something. 1871 1871 return 1872 # Search student 1873 cat = queryUtility(ICatalog, name='students_catalog') 1872 # Search student or applicant 1874 1873 reg_number = data['reg_number'] 1875 1874 email = data['email'] 1875 cat = queryUtility(ICatalog, name='students_catalog') 1876 1876 results = cat.searchResults( 1877 1877 reg_number=(reg_number, reg_number), 1878 1878 email=(email,email)) 1879 1879 if len(results) == 0: 1880 self.flash(_('No student record found.')) 1880 # Try also the applicants_catalog if no student record was found. 1881 cat = queryUtility(ICatalog, name='applicants_catalog') 1882 if cat is None: 1883 self.flash(_('Application package not installed.')) 1884 return 1885 results = cat.searchResults( 1886 reg_number=(reg_number, reg_number), 1887 email=(email,email)) 1888 if len(results) == 0: 1889 self.flash(_('No record found.')) 1881 1890 return 1882 1891 student = list(results)[0] -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/sendpassword.pt
r8025 r8039 17 17 </table> 18 18 19 <p i18n:translate="email_address_problem"> 20 Enter the email address stored on Kofa. 21 You can't change your email address here. 22 If you've forgotten your email address or the email 23 address stored in Kofa is wrong or no longer valid, 24 use the enquiries form to request a change 25 of address. 26 </p> 27 <br /> 19 28 <div tal:condition="view/availableActions"> 20 29 <input tal:repeat="action view/actions" -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r7997 r8039 1643 1643 1644 1644 def test_change_password_request(self): 1645 self.browser.open('http://localhost/app/ changepw')1645 self.browser.open('http://localhost/app/sendpw') 1646 1646 self.browser.getControl(name="form.reg_number").value = '123' 1647 1647 self.browser.getControl(name="form.email").value = 'aa@aa.ng'
Note: See TracChangeset for help on using the changeset viewer.